Answer the question
In order to leave comments, you need to log in
How to reach the device through OpenVPN?
There is a vps with external ip xxxx . An openvpn server is deployed on it, to which the client is connected. The client inside the tunnel has ip 10.8.0.2 and vps 10.8.0.1 . It is required that all calls to the external ip vps on port 1234 be transmitted through the vpn tunnel to the client 10.8.0.2. Now I can "reach out" to a client with vps through its vpn ip's, but I can't forward this port to an external ip. I dug up all the manuals, tried all sorts of manipulations on ifconfig - it still doesn't work.
Answer the question
In order to leave comments, you need to log in
Something like this.
iptables -t nat -A PREROUTING -d x.x.x.x -p tcp --dport 1234 -j DNAT --to-dest 10.8.0.2:1234
you need to register a route for the client on the VPN server
and make sure that it is created when connecting by
writingroute print -4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question