Networking Forums

Networking Forums > Computer Networking > Linux Networking > bridging and iptables -- strange behaviour

Reply
Thread Tools Display Modes

bridging and iptables -- strange behaviour

 
 
beau
Guest
Posts: n/a

 
      02-03-2006, 08:27 PM
I've noticed some very strange behaviour in my firewall lately. If I
do a port scan on my desktop machine (XP) from a site like
security.symantec.com then I get some open ports listed, such as
25,80,110... These ports aren't open on my machine, fport even says
so. Even if I explicitly block 110 on my firewall the scan reports it
as being open. I'm using Fedora Core 4 with 2.6.11-1 kernel and
iptables to filter traffic over a bridge. When I block 110 I insert a
rule like this:

iptables -I FORWARD 1 -p tcp --dport 110 -j DROP

the packet counters for this rule are incrementing when I port scan, so
packets are matching. Has anyone seen anything like this before??? Is
it possible that something upstream from my firewall is causing this???

Beau

 
Reply With Quote
 
 
 
 
Postmaster
Guest
Posts: n/a

 
      02-03-2006, 09:53 PM

"beau" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> I've noticed some very strange behaviour in my firewall lately. If I
> do a port scan on my desktop machine (XP) from a site like
> security.symantec.com then I get some open ports listed, such as
> 25,80,110... These ports aren't open on my machine, fport even says
> so. Even if I explicitly block 110 on my firewall the scan reports it
> as being open. I'm using Fedora Core 4 with 2.6.11-1 kernel and
> iptables to filter traffic over a bridge. When I block 110 I insert a
> rule like this:
>
> iptables -I FORWARD 1 -p tcp --dport 110 -j DROP
>
> the packet counters for this rule are incrementing when I port scan, so
> packets are matching. Has anyone seen anything like this before??? Is
> it possible that something upstream from my firewall is causing this???
>
> Beau
>


Beau,

I get more aggressive on blocking things at the firewall :-)

KPORT=XXX <- Port you want seriously blocked.

/sbin/iptables -A INPUT -i $EXTINT -p TCP --dport $KPORT -j DROP
/sbin/iptables -A INPUT -i $INTINT -p TCP --sport $KPORT -j DROP
/sbin/iptables -t nat -A PREROUTING -i $EXTINT -p TCP --dport $KPORT -j DROP
/sbin/iptables -t nat -A PREROUTING -i $INTINT -p TCP --sport $KPORT -j DROP
/sbin/iptables -A OUTPUT -o $EXTINT -p TCP --sport $KPORT -j DROP
/sbin/iptables -A OUTPUT -o $INTINT -p TCP --dport $KPORT -j DROP
/sbin/iptables -t nat -A POSTROUTING -o $EXTINT -p TCP --sport $KPORT -j
DROP
/sbin/iptables -t nat -A OUTPUT -o $EXTINT -p TCP --sport $KPORT -j DROP
/sbin/iptables -t nat -A POSTROUTING -o $INTINT -p TCP --dport $KPORT -j
DROP
/sbin/iptables -A FORWARD -p TCP --dport $KPORT -j DROP

Enjoy,
Postmaster



 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      02-03-2006, 10:48 PM
On Fri, 03 Feb 2006 22:53:23 GMT, "Postmaster" <postmaster@127.0.0.1> wrote:

> I get more aggressive on blocking things at the firewall :-)
>
>KPORT=XXX <- Port you want seriously blocked.
>
>/sbin/iptables -A INPUT -i $EXTINT -p TCP --dport $KPORT -j DROP
>/sbin/iptables -A INPUT -i $INTINT -p TCP --sport $KPORT -j DROP
>/sbin/iptables -t nat -A PREROUTING -i $EXTINT -p TCP --dport $KPORT -j DROP
>/sbin/iptables -t nat -A PREROUTING -i $INTINT -p TCP --sport $KPORT -j DROP
>/sbin/iptables -A OUTPUT -o $EXTINT -p TCP --sport $KPORT -j DROP
>/sbin/iptables -A OUTPUT -o $INTINT -p TCP --dport $KPORT -j DROP
>/sbin/iptables -t nat -A POSTROUTING -o $EXTINT -p TCP --sport $KPORT -j
>DROP
>/sbin/iptables -t nat -A OUTPUT -o $EXTINT -p TCP --sport $KPORT -j DROP
>/sbin/iptables -t nat -A POSTROUTING -o $INTINT -p TCP --dport $KPORT -j
>DROP
>/sbin/iptables -A FORWARD -p TCP --dport $KPORT -j DROP


What's wrong with simply using policy DROP do all this? Surely
there's no need for explicit DROPping?

IOW: Take what you want, DROP the rest.

Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a

 
      02-05-2006, 08:09 PM
"beau" <(E-Mail Removed)> said:
>I've noticed some very strange behaviour in my firewall lately. If I
>do a port scan on my desktop machine (XP) from a site like
>security.symantec.com then I get some open ports listed, such as
>25,80,110... These ports aren't open on my machine, fport even says
>so.


It could be interesting (and educational) to try to connect to these ports
from somewhere outside your ISPs network. It could be that your ISP is
intercepting the inbound traffic to these ports.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange ping behaviour Scooty Windows Networking 1 06-10-2008 07:42 AM
Strange behaviour of browser John Broadband 13 10-26-2007 02:32 PM
RH + 3 NICS Strange Behaviour John Miller Linux Networking 0 01-03-2005 09:52 PM
Strange wireless behaviour Sydney Wireless Internet 2 02-10-2004 06:12 PM
Strange behaviour Daniele Grassi Wireless Internet 0 10-14-2003 06:08 PM



1 2 3 4 5 6 7 8 9 10 11