2010년 5월 27일 목요일

Using an Ubuntu Powered Laptop as Access Point

Would you like to share your wired internet connection to others via the wireless card built into your laptop? I needed a way to get alot of other devices around my house online without having a wireless router handy, instead I found out how to create an access point via the Broadcom BCM4311 (Rev. 1) wireless card that is built into my Aspire 4520 laptop. You may be able to apply this tutorial to other cards as well.

As I said this may work for other cards as well, in fact my tutorial is based off this one for wireless cards with Atheros chipsets.

First off you need to get the driver and firmware for your Broadcom by running this command:

sudo apt-get install b43-fwcutter

Next install the extra packages for creating the access point:

sudo apt-get install bridge-utils hostapd

Now add the following to /etc/network/interfaces by running “sudo nano /etc/network/interfaces”:

auto eth0 wlan0 br0
iface eth0 inet manual
up /sbin/ifconfig eth0 up
down /sbin/ifconfig eth0 down
iface wlan0 inet manual
up /sbin/ifconfig wlan0 up
down /sbin/ifconfig wlan0 down
iface br0 inet static
address [your IP here]
netmask [your netmask here]
gateway [your gateway here]
bridge_ports eth0 wlan0

*Please note the only other thing in your /etc/network/interfaces file should be the local (lo) setup and loopback address (127.0.0.1). If your ethernet port gets it’s address via DHCP then use “iface br0 inet dhcp” instead and leave out the address, netmask and gateway information.

Next back up your default hostapd config file that gives alot of extra information that you may need later:

sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.conf.bkk

Next run “sudo nano /etc/hostapd/hostapd.conf” and add the following to the file:

driver=nl80211
interface=wlan0
bridge=br0
hw_mode=b
ssid=[your SSID here]
channel=1

*If you want WPA encryption please read the original tutorial, I did not use it so I cannot vouch for it.

Next run “sudo nano /etc/default/hostapd” and uncomment the ‘RUN DAEMON=”no”‘ line (remove the ‘#’ in front)

All you have to do now is run “sudo shutdown -r now” to restart and begin enjoying your new access point.

*Please be aware that the text used on this blog might make zeros(0) look like lowercase oh’s(o) please take care when reading either of these.

reference from : http://paragonofcomputing.wordpress.com/2010/01/12/using-an-ubuntu-powered-laptop-as-access-point/

댓글 없음: