diff options
Diffstat (limited to 'ipmasq/rules/A10dhcpd.rul')
-rw-r--r-- | ipmasq/rules/A10dhcpd.rul | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/ipmasq/rules/A10dhcpd.rul b/ipmasq/rules/A10dhcpd.rul index 7be8c1e..dbc56c5 100644 --- a/ipmasq/rules/A10dhcpd.rul +++ b/ipmasq/rules/A10dhcpd.rul @@ -11,20 +11,21 @@ if [ -n "$INTERNAL" ]; then for i in $INTERNAL; do - ipnm_cache $i - case $MASQMETHOD in - ipfwadm) - $IPFWADM -I -i accept -S 0.0.0.0/32 68 -D 255.255.255.255/32 67 -W $i -P udp - $IPFWADM -O -i accept -S $IPOFIF/32 67 -D 255.255.255.255/32 68 -W $i -P udp - ;; - ipchains) - $IPCHAINS -I input -j ACCEPT -s 0.0.0.0/32 68 -d 255.255.255.255/32 67 -i $i -p udp - $IPCHAINS -I output -j ACCEPT -s $IPOFIF/32 67 -d 255.255.255.255/32 68 -i $i -p udp - ;; + ipnm_cache $i + case $MASQMETHOD in + ipfwadm) + $IPFWADM -I -i accept -S 0.0.0.0/32 68 -D 255.255.255.255/32 67 -W ${i%%:*} -P udp + $IPFWADM -O -i accept -S $IPOFIF/32 67 -D 255.255.255.255/32 68 -W ${i%%:*} -P udp + ;; + ipchains) + $IPCHAINS -A input -j ACCEPT -s 0.0.0.0/32 68 -d 255.255.255.255/32 67 -i ${i%%:*} -p udp + $IPCHAINS -A output -j ACCEPT -s $IPOFIF/32 67 -d 255.255.255.255/32 68 -i ${i%%:*} -p udp + ;; netfilter) - $IPTABLES -I INPUT -j ACCEPT -s 0.0.0.0/32 68 -d 255.255.255.255/32 67 -i $i -p udp - $IPTABLES -I OUTPUT -j ACCEPT -s $IPOFIF/32 67 -d 255.255.255.255/32 68 -i $i -p udp - esac + $IPTABLES -A INPUT -j ACCEPT -s 0.0.0.0/32 68 -d 255.255.255.255/32 67 -i ${i%%:*} -p udp + $IPTABLES -A OUTPUT -j ACCEPT -s $IPOFIF/32 67 -d 255.255.255.255/32 68 -o ${i%%:*} -p udp + ;; + esac done fi |