Using your Raspberry Pi as a Wireless Router and Web Server

I got an email earlier in the week from some students at SoonChunHyang University, about 100km from Seoul, Korea. They are working on a project where they are using Raspberry Pi’s as a web server, but also wanted to be able to control the Pi’s via their smart phones and desktops. They ran into issues because they were using the (previously) unsupported WiFi Adapter (RTL8188CUS chipset) that I wrote about in this Raspberry Pi WiFi Hotspot post.

A computer science graduate myself, I offered to write a tutorial for them to help them out. This entire tutorial might not be relevant for everyone, but I cover a lot of issues that people struggle with.

  • -Setting up a DHCP Server
  • -Setting up a Wireless Access Point
  • -Setting up an rPi as a Router
  • -Enabling IP Forwarding

I’ll begin with a fresh image of the Raspbian and just a regular ethernet cable to configure it. I’ve always recommended Raspbian because it is an optimized version of Debian built specifically for Raspberry Pi’s. The last stable downloads can be found here.

To flash your SD Card, you will need to unzip the image and write it your SD card using Win32DiskImager. This tool can also be used to after our initial setup to create an image of our finalized implementation(very useful as a backup).

windiskimager

After the image is flashed, you can boot your device. At this point you can use your HDMI Cable/Mouse/Keyboard for your initial configuration, or you can use an SSH Client like Putty to connect. The default hostname, login, and password are as follows:

host:raspberrypi
Username: pi
Password: raspberry

raspberry pi putty

For this tutorial, I will be using putty. On first boot, you will be prompted with a configuration tool called Raspi-Config. If the raspi-config doesnt load automatically, just enter the following command from the shell to get started.

sudo raspi-config

raspi-config-screenshot

The settings I recommend you update are

update
expand_rootfs
change_pass
change_timezone
memory_split

The usual distribution images are 2 GB. When you copy the image to a larger SD card you have a portion of that card unused. expand_rootfs expands the initial image to expand to fill the rest of the SD card, giving you more space. By default, 64mb is reserved for the Graphical UI. Since we plan on using this as a web server, I reduce this to 32mb with the memory_split command.

After you finish your changes to the raspi-config, you should reboot your pi using the following command:

sudo shutdown -r now

At this point we have a fully functional linux server, but we still need to install apache and get the hotspot/routing functions working. The first part is pretty easy. Run the following commands from the shell to install Apache.

sudo apt-get update
sudo apt-get install apache2

The location of the Apache configuration file is

/etc/apache2/apache2.conf

After this is completed, give it a try! Navigate to the IP or Hostname of your Rasberry Pi in your browser, and you should see the Apache Splash “It works!” Screen.

it works apache

I believe this is what the students at SoonChunHyang already have working. But, they want to be able to access this web server over a WiFi Hotspot running on the same Raspberry Pi. In order to do this, we need to install hostapd.

sudo apt-get install hostapd

The following steps are only for people who have WiFi adapters with the RTL8188CUS Chipset, if you don’t, please skip ahead to the section titled configuring Hostapd.
I believe the whole crux of their problem so far is that it is the apt hosted copy of hostapd is not compatible with the RTL8188CUS chipset they are using. But, thanks to the Edimax team, I’ve got a replacement hostapd binary to resolve this issue. I don’t think they will be able to get this working without it.

To download and replace the installed binary version of hostapd we just installed, they need to issue the following commands:

wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip 
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax 
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd 
sudo chown root.root /usr/sbin/hostapd 
sudo chmod 755 /usr/sbin/hostapd

Configuring Hostapd

Now that we’ve updated the binary copy of hostapd, we need to configure it. To do so, create the following file

sudo nano /etc/hostapd/hostapd.conf

with the following contents:

interface=wlan0
driver=rtl871xdrv
ssid=DaveConroyPi
channel=6
wmm_enabled=1
wpa=1
wpa_passphrase=0000000000
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

 

In previous tutorials, I have used bridge-utils here to help bridge the connection between the interfaces wlan0 and eth0, but in this case we want the wireless card and rPi to handle the routing and dhcp. So , we may be able to connect to the access point, but we won’t get an IP just yet. To do that, we need to define a subnet for our wireless card.

