Ubuntu as an wireless access point
Submitted by stga on Mon, 2006-09-11 20:07.
networking
I have a PCI wireless netgear card that I wan't to use to extend the server with wireless accesspoint function.
We need the hostapd daemon for the access point functionallity
sudo apt-get install hostapd
Edit /etc/hostapd/hostapd.conf, delete everything and put this in the file:
interface=ath0
driver=madwifi
auth_algs=1
wpa=1
wpa_passphrase=put_a_password_here
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
driver=madwifi
auth_algs=1
wpa=1
wpa_passphrase=put_a_password_here
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
Now we make the wireless access point. Do this by typing the following;
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
ifconfig ath0 10.0.0.2.1 netmask 255.255.255.0
iwconfig ath0 essid my_wap mode master
iwpriv ath0 mode 3
ifconfig ath0 down
iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
ifconfig ath0 10.0.0.2.1 netmask 255.255.255.0
iwconfig ath0 essid my_wap mode master
iwpriv ath0 mode 3
ifconfig ath0 down
Bring up all services with this command;
ifconfig ath0 up
/etc/init.d/hostapd restart
/etc/init.d/hostapd restart
Now we should be able to connect to your access point, if not try;
ifconfig ath0 up
» login to post comments