]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
UPnP Initscript und Chain hinzugefuegt
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 3 Feb 2007 22:18:46 +0000 (22:18 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 3 Feb 2007 22:18:46 +0000 (22:18 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@404 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/initscripts/init.d/firewall
src/initscripts/init.d/upnpd [new file with mode: 0644]

index c1c0c7e712276ce87e769df08be2e915f9e3f562..e27ae6e7b9b2d3d1dc78af2fde2880c36834052b 100644 (file)
@@ -218,6 +218,10 @@ case "$1" in
        /sbin/iptables -t nat -N PORTFW
        /sbin/iptables -t nat -A PREROUTING -j PORTFW
 
+       # upnp chain for our upnp daemon
+       /sbin/iptables -t nat -N UPNPFW
+       /sbin/iptables -t nat -A PREROUTING -j UPNPFW
+
 
        # Custom mangle chain (for port fowarding)
        /sbin/iptables -t mangle -N PORTFWMANGLE
diff --git a/src/initscripts/init.d/upnpd b/src/initscripts/init.d/upnpd
new file mode 100644 (file)
index 0000000..44201a3
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/
+#
+# Description : UPnP Starter
+#
+# Authors     : Michael Tremer
+#
+# Version     : 01.00
+#
+# Notes       : for www.ipfire.org - GPLv2
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# defaults
+ALLOW_MULTICAST=no
+
+# configuration
+. /var/ipfire/upnp/settings
+
+case "$1" in
+       start)
+               boot_mesg "Starting Universal Plug'n'Play daemon..."
+               loadproc /usr/sbin/upnpd $EXTIFACE $INTIFACE
+               evaluate_retval
+               [ "$ALLOW_MULTICAST" != "no" ] && route add -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE
+               ;;
+
+       stop)
+               boot_mesg "Stopping Universal Plug'n'Play daemon..."
+               killproc /usr/sbin/upnpd
+               evaluate_retval
+               [ "$ALLOW_MULTICAST" != "no" ] && route del -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+
+               ;;
+       status)
+               statusproc
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/