I have wlan0 and eth0. Eth0 is connected to the internet and wlan0 is an access point. I connected to an OpenVPN server with the "--pull-filter ignore redirect-gateway" option so that it doesn't automatically route ALL traffic through the VPN which is not what I want to do.
I'm trying to route all traffic from wlan0 (access point) to tun0. That way any clients connected to my access point will be using the VPN. I tried doing this using iptables:
iptables -A POSTROUTING -t nat -o wlan0 -j MASQUERADE iptables -A POSTROUTING -t nat -o tun0 -j MASQUERADE iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i wlan0 -o tun0 -j ACCEPT This doesn't work (and the counters don't update either). I tried replacing tun0 with eth0 which DID work (but ofc completely bypassing the VPN), so I'm assuming that the problem lies with tun0. I also read somewhere that IP routing tables are better suited for this. If that's true, how can I do this?