View previous topic :: View next topic |
Author |
Message |
Kwark Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 21 May 2007 Posts: 121
|
Posted: Thu Jan 31, 2008 11:11 am Post subject: strange iptables behaviour with accept? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Thu Jan 31, 2008 7:52 pm Post subject: |
|
|
Hmmm. Try running
iptables -L -n -v
You'll probably find the first ACCEPT is for loopback i/f. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23100
|
Posted: Fri Feb 01, 2008 3:31 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|