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.serveror
jupyter lab --ip=*) then visit the instance using its public IP.
GatewayPorts yesas mentioned here and restart
- On the local workstation (e.g. GPU workstation) run the following command:
ssh -i "YOUR_PEM_FILE.pem" -R AWS_PUBLIC_IP:2222:localhost:8888 ubuntu@AWS_PUBLIC_IP