Skip to content

Instantly share code, notes, and snippets.

@niran
Created August 4, 2012 00:57
Show Gist options
  • Save niran/3253161 to your computer and use it in GitHub Desktop.
Save niran/3253161 to your computer and use it in GitHub Desktop.
Remote port forwarding on boot
Host celes-forward
HostName celes.niran.org
User portforwarder
IdentityFile /root/.ssh/keyfile
RemoteForward 2222 localhost:22
RemoteForward 2280 localhost:80
RemoteForward 9091 localhost:9091
# celes-ports - sets up reverse port forwarding
description "sets up reverse port forwarding"
start on net-device-up IFACE=eth1
stop on net-device-down IFACE=eth1
respawn
exec ssh -N celes-forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment