29 lines
542 B
Bash
Executable File
29 lines
542 B
Bash
Executable File
#!/bin/sh
|
|
START=95
|
|
|
|
|
|
|
|
start() {
|
|
|
|
/sbin/act_miniupnpd
|
|
echo "miniupnpd starting ..."
|
|
## iptables app reorder
|
|
iptables -t nat -N MINIUPNPD 2>/dev/null
|
|
iptables -N MINIUPNPD 2>/dev/null
|
|
|
|
#### Move to /sbin/nat to control
|
|
iptables -t nat -I PREROUTING -i eth4.4 -j MINIUPNPD 2>/dev/null
|
|
|
|
|
|
}
|
|
|
|
stop() {
|
|
pnpd_pid=$(cat /var/run/miniupnpd.pid) 2>&- >&-
|
|
kill $pnpd_pid 2>&-
|
|
|
|
iptables -t nat -F MINIUPNPD 2>/dev/null
|
|
iptables -t nat -X MINIUPNPD 2>/dev/null
|
|
iptables -F MINIUPNPD 2>/dev/null
|
|
iptables -X MINIUPNPD 2>/dev/null
|
|
}
|