Answer the question
In order to leave comments, you need to log in
How to wrap traffic sent to direct ip through vpn network?
Given:
openvpn server ip 90.90.90.90 ( _VpnServer ) vpn network 10.8.8.0/24
There is a service at 80.80.80.80 ( _Service ) connected to vpn with address 10.8.8.10
There is a client ( _Client ) connected to vpn and wanting to communicate with server.
VPN server is NATed
iptables -t nat -A POSTROUTING -s 10.8.8.0/24 -o ens3 -j MASQUERADE
push "route 80.80.80.80 255.255.255.255"
client-to-client
Answer the question
In order to leave comments, you need to log in
Show iptables -L -n -t nat on vpn server
Perhaps there is a more general rule for NAT that is higher than yours and it works out earlier
And show routing from the client (is there a rule for 80.80.80.80)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question