aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-post
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-07-17 04:53:32 +0000
committerBill Nottingham <notting@redhat.com>2002-07-17 04:53:32 +0000
commita3fa1548cd9ec2a6ceb8037005ac24a2ed365a78 (patch)
tree5c752edfab0a48d3ecc351010eb72c0aff120dd4 /sysconfig/network-scripts/ifup-post
parent97abe79272f33d8e83bb9eeff1f72d0430a281fa (diff)
downloadinitscripts-a3fa1548cd9ec2a6ceb8037005ac24a2ed365a78.tar
initscripts-a3fa1548cd9ec2a6ceb8037005ac24a2ed365a78.tar.gz
initscripts-a3fa1548cd9ec2a6ceb8037005ac24a2ed365a78.tar.bz2
initscripts-a3fa1548cd9ec2a6ceb8037005ac24a2ed365a78.tar.xz
initscripts-a3fa1548cd9ec2a6ceb8037005ac24a2ed365a78.zip
use iptables & our lokkit chain
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-xsysconfig/network-scripts/ifup-post8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index bd716553..a2616aae 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -79,13 +79,13 @@ if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
fi
fi
-if [ "$FIREWALL_MODS" != "no" -a -f /etc/sysconfig/ipchains -a \
- "`ipchains -L input -n 2>&1 | awk 'END { print NR }'`" -gt 1 ]; then
+if [ "$FIREWALL_MODS" != "no" -a -f /etc/sysconfig/ipchains ] && \
+ iptables -L 2>/dev/null | grep -q RH-Lokkit-0-50-INPUT ; then
ns=`awk '/^nameserver / { print $2 }' /etc/resolv.conf`
if [ -n "$ns" ]; then
for nameserver in $ns ; do
- if ! ipchains -L input -n | grep -q $nameserver ; then
- ipchains -I input -s $nameserver/32 53 -d 0/0 1025:65535 -p udp -j ACCEPT
+ if ! iptables -L RH-Lokkit-0-50-INPUT -n | grep -q $nameserver ; then
+ iptables -A RH-Lokkit-0-50-INPUT -s $nameserver/32 --sport 53 -d 0/0 --dport 1025:65535 -p udp -m udp -j ACCEPT
[ -x /usr/bin/logger ] && logger $"punching nameserver $nameserver through the firewall"
fi
done