sudo nano /etc/network/interfaces

and add the following 3 lines

iface wlan0 inet static
address 10.10.0.1
netmask 255.255.255.0

 

Then we have to enable dhcp on the pi for this network so that any devices that connect can get an IP addresss

sudo apt-get install isc-dhcp-server
sudo nano /etc/dhcp/dhcpd.conf

and make sure you have the following contents:


authoritative; #be careful with this setting
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;


#for the wireless network on wlan0
subnet 10.10.0.0 netmask 255.255.255.0 {
range 10.10.0.25 10.10.0.50;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option routers 10.10.0.1;
interface wlan0;
}

 

At this point we should reboot to test HostAPD and DHCP.

sudo reboot

After the rPi comes back up, start hostapd in the background, then reboot the dhcp server

sudo hostapd -B /etc/hostapd/hostapd.conf
sudo /etc/init.d/isc-dhcp-server restart

At this point you should be able to join the wireless network, get an IP, and also hit the local apache web server. If it connects, we will want to start this wireless access point on boot with the following commands

sudo nano /etc/default/hostapd

and uncommenting and updating the following line

DAEMON_CONF="/etc/hostapd/hostapd.conf"

So, if you have followed these steps correctly, you can now provide DHCP servers to any clients, and also allow serve those clients your Apache web pages.

it works apache raspberry pi

There is only one problem remaining. The clients who have connected to your access point can not get further than your Raspberry Pi, therefore have no internet access.

To solve this, we need to enable IP forwarding on the rPi. You can not reboot at this point forward or all future changes will be lost. To save time, we are going to run the final commands as root.

sudo su
echo 1 > /proc/sys/net/ipv4/ip_forward

Then, update /etc/sysctl.conf and uncomment this line

nano /etc/sysctl.conf

net.ipv4.ip_forward=1

Save the file.

The final step is to insert an iptables rule to allow NAT. (eth0 being the interface which is connected to the internet)

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

We also need to save these IP Table settings so they are enabled every time you boot the rPi. To save these settings to a file, use the following command.

iptables-save > /etc/iptables.up.rules

To load them at boot, we need to create a script in /etc/network/if-pre-up.d/

nano /etc/network/if-pre-up.d/iptables

with the following contents:

#!/bin/sh
#This script restores iptables upon reboot

iptables-restore < /etc/iptables.up.rules

exit 0

Then, verify the permissions so that it will start on boot.

chown root:root /etc/network/if-pre-up.d/iptables 
chmod +x /etc/network/if-pre-up.d/iptables
chmod 755 /etc/network/if-pre-up.d/iptables

And we are done! When you reboot your Raspberry Pi should be working as an Access Point, a Web Server, a DHCP Server, and an Internet Ready Router!

internet working raspberry pi


