Expose NAT server
Allow external connection to a server under a private network
Test the server
One of the best options is to use a SSH jump host server. For example, you can use serveo.net to test.
In your proxy server, run:
/usr/bin/ssh -R 35854:localhost:3128 serveo.netIn your client, run:
export http_proxy="http://USER:[email protected]:35854"
export https_proxy="http://USER:[email protected]:35854"
export ftp_proxy="http://USER:[email protected]:35854"
export no_proxy="localhost,127.0.0.1,::1"
curl http://www.google.comSetup serveo.net as a service
Make sure systemd is installed:
apt update
apt install systemdCreate the service file:
nano /etc/systemd/system/serveo-proxy.serviceWith the following content:
[Unit]
Description=Serveo proxy tunnel
After=network-online.target
[Service]
User=root
ExecStart=/usr/bin/ssh -R 35854:localhost:3128 serveo.net
RestartSec=3
Restart=always
[Install]
WantedBy=multi-user.targetStart and enable the service:
sudo systemctl daemon-reload
sudo systemctl enable serveo-proxy.service
sudo systemctl start serveo-proxy.serviceLast updated