Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strange iptables behaviour with accept?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kwark
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 121

PostPosted: Thu Jan 31, 2008 11:11 am    Post subject: strange iptables behaviour with accept? Reply with quote

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
MOBLOCK_IN  all  --  anywhere             anywhere            state NEW
ipbans     all  --  anywhere             anywhere
badpackets  all  --  anywhere             anywhere
in-tcp     tcp  --  anywhere             anywhere
in-udp     udp  --  anywhere             anywhere

I just added moblock to block certain ip's from going in and out. Moblock adds a jump to MOBLOCK_IN and an ACCEPT above that.

As far as I know an ACCEPT should accept a packet and stop traversing the chain, right? But the chains 2-5 are still reached. How can this be?
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Thu Jan 31, 2008 7:52 pm    Post subject: Reply with quote

Hmmm. Try running

iptables -L -n -v

You'll probably find the first ACCEPT is for loopback i/f.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23100

PostPosted: Fri Feb 01, 2008 3:31 am    Post subject: Reply with quote

Use iptables-save instead. It is meant for preserving the rules across reboots, so it prints all the parameters for the rules.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum