Use -g swith after -L section to forward ports to whole network
autossh -M 40008 -f -N user@server -L 33061:127.0.0.1:3306 -g -L 6380:127.0.0.1:6380 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o BatchMode=yes -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa
Other notes
Configuration file : /etc/init/autossh.conf
Start service:
sudo service autossh start
Leave a Reply