All of lore.kernel.org
 help / color / mirror / Atom feed
* General question about chains
@ 2008-10-16  3:46 Joey
  2008-10-16 13:19 ` Matt Zagrabelny
  2008-10-16 16:41 ` Gilad Benjamini
  0 siblings, 2 replies; 5+ messages in thread
From: Joey @ 2008-10-16  3:46 UTC (permalink / raw)
  To: netfilter

Hello All,

While I have used iptables for a while, I have found that I needed to gain
more knowledge to push what I am doing with it to another level.

I have read through a few things on-line and in the readme stuff, but have
some confusion that I want to clear up.

I am thinking that a chain is a group of rules, and I can create multiple
chains to define rules for different things.
Lets say FTP-RULES, SPAM-RULES etc.

If I do this I can hopefully flush just one group or chain without effecting
the other rules is what I am thinking.

When I execute a rule I do this:
iptables -A INPUT -p tcp -s 118.242.0.0/16 -j LOG --log-prefix SPAM-BLOCK-
CIDR-ASIAN
iptables -A INPUT -p tcp -s 118.242.0.0/16 --dport 25 -j DROP


I wanted to change it to add it to a chain like so:
iptables CIDR-ASIAN -A INPUT -p tcp -s 118.242.0.0/16 -j LOG --log-prefix
SPAM-BLOCK-CIDR-ASIAN
iptables CIDR-ASIAN -A INPUT -p tcp -s 118.242.0.0/16 --dport 25 -j DROP

iptables -N CIDR-ASIAN -A INPUT -p tcp -s 118.242.0.0/16 -j LOG --log-prefix
SPAM-BLOCK-CIDR-ASIAN
iptables -N CIDR-ASIAN -A INPUT -p tcp -s 118.242.0.0/16 --dport 25 -j DROP

This didn't work for me and I have tried several varients with no luck.

So my first question is do I understand correcty how to utilize chains?

Will I be able to load and unload chains rather than flush everything end
reload everything? ( I have a lot of rules )

Sample syntax would be great because I have found a million sites without
seeing what I really want.

Finally when I go to save these chains like the docs say
iptables-save -t fail2ban-VSFTPD I get the following error:
iptables-save v1.2.11: Can't initialize: Table does not exist (do you need
to
insmod?)

This happens on different versions of Centos & on a RH as well.

Thanks! ( sorry for the long description ).



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-17  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16  3:46 General question about chains Joey
2008-10-16 13:19 ` Matt Zagrabelny
2008-10-16 22:16   ` Joey
2008-10-17  8:40     ` Покотиленко Костик
2008-10-16 16:41 ` Gilad Benjamini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.