Answer the question
In order to leave comments, you need to log in
How to map a virtual subnet to the same addresses in the tunnel?
The bottom line is that there are two vpn networks in which addresses intersect in the roughest form.
It is necessary that all requests to the local non-existent subnet 192.168.17.x (netmask 255.255.255.0) be forwarded to the same addresses tun0 (192.168.5.x). And all other requests went to the tun1 subnet.
ssh 192.168.17.44 should essentially be 192.168.5.44 via tun0, and directly ssh 192.168.5.44 should send a request to the tun1 subnet
If you can somehow add that all resolved domains from tun0 returned with addresses 192.168. super.
Naturally, all shamanism is only on the local machine, no one on remote hosts will change anything.
Answer the question
In order to leave comments, you need to log in
The direction is something like this:
ip route add 192.168.17.0/24 dev tun0
iptables -t nat -A POSTROUTING -d 192.168.17.0/24 -j NETMAP --to 192.168.5.0/24
iptables -t nat -A PREROUTING -i tun0 - s 192.168.5.0/24 -j NETMAP --to 192.168.17.0/24
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question