Answer the question
In order to leave comments, you need to log in
Redirect from VPS to FTP server connected via OPENVPN, how?
there is
a NEXTCLOUD with a gray IP on the server, connected via OpenVPN to a VPS server with a "white IP" for outside access.
To access NEXTCLOUD, there is a 3rd level domain registered in Ngnix on VPSe.
those. on request, for example, exemple.dns.ru, I get to the internal ip https://10.8.0.2
now I need FTP on the server with a gray IP (the same computer where nextcloud), if I'm on the same OPENVPN network, then FTP access there is, for example ftp://10.8.0.2, but how can I reach it from the outside?
Answer the question
In order to leave comments, you need to log in
Perhaps nginx has some custom module for FTP proxying, but I would recommend doing it in a standard way for Linux - using iptables or similar software.
I'm not very good at this, help me how to do it right, it is necessary that from a request to IP 195.133.xx:21 I get to the internal Openvpn "ovsky" 10.8.0.2:21
I do this, but
iptables -t nat -A POSTROUTING does not work -p tcp --dst 10.8.0.2 --dport 21 -j SNAT --to-source 195.133.xx
iptables -t nat -A PREROUTING -p tcp --dst 195.133.xx --dport 21 -j DNAT --to -destination 10.8.0.2:21
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question