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 Rulesallows traffic in. - Test that you can connect to this instance from the outside world (e.g.
python3 -m http.serverorjupyter lab --ip=*) then visit the instance using its public IP. - (optionally) Enable password login in
/etc/ssh/sshd_configby settingPasswordAuthentication yesandsudo passwd $USER. - Enable
GatewayPorts yesand restartsshd. E.g.sudo nano /etc/ssh/sshd_configthensudo systemctl restart ssh.service.