help with iptables

From: tim (tim_at_nospam.com)
Date: 07/16/03


Date: Wed, 16 Jul 2003 20:48:10 +0100

I'm having a real problem getting my head around why this will not work,
i've used various examples as a source and read loads of how to's, I must be
doing something fundamentaly wrong. I have a RH8.0 box with a single nic,
running Apache, ftp and a couple of other services. All I want from outside
is access to 80 & 21, from the RH 8.0 system itself full access all local
ports and no outgoing filter (90.0.0.101 is the RH address):

#Default policies
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

#Input rules
iptables -A INPUT -p TCP -s 0/0 --destination-port 21 -j ACCEPT
iptables -A INPUT -p TCP -s 0/0 --destination-port 22 -j ACCEPT
iptables -A INPUT -p TCP -s 0/0 --destination-port 80 -j ACCEPT
iptables -A INPUT -p TCP -s 90.0.0.101 --destination-port 11111 -j ACCEPT
iptables -A INPUT -p TCP -s 127.0.0.1 --destination-port 11111 -j ACCEPT
iptables -A INPUT -p TCP -s 90.0.0.101 --destination-port 11110 -j ACCEPT
iptables -A INPUT -p TCP -s 127.0.0.1 --destination-port 11110 -j ACCEPT

When this is applied, the input filter _seems_ to be working but web access,
etc from RH is not working! Can anyone give me some pointers please?

Regards



Relevant Pages

  • help with iptables
    ... I'm having a real problem getting my head around why this will not work, ... i've used various examples as a source and read loads of how to's, ... ports and no outgoing filter: ... iptables -P OUTPUT ACCEPT ...
    (comp.os.linux.networking)
  • Re: help with iptables
    ... > I'm having a real problem getting my head around why this will not work, ... > i've used various examples as a source and read loads of how to's, ... > ports and no outgoing filter: ... > iptables -P OUTPUT ACCEPT ...
    (alt.os.linux.redhat)
  • DNAT and iptables
    ... back and forwards murmuring barley audible random statements about iptables, ... DNAT and PREROUTING while clutching my head as if it would fall off if I ... If anyone can help sort this problem and stop the voices ... ...
    (comp.security.firewalls)