I'm trying to set up my RPi as Wifi Access Point and to connect as client to a OpenVPN server.

However, as soon I start OpenVPN my devices associated with the RPi WIFI no longer can access the web. I assume the problem lies in the routing stuff, but am not sure.

My configuration...
WLAN0 -> connected to the internet router
WLAN1 -> WIFI Access Point

Any help is appreciated as I'm left helpless. Thanks.

  • what shows 'route' after ovpn connection is started?
    – patricks
    Commented Jul 23, 2013 at 14:41
  • Do you want your wifi traffic to also go through this VPN?
    – Gerben
    Commented Jul 23, 2013 at 16:38
  • Part 1/2: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default UG 0 0 0 tun0 default timecapsule.loc UG 0 0 0 wlan0 UGH 0 0 0 tun0 * UH 0 0 0 tun0 UG 0 0 0 tun0
    – Marco
    Commented Jul 23, 2013 at 20:04
  • Part 2/2: * U 0 0 0 wlan0 * U 0 0 0 wlan1 timecapsule.loc UGH 0 0 0 wlan0
    – Marco
    Commented Jul 23, 2013 at 20:04
  • 1
    @Gerben Yes I want all traffic to go through this VPN if it's up. However, SSH should not go via VPN
    – Marco
    Commented Jul 23, 2013 at 20:12

1 Answer 1


I managed to do this with my RPI, although my VPN connection was running over the Ethernet port, rather than over a second wireless interface.

I wrote up the details of how I got it working here: http://alphaloop.blogspot.com/2014/01/raspberry-pi-as-vpn-wireless-access.html

The main thing that tripped me up was that I tried to use my local router's DNS for any connected devices, but I found that when the VPN connection was up, all traffic from the devices got routed over the VPN, which effectively meant that they were trying to look up a local IP address on the Internet.

I got round it by setting up bind9 as a DNS server on the RPI and pointing the connected devices to that. It might be worth seeing if this fixes your problem.

  • Would you be willing to copy the high points of the article into the answer, to prevent link rot? Commented Mar 9, 2016 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.