0

I am trying to set up my raspberry pi as a WIFI access point which itself connects to a VPN through PPTP.

Here is what I have done:

  1. Managed to make my raspberry pi an WIFI access point. I am able to see it and connect to it. I followed that tutorial.

  2. Managed to route all the traffic through PPTP VPN using this tutorial

Problems ?

As I mentioned above, both 1 and 2 were successfully implemented, the problem is how can I make them work together ...

So whenever I activate my PPTP configuration with sudo pon my_fancy_conf updetach all the raspbbery-pi traffic gets through the VPN (tested with traceroute google.com command) BUT at that time all the connected devices to the WIFI access point are hanging up and they cant reach the internet via the raspberry pi anymore. Turning off the PPTP with sudo poff -a, gets the internet access back to devices but not through a VPN....

In other words the situation is like:

If I turn on the PPTP VPN on my PI the WIFI access points stop working, while internet is still accessible from the PI via the VPN.

Any ideas ?

EDIT

Running route -n command gives me:

Running ifconfig on one of the wireless clients

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
        inet 127.0.0.1 netmask 0xff000000 
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
        nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether 20:c9:d0:7b:8e:53 
        inet6 fe80::413:aece:8fc5:f28f%en0 prefixlen 64 secured scopeid 0x4 
        inet 192.168.42.10 netmask 0xffffff00 broadcast 192.168.42.255
        nd6 options=201<PERFORMNUD,DAD>
        media: autoselect
        status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
        options=60<TSO4,TSO6>
        ether 32:00:15:e7:43:40 
        media: autoselect <full-duplex>
        status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
        options=60<TSO4,TSO6>
        ether 32:00:15:e7:43:41 
        media: autoselect <full-duplex>
        status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=63<RXCSUM,TXCSUM,TSO4,TSO6>
       ether 32:00:15:e7:43:40 
        Configuration:
                id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
                maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
                root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
                ipfilter disabled flags 0x2
        member: en1 flags=3<LEARNING,DISCOVER>
                ifmaxaddr 0 port 5 priority 0 path cost 0
        member: en2 flags=3<LEARNING,DISCOVER>
                ifmaxaddr 0 port 6 priority 0 path cost 0
        nd6 options=201<PERFORMNUD,DAD>
        media: <unknown type>
        status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
        ether 02:c9:d0:7b:8e:53 
        media: autoselect
        status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
        ether 1a:0b:74:02:6c:de 
        inet6 fe80::180b:74ff:fe02:6cde%awdl0 prefixlen 64 scopeid 0x9 
        nd6 options=201<PERFORMNUD,DAD>
        media: autoselect
        status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
        inet6 fe80::3f29:3e26:c979:8830%utun0 prefixlen 64 scopeid 0xa 
        nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
        inet6 fe80::758c:e052:d6f7:e76a%utun1 prefixlen 64 scopeid 0xb 
        nd6 options=201<PERFORMNUD,DAD>
  • Who is supplying the ip addresses to the wireless clients? What is the gateway address for the clients? Possibly your local router? – LotPings Mar 19 '17 at 17:46
  • I have updated the question @LotPings – radioaktiv Mar 19 '17 at 17:57
  • If the route output is from the Pi that doesn't answer my questions. What output do get from an ifconfig/ipconfig from the wireless clients? – LotPings Mar 19 '17 at 18:03
  • Alright ! Update the question again. – radioaktiv Mar 19 '17 at 18:11
  • Sorry I'm more common in the windows world, on Linux clients the route -n is more helpful to show the gateway. – LotPings Mar 19 '17 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.