summaryrefslogtreecommitdiff
path: root/ipmasq/rules/A10dhcpcd.rul
blob: 3f390851bd44d1f10be29bc4760768f3f5ba44d3 (plain)
  1. # Based on A10dhcpd.rul by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>:
  2. if [ -n "$INTERNAL" ]; then
  3. for i in $INTERNAL; do
  4. ipnm_cache $i
  5. case $MASQMETHOD in
  6. ipfwadm)
  7. $IPFWADM -I -i accept -S 0.0.0.0/0 67 -D 255.255.255.255/32 68 -W ${i%%:*} -P udp
  8. # $IPFWADM -O -i accept -S $IPOFIF/32 68 -D 255.255.255.255/32 67 -W ${i%%:*} -P udp
  9. ;;
  10. ipchains)
  11. $IPCHAINS -I input -j ACCEPT -s 0.0.0.0/0 67 -d 255.255.255.255/32 68 -i ${i%%:*} -p udp
  12. # $IPCHAINS -I output -j ACCEPT -s $IPOFIF/32 68 -d 255.255.255.255/32 67 -i ${i%%:*} -p udp
  13. ;;
  14. iptables)
  15. $IPTABLES -I INPUT -j ACCEPT -s 0.0.0.0/0 67 -d 255.255.255.255/32 68 -i ${i%%:*} -p udp
  16. # $IPTABLES -I OUTPUT -j ACCEPT -s $IPOFIF/32 68 -d 255.255.255.255/32 67 -i ${i%%:*} -p udp
  17. ;;
  18. esac
  19. done
  20. fi