The iptables rules are like a pitfall algorithm, what rule catches first is beeing used, so if your external interface on the server (the one with the external IP) is eth0, and the internal IP you want to route through tun0 is B.B.B.X then the rules to accomplish what you're trying to do is:Altho the problem here might be in the issue that you are making your router connect through VPN, when that happens the routing tables gets overwritten by the fact that the VPN tunnel will overtake any outbound packages.Code:iptables -t nat -A POSTROUTING -s B.B.B.X -o tun0 -j MASQUERADE iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE


Reply With Quote

Bookmarks