Forum Moderators: bakedjake

Message Too Old, No Replies

iptables won't block access to port 80?

         

jamie

12:43 pm on Feb 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



in light of all the security posts (many thanks bakedjake :-), i am finally getting round to learning iptables.

i am only logging for the moment and the first rules are being logged correctly, but i can't manage to log http requests from my own IP

the rule i am testing is:

SOURCE="MY.IP.ADD.RESS"
TESTPORTS="21,80"

iptables -A INPUT -s $SOURCE -p tcp -m multiport --dports $TESTPORTS -j LOG --log-prefix "IPT-DROPTEST"

it logs ftp requests perfectly, but does nothing for http requests?

any suggestions are much appreciated :-)

thanks all!

ifti

1:11 pm on Feb 25, 2004 (gmt 0)

10+ Year Member




try this

SOURCE="MY.IP.ADD.RESS"
FTPPORT="21"
HTTPPORT="80"

iptables -A INPUT -s $SOURCE -p tcp -m multiport --dports $FTPPORT -j LOG --log-prefix "IPT-DROPTEST"

iptables -A INPUT -s $SOURCE -p tcp -m multiport --dports $HTTPPORT -j LOG --log-prefix "IPT-DROPTEST"

jamie

1:40 pm on Feb 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi ifti,

thanks for the response, but i just realised why - my connection goes through a proxy, so while the IP address for ftp is the actual one for my box, the one i browse with is one of my providers. i just tested with this new IP and everything is logged accordingly.. doh!

this occured to me whilst out walking the dog - moral of story, don't keep hacking on at the same thing, take a break and a bit of fresh air instead! :-)

thanks anyway!