2011-07-29 12:04:03 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script is using upnpc version 1.6
|
|
|
|
# http://miniupnp.free.fr/files/
|
|
|
|
|
2016-10-24 23:59:20 +02:00
|
|
|
serverIp=192.168.0.250
|
2011-07-29 12:04:03 +02:00
|
|
|
proto="TCP"
|
|
|
|
|
|
|
|
|
|
|
|
if [[ $# == 0 || $1 == "-h" || $1 == "--help" ]] ; then
|
|
|
|
echo "usage $0 portNumber [TCP/UDP] [serverIP]"
|
|
|
|
echo "default serverIp: $serverIp, protocol: $proto"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
port=${1}
|
|
|
|
proto=${2:-$proto}
|
|
|
|
serverIp=${3:-$serverIp}
|
|
|
|
|
|
|
|
upnpc -a $serverIp $port $port $proto
|