Outbound Link Summary:
Network 3000:
14 years ago

how to provide public access to a local webserver behind a router.
- you need access to another, a remote machine
- set GatewayPorts yes in both, the local and the remote machine’s sshd_config file
- open a reverse ssh tunnel from port 80 of the local machine to the desired port (e.g. 81) of the remote one: root@local ~ # ssh -R 81:localhost:80 root@remote
- allow access to the chosen port on the remote machine: root@remote ~ # ufw allow 81/tcp
et voilà: remote:81<