Skip to content

Instantly share code, notes, and snippets.

@mmyers1474
Created September 23, 2016 23:24
Show Gist options
  • Save mmyers1474/535d6e6fd070fc47d7507769c6551b40 to your computer and use it in GitHub Desktop.
Save mmyers1474/535d6e6fd070fc47d7507769c6551b40 to your computer and use it in GitHub Desktop.
####################################################
#### Configuration Examples
####################################################
#### Automatic port knocking example.
Host myserver
User sysop
Host myserver.com
ProxyCommand bash -c '/usr/bin/knock %h 1000 2000 3000 4000; sleep 1; exec /bin/nc %h %p'
# This will allow us to use port 8080 on the local machine
# in order to access example.com at port 80 from the remote machine
Host local_to_remote
LocalForward 8080 example.com:80
# This will allow us to offer access to internal.com at port 443
# to the remote machine through port 7777 on the other side
Host remote_to_local
RemoteForward 7777 internal.com:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment