This is a guide to turn your old laptop into an access point, using Ubuntu or Debian as your operating system.
We are assuming your laptop have only one wireless card installed, if you have an extra usb wireless adapter during performing the steps in this guide, you may need to do extra steps to not apply the wrong settings to the wrong device.
Run everything from here as root:
Install necessary tools:
apt-get install iw hostapd bridge-utils
First you need to find whether your wireless card driver support running in access point mode.
Run this to check for ability to run in AP mode:
iw phy0 list | less
Scroll until you see this section: (click ‘q’ to finish scrolling, and return to terminal)
Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point software interface modes (can always be added): * AP/VLAN * monitor
The line saying (* AP) means that we it is supported, if there is no AP under “Supported interface modes”, then you might try installing a different driver for your wireless device.
Find out the name of your wireless device using
You will get an output like this:
wlan0 IEEE 802.11bg Mode:Master Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:on lo no wireless extensions. eth0 no wireless extensions.
The name we are looking for is ‘wlan0’
Stop the default network manager that comes with ubuntu/mint/debian, that will try to override some of our new settings on every boot:
echo manual > /etc/init/network-manager.override
Set the network configuration manually
Copy the following:
auto lo iface lo inet loopback iface eth0 inet manual auto br0 iface br0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.123.255 gateway 192.168.1.1 bridge_ports eth0
The ip “address” above is the address your computer will have, the ip should be chosen in a range outside of the ip addresses range assigned by the router’s DHCP, so, we are here assuming the router uses a DHCP range like for example 192.168.1.128-192.168.1.254
The ip “gateway” should be your ip of the router or modem providing the internet
Add your own domain name servers:
Copy in it the following line, and if you want, you can also add any other 3rd party dns you prefer, each on a separate line, like ‘220.127.116.11’ or ‘18.104.22.168’
Run to apply
Create a network bridge, that will be used to connect the ethernet and the wireless AP through your laptop
and add the ehternet to the bridge
brctl addbr br0 brctl addif br0 eth0
At this point, you should restart you computer to verify that everything is ok, on the next boot, your should have network connectivity.
Try to ping 192.168.1.1 , ping google.com
Create a new settings file for your access point,
Copy the following in the file:
interface=wlan0 bridge=br0 driver=nl80211 ssid=your-network-name channel=11 hw_mode=g wme_enabled=1 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=your_secret_password wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP
Start the access point to test it:
Using another laptop or phone, you should see the new wireless access point and connect to it and have internet through it.
If all went ok, make hostapd start on system startup
Find the line containing DAEMON_CONF, uncomment it and change it to:
Restart to verify that everything is working as expected.