linux ssh tunnel code example
Example 1: port forwarding linux
sudo nano /etc/sysctl.conf
# UNCOMMENT `net.ipv4.ip_forward=1`
#AFTER, EXECUTE THESE COMMANDS
sudo sysctl -p
sudo sysctl --system
Example 2: ssh tunnel port
ssh -L 80:intra.example.com:80 gw.example.com
Example 3: how to make tunnel in linux ubuntu
$ ssh -f -N [email protected] -L 8080: server1.example.com:3000