Posted by Anonymous on Tue 30th Oct 00:01 (modification of post by view diff)
download | new post
- #!/bin/bash
- . /etc/conf.d/net
- ROUTES=$(/sbin/route -n);
- PART=${ROUTES#*UG};
- if [[ ! -z "${PART}" ]]; then
- IF=${PART##* }
- if [[ "${USE_UPNP}" != "no" ]]; then
- if [[ "${IF}" == "${IFNAME}" ]]; then
- # We are the default route.
- echo "INTERNAL_INTERFACE=${INTERNAL_INTERFACE}" > /tmp/u pnpd
- echo "EXTERNAL_INTERFACE=${IFNAME}" >> /tmp/upnpd
- touch /tmp/gw6c
- /bin/sv up /service/upnpd
- /bin/sv up /service/gw6c
- fi
- fi
- /sbin/iptables -t nat -A POSTROUTING -o ${IFNAME} -j MASQUERADE
- fi
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.