My main server ip address that i installed openvpn server on, is blocked in my country.
that means i cant connect to openvpn directly. so I bought another server. i want to use this second server to connect my main openvpn. every methods that is fast is fine for me.
both servers are ubunutu 20.04
Best Answer
You may use iptables for port forwarding The CLI Syntax looks like
check man page for details.
You should install the packages
iptables
andiptables-persistent
. For a persistent configuration (load at reboot) you need to save your configuration withI guess your 2nd server does have "only” one interface. IP-Forwarding must be enabled. Add the line
to
A reboot is needed.
Iptables is a very powerful tool - be careful. If you misconfigure if you may lose access to the server.