3 # set IP MASQUERADE with post-up command in INTERFACES(5)
9 # IFACE physical name of the interface being processed
10 # METHOD method of the interface (e.g., static)
11 # MODE start if run from ifup, stop if run from ifdown
12 # PHASE as per MODE, but with finer granularity, distinguishing the pre-
13 # up, post-up, pre-down and post-down phases.
15 # optional argument to set default gateway devices connected to WAN manually
16 # (try each of them in order)
18 if [ "${PHASE}" = "post-down" ]; then
19 # remove MASQUERADE rule and exit
20 /sbin/iptables -t nat -D POSTROUTING -o ${IFACE} -j MASQUERADE
26 /sbin/iptables -t nat -A POSTROUTING -o ${IFACE} -j MASQUERADE