Jump to content

abracadaniel

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by abracadaniel

  1. 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?

×
×
  • Create New...