35 comments

  1. James Park.

    hey~! hi dave. i’m students at SCH Univ. before i send you e-mail guy.
    I’m really stuck few days in RTL8188CUS chipset issue.
    but this post save me now.!!! this is really truly works!!!!!!!
    I worry about because of this. but now relieved.:)
    i’m really appreciated make this post for me.
    Thank you very much for your kindness again Dave.!

  2. Thanks for the great tutorial. It works like a charm. But shouldn’t the RaspberryPi have a static ip of 10.10.3.142 ? ;)

  3. how do you connect to the access point on the rpi after you’re done with the tutorial?

  4. pierandrea

    thanks dave for your great work!!!
    I am almost there but as soon as I launch
    sudo hostapd -B /etc/hostapd/hostapd.conf

    I get the error:

    Line 2: invalid/unknown driver ‘rtl871xdrv ‘
    my wifi dongle is a DLINK DWA 140 and work well with my raspberry . I mean I can connect the rasberry to my hom wifi network smoothly
    thanks for your help
    pierandrea

  5. I have seen two of your tutorials, both well done, thank you so much.

    The only issue I have is, every time I reboot I need to enter sudo /etc/init.d/isc-dhcp-server restart If I don’t then I will see the access point but won’t get an IP number.

    After that everything rocks, any ideas on how to make this automatic?

  6. Stew Kelt

    Hi,

    Sorry for the big log post. But i’ve got everything working, but for some reason i cannot get an ipad or android phone to connect. It works fine with my laptop (still need to test using another comp). Im thinking its a dhcp issue, see log:

    Aug 22 07:57:28 raspberrypi dhcpd: DHCPDISCOVER from a0:88:b4:32:94:18 via wlan0
    Aug 22 07:57:28 raspberrypi ifplugd(wlan0)[1670]: Link beat detected.
    Aug 22 07:57:28 raspberrypi ifplugd(wlan0)[1670]: Executing '/etc/ifplugd/ifplugd.action wlan0 up'.
    Aug 22 07:57:29 raspberrypi dhcpd: DHCPOFFER on 10.10.0.26 to a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 07:57:29 raspberrypi ifplugd(wlan0)[1670]: Program executed successfully.
    Aug 22 07:57:29 raspberrypi dhcpd: Wrote 1 leases to leases file.
    Aug 22 07:57:29 raspberrypi dhcpd: DHCPREQUEST for 10.10.0.26 from a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 07:57:29 raspberrypi dhcpd: DHCPACK on 10.10.0.26 to a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 07:57:30 raspberrypi ntpd[2100]: Listen normally on 3 wlan0 10.10.0.1 UDP 123
    Aug 22 07:57:30 raspberrypi ntpd[2100]: peers refreshed
    Aug 22 07:58:53 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 07:58:53 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 07:58:57 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 07:58:57 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:00:09 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:00:09 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:00:12 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:00:12 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:00:33 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: associated
    Aug 22 08:00:33 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f RADIUS: starting accounting session 52154F4B-00000001
    Aug 22 08:00:33 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: pairwise key handshake completed (WPA)
    Aug 22 08:00:33 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: group key handshake completed (WPA)
    Aug 22 08:01:22 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:01:22 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:01:25 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:01:25 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:01:33 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: disassociated
    Aug 22 08:01:34 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: associated
    Aug 22 08:01:34 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f RADIUS: starting accounting session 52154F4B-00000002
    Aug 22 08:01:34 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: pairwise key handshake completed (WPA)
    Aug 22 08:01:34 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: group key handshake completed (WPA)
    Aug 22 08:01:51 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: disassociated
    Aug 22 08:02:29 raspberrypi dhcpd: DHCPREQUEST for 10.10.0.26 from a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 08:02:29 raspberrypi dhcpd: DHCPACK on 10.10.0.26 to a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 08:03:11 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:03:11 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:03:14 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:03:14 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:03:16 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: associated
    Aug 22 08:03:16 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f RADIUS: starting accounting session 52154F4B-00000003
    Aug 22 08:03:16 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: pairwise key handshake completed (WPA)
    Aug 22 08:03:16 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: group key handshake completed (WPA)
    Aug 22 08:03:28 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: disassociated
    Aug 22 08:05:29 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:05:29 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:05:32 raspberrypi dhcpd: DHCPINFORM from 10.10.0.26 via wlan0
    Aug 22 08:05:32 raspberrypi dhcpd: DHCPACK to 10.10.0.26 (a0:88:b4:32:94:18) via wlan0
    Aug 22 08:06:44 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: associated
    Aug 22 08:06:45 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f RADIUS: starting accounting session 52154F4B-00000004
    Aug 22 08:06:45 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: pairwise key handshake completed (WPA)
    Aug 22 08:06:45 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: group key handshake completed (WPA)
    Aug 22 08:07:04 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: disassociated
    Aug 22 08:07:20 raspberrypi hostapd: wlan0: STA a0:88:b4:32:94:18 WPA: group key handshake completed (WPA)
    Aug 22 08:07:29 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f IEEE 802.11: associated
    Aug 22 08:07:29 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f RADIUS: starting accounting session 52154F4B-00000005
    Aug 22 08:07:29 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: pairwise key handshake completed (WPA)
    Aug 22 08:07:29 raspberrypi hostapd: wlan0: STA 70:de:e2:7f:db:0f WPA: group key handshake completed (WPA)
    Aug 22 08:07:29 raspberrypi dhcpd: DHCPREQUEST for 10.10.0.26 from a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 08:07:29 raspberrypi dhcpd: DHCPACK on 10.10.0.26 to a0:88:b4:32:94:18 (Stewarts-Laptop) via wlan0
    Aug 22 08:07:30 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f via wlan0
    Aug 22 08:07:31 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:32 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:32 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:36 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:36 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:44 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:44 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:53 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:07:53 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:08:01 raspberrypi dhcpd: DHCPDISCOVER from 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0
    Aug 22 08:08:01 raspberrypi dhcpd: DHCPOFFER on 10.10.0.27 to 70:de:e2:7f:db:0f (Lauras-iPad) via wlan0

    Just noticed that the time is out by 1 hour?? will try changing it to see of that has an effect.

    Hope you can help.

  7. Stew Kelt

    it comes to life when i run: sudo /etc/init.d/isc-dhcp-server restart

  8. Stew Kelt

    sorted it!

    in /etc/rc.local add this before exit 0:

    sudo service isc-dhcp-server restart

    Thanks for this tutorial, its the only one that has worked! :)

    • dconroy

      Glad it worked! I might trim down that error log!

    • Adam Williams

      I actually have the exact same problem as you Stew. I can connect from my laptop/PCs without issue but as soon as I try to connect from any of my iDevice’s it just spins without ever getting an IP. I tried your solution suggested here but it still doesn’t work, I have to manually run:

      sudo /etc/init.d/isc-dhcp-server restart

      before I can connect. Anyone else still having this problem?

      PS Dave these Tutorials are amazingly helpful.

      • Adam, you could add this to rc.local and itd work every time…

        • Adam Williams

          That’s actually what I ended up doing. Seems to do the trick. Still can’t get it to work from boot every time, but I’d say 80% of the time it works. Stable enough for now.

          Thanks

  9. James Jensen

    Thanks for the great tutorials. I tried this 6 months ago without ever getting it to work. I completed the previous wifi access point tutorial w/ no problem. On this tutorial, so far, wireless is working, dhcp is working. My android phone connects and is assigned 10.10.0.25, but I can’t ping 10.10.0.1 from my phone. Can you give me an idea of where to look for the problem. I am a networking noob, and don’t know how to debug. ( I can ping and see the website from my laptop across the wired ethernet on my local 192.168.0.5 static IP)

  10. Paul Wicks

    For those of you that had network issues connecting, I had to comment out two lines in my network config and I got this to work:

    auto lo

    iface lo inet loopback
    iface eth0 inet dhcp

    allow-hotplug wlan0
    #iface wlan0 inet manual
    #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

    iface wlan0 inet static
    address 10.10.0.1
    netmask 255.255.255.0

    The wifi was installed by default when I ran my Pi for the first time, hence the line “iface wlan0 inet manual” was conflicting with the addition

  11. Diamond

    Ok, basically this tutorial is different to others – it lets me finally to run the server. But I have few more problems. Other PCs connect to pi successfully, but they dont get their ip addresses and android device won’t connect at all (error code 8). Any suggestions where to look at? Thanks!

  12. Hi David, I followed your tutorials so far and I was able to make my Rpi work as intended…

    I wanted to redirect all trafic to the Rpi local server to serve some files to the users and after reading this page:

    I tried:
    /sbin/iptables -A PREROUTING -s 10.10.0.20/255.255.255.0 -p tcp -j DNAT --to-destination 10.10.0.1

    But i’m getting errors… I’m a total NOOB so any help is really appreciated.

    (I dont want user’s to actually be able to use the network while connected to the Rpi… I might not even have a network connected).

    What I’m trying to accomplish is a standalone box where people can connect and see some local files.

    Thanks

  13. Hi

    Nice tutorial. Works fine.
    I use the RasPi as Router and Webserver without P Forwarding.

    When I use the settings like you, then it works in WLAN Mode “b”.
    When I add the following line “hw_mode=g” and make a restart, then I can connect with the RasPi, but I can’t load a website.
    Have I forgot something for use the WLAN-Mode “g”?

  14. Hello, thnx for this tutorial.
    I’m going to try Raspberry Pi as a home router and torrent station.
    Is Pi CPU and RAM enough for routing packets? Doesn’t it reduces speed of downloading files through it?

    What I’m going to install on Raspberry Pi B:
    wifi router services
    iptables
    samba for sharing connnected to USB HDD
    i2p sservice
    rtorrent

  15. Carlos Correia

    I would like to set my Rpi to get wifi from one dongle and send internet to another dongle.
    I changed the eth0 in your tutorial for wlan1, that is my internet source.

    I can connect to the AP, but I don’t get connected to the web, to make this via wifi to wifi is different from eth0 to wlan0?

  16. Superb, what a blog it is! This web sit gives helpful information to us, keep it up.

  17. Alex Isai

    Hello,
    Can you help me to do the other way around?
    I want to connect rpi to internet by Wi-fi and on the eth0 to connect a CCTV camera.
    I want to see images from the camera from another network.
    Camera connected to eth0 , external network connected to wlan0.
    Thank you

  18. Hi,

    thank you for this great tutorial. I have a question in regards to the ability of RP to work as splash screen for a café, so the customer when he connect to the wireless a splash screen will pop up and asking to like the place to the facebook. is this doable with RP?

    Thanks again

  19. Hi Dave

    What a great post, really helpful :)

    I have a little special need; I want to answer all request on port 80 with my apache; regardless if the AC user wants to access google.com or other website. I am thinking I can install a DNS server for this and resolve all hosts to the ip of my apache. All other traffic I want to go though like the example you have done.

    Do you have som pointers on that; how do I reroute all traffic except port 80 ?

  20. Dear Dave

    I am trying to use the Pi to setup a small web server for local need (internet not needed). Your tutorial was very helpful, but still I am getting stuck somewhere.

    Thank to you, Wifi is broadcasting ok (I am using Edimax dongle !). But it seems I cannot get an IP address and therefore connect to the network. For info, I am trying to connect with Mac & iDevices !

    Any idea ?

    PS: your page is now in my favorite

  21. Hi Dave,

    Thank you very much for your tutorial.
    Spent 4 nights re-installing the os and changing configurations until I found your post. It’s all working now.
    Could you please expend this tutorial to include the use of dnsmasq?
    Upon installing dnsmasq, the wlan0 static ip would disappear on boot.
    And the traffic goes right through without resolving to my /etc/hosts entires.

    Thanks,

  22. Hey, i tried this tutorial and it worked great! Worked because now every time i type “sudo hostapd -B /etc/hostapd/hostapd.conf” i get this output:
    Configuration file: /etc/hostapd/hostapd.conf
    drv->ifindex=3
    l2_sock_recv==l2_sock_xmit=0x0x12fb638
    +rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
    rtl871x_set_key_ops
    rtl871x_set_key_ops
    rtl871x_set_key_ops
    rtl871x_set_key_ops
    Using interface wlan0 with hwaddr 80:1f:02:9a:b6:39 and ssid 'Heli_Cam'
    rtl871x_set_wps_assoc_resp_ie
    rtl871x_set_wps_beacon_ie
    rtl871x_set_wps_probe_resp_ie
    rtl871x_set_key_ops
    rtl871x_set_beacon_ops
    rtl871x_set_hidden_ssid_ops
    ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument

    Any Ideas ?

    • Hi,

      Great tutorial really. I have the some warnig (All work fine). It is possible to know the fix that you have made at hostapd? I am very interesting to this.

      Thank you for your great job!

  23. I got everything working correctly, and can get to the Internet through the AP on my Pi.

    However, while at work, Outlook exchange server says Offline. Also, I cannot connect to a VPN. Is there some additional step I need to tunnel traffic correctly to get Outlook Exchange and VPN working?

    In your tutorial is NAT routing just taking care of web traffic? Is that why Exchange thinks I’m offline? I also can’t see other computers on my network.

    Thanks for tutorial and any insight you can give me on this issue.

  24. nikhil

    Thnx for the tutorial. I connected my laptop with pi but when I tried to enter pi’s ip address:8081 for live video streaming it says page not found. Please help
    also when I try to see wlan0 ip in ifconfig.it displays no ip.
    Please help thanks

  25. Jordan314

    Hi Dave,
    This is working awesome except for one thing. If the pi is disconnected from ethernet, it doesn’t create the wifi network and I can’t connect to it. I’m trying to run it so it broadcasts a network while disconnected from the internet, so I can control some robotics remotely. Is there any way to do this?
    Thanks–

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>