If you want to connect to a local workstation behind a firewall you can do that by bouncing traffic off of an AWS instance.
An example would be accessing a Jupyter Lab from the outside world to a machine with no static IP or behind a firewall.
The steps are:
- Create a paid AWS Ubuntu instance and save the '.pem' file.
- Make sure the AWS instance's
Security Rules
allows traffic in. - Test that you can connect to this instance from the outside world (e.g.
python3 -m http.server
orjupyter lab --ip=*
) then visit the instance using its public IP. - (optionally) Enable password login in
/etc/ssh/sshd_config
by settingPasswordAuthentication yes
andsudo passwd $USER
. - Enable
GatewayPorts yes
and restartsshd
. E.g.sudo nano /etc/ssh/sshd_config
thensudo systemctl restart ssh.service
.