Created
May 26, 2017 03:22
-
-
Save cyklee/be19f82b58afd60cd44ce176bdaa14f5 to your computer and use it in GitHub Desktop.
Example of port forwarding using miniUPNP client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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