abracadaniel Posted February 22, 2017 Share Posted February 22, 2017 Hi everybody! I am trying to route all wlan0 traffic through a VPN, but I cant get it to work. my Pineapple is cabled to my router, with a static ip address, and wlan0 is set up as an access point. I am connecting to the vpn server using the following command: openvpn --config /sd/config/vpnserver.ovpn which works fine, and I traffic directly from the pineapple terminal goes through the VPN (for example pings from the pineapple terminal, i check this using tcpdump -i tun0). But when I connect to the access point it seems like all the traffic from wlan0 goes diretly to br-lan. I have tried adding the following rules to iptables: iptables -t nat -I POSTROUTING 1 -o tun0 -j MASQUERADE iptables -I FORWARD 1 -i tun0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -I FORWARD 1 -i wlan0 -o tun0 -j ACCEPT but it does not work. How can I make all traffic from wlan0 go through tun0? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.