diff options
author | Bill Nottingham <notting@redhat.com> | 2003-02-24 16:15:10 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-02-24 16:15:10 +0000 |
commit | 59298506e8d2df987d0d28085f40b1b7b2e11c76 (patch) | |
tree | 3e95ae50520ee6372ded525055c9b09769c9efae /sysconfig/network-scripts | |
parent | bd49fd62336a44a1486ec667ca4f6da8b72f4ccf (diff) | |
download | initscripts-59298506e8d2df987d0d28085f40b1b7b2e11c76.tar initscripts-59298506e8d2df987d0d28085f40b1b7b2e11c76.tar.gz initscripts-59298506e8d2df987d0d28085f40b1b7b2e11c76.tar.bz2 initscripts-59298506e8d2df987d0d28085f40b1b7b2e11c76.tar.xz initscripts-59298506e8d2df987d0d28085f40b1b7b2e11c76.zip |
handle changed chain name
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 8 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 944edaaf..0001cbf6 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -190,7 +190,7 @@ fi # Is there a firewall running, and does it look like one we configured? FWACTIVE= -if iptables -L -n 2>/dev/null | grep -q RH-Lokkit-0-50-INPUT ; then +if iptables -L -n 2>/dev/null | grep -q RH-Lokkit-0-50 ; then FWACTIVE=1 else modprobe -r iptable_filter >/dev/null 2>&1 @@ -243,7 +243,7 @@ if [ -n "${DYNCONFIG}" ]; then # what DNS server they're using until they are done. FWHACK= if [ -n "$FWACTIVE" -a "$FIREWALL_MODS" != "no" ]; then - iptables -I RH-Lokkit-0-50-INPUT -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT + iptables -I RH-Lokkit-0-50 -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT FWHACK=1 fi @@ -255,11 +255,11 @@ if [ -n "${DYNCONFIG}" ]; then echo $" done." else echo $" failed." - [ -n "$FWHACK" ] && iptables -D RH-Lokkit-0-50-INPUT -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT + [ -n "$FWHACK" ] && iptables -D RH-Lokkit-0-50 -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT exit 1 fi - [ -n "$FWHACK" ] && iptables -D RH-Lokkit-0-50-INPUT -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT + [ -n "$FWHACK" ] && iptables -D RH-Lokkit-0-50 -m udp -s 0/0 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT # DHCP likes to create duplicate routes. Fix that up. NUMDEFROUTES=`ip -o route | \ diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 2fbafbfb..35b62622 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -83,12 +83,12 @@ if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then fi if [ "$FIREWALL_MODS" != "no" -a -f /etc/sysconfig/iptables ] && \ - iptables -L -n 2>/dev/null | grep -q RH-Lokkit-0-50-INPUT ; then + iptables -L -n 2>/dev/null | grep -q RH-Lokkit-0-50 ; then ns=`awk '/^nameserver / { print $2 }' /etc/resolv.conf` if [ -n "$ns" ]; then for nameserver in $ns ; do - if ! iptables -L RH-Lokkit-0-50-INPUT -n | grep -q $nameserver ; then - iptables -I RH-Lokkit-0-50-INPUT -m udp -s $nameserver/32 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT + if ! iptables -L RH-Lokkit-0-50 -n | grep -q $nameserver ; then + iptables -I RH-Lokkit-0-50 -m udp -s $nameserver/32 --sport 53 -d 0/0 --dport 1025:65535 -p udp -j ACCEPT [ -x /usr/bin/logger ] && logger $"punching nameserver $nameserver through the firewall" fi done |