Answer the question
In order to leave comments, you need to log in
How to perform routing?
Colleagues, good afternoon.
Please help me to form the iptables command
there are 3 interfaces eth0 (192.168.100.0), tun0 (10.10.10.0) and tun1 (10.10.11.0)
now the rules are:
ip rule add from 10.10.10.0/24 table vpn.out
ip route add default dev tun1 table vpn.out
iptables
-t nat -A POSTROUTING -s 10.10.10.0/24 -o tun1 -j MASQUERADE
Answer the question
In order to leave comments, you need to log in
1) s/MASQUERADE/SNAT/
No need to force the processor. The masquerade was invented for ppp when their address is not known in advance.
2) in the same way (in the sense, the first would also be brought to a similar form)
iptables -t nat -A POSTROUTING -i tun0 -s 10.10.10.0/24 -o eth0 -d 192.168.100.0/24 -j SNAT --to-source 192.168.100.x
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question