From 429b8e7d385acc3111c87784241f28b919a138fc Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 24 Aug 2002 15:09:34 +0000 Subject: [PATCH] Check for DHCP before RFC 1918 git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@217 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 2cd4856d5..46de77250 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -2851,6 +2851,16 @@ add_common_rules() { # BROADCASTS # drop_broadcasts `find_broadcasts` + ########################################################################### + # DHCP + # + echo "Adding rules for DHCP" + + for interface in `find_interfaces_by_option dhcp`; do + run_iptables -A `input_chain $interface` -p udp --dport 67:68 -j ACCEPT + run_iptables -A OUTPUT -o $interface -p udp --dport 67:68 -j ACCEPT + done + ########################################################################### # RFC 1918 # @@ -3179,13 +3189,6 @@ define_firewall() # $1 = Command (Start or Restart) process_rules $rules - echo "Adding rules for DHCP" - - for interface in `find_interfaces_by_option dhcp`; do - run_iptables -A `input_chain $interface` -p udp --dport 67:68 -j ACCEPT - run_iptables -A OUTPUT -o $interface -p udp --dport 67:68 -j ACCEPT - done - echo "Setting up ICMP Echo handling..." filterping_interfaces="`find_interfaces_by_option filterping`"