Skip to content

Instantly share code, notes, and snippets.

@cyklee
Created May 26, 2017 03:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cyklee/be19f82b58afd60cd44ce176bdaa14f5 to your computer and use it in GitHub Desktop.
Save cyklee/be19f82b58afd60cd44ce176bdaa14f5 to your computer and use it in GitHub Desktop.
Example of port forwarding using miniUPNP client
# Port forwarding using miniUPNP client
# Use crontab to automate upon reboot
# https://superuser.com/questions/634628/is-there-a-script-to-add-port-forwarding-rule-in-home-router
upnpc -a `ifconfig wlan0 | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1` 22 22 TCP
upnpc -a `ifconfig wlan0 | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1` 5900 5900 TCP
upnpc -a `ifconfig wlan0 | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1` 9091 9091 TCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment