Turn your laptop into a wireless access point using Hostapd

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.

Step 1

Run everything from here as root:

sudo -i

Install necessary tools:

apt-get install iw hostapd bridge-utils

Step 2

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.

Step 3

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’

Step 4

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

nano /etc/network/interfaces

Copy the following:

auto lo
iface lo inet loopback
iface eth0 inet manual
auto br0
iface br0 inet static
  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

The ip “gateway” should be your ip of the router or modem providing the internet

Add your own domain name servers:

nano /etc/resolvconf/resolv.conf.d/tail

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 ‘’ or ‘’

Run to apply

resolvconf -u

Step 5

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 , ping google.com

Step 6

Create a new settings file for your access point,

nano /etc/hostapd/hostapd.conf

Copy the following in the file:


Step 7

Start the access point to test it:

hostapd /etc/hostapd/hostapd.conf

Using another laptop or phone, you should see the new wireless access point and connect to it and have internet through it.

Step 8

If all went ok, make hostapd start on system startup

nano /etc/default/hostapd

Find the line containing DAEMON_CONF, uncomment it and change it to:


Restart to verify that everything is working as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *

(Your message will only be visible after moderation)