Click to See Complete Forum and Search --> : Ipchains and iptables


Notfromkansas
11-02-2001, 07:02 PM
In running redhat 7.1 and have been for a month so. It is my first linux experienced so this might be an easy and some what ignorent question for experieced people by I hope some will have the patiance to answer my questions.

What is the difference between Ipchains and Itables?

What is the logic in having both? Do they not do the same thing?

Why is it that I by using the ipchains --list get a list of the rules and when I use Iptables --list get this: /lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: init-module: Device ore resourçe busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: insmod /lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o failed
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: insmod ip_tables failed
iptables v1.2.1a: can't initialize iptables table filter . iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.( It may contain a typo or two, sorry)

I hope that some one can help me and thank all who do so in advance. :)

Dark Ninja
11-02-2001, 07:36 PM
IPTables is the "upgrade" of IPChains. The difference between the two is not something I altogether understand, so I will not try to explain it (although, I'm sure you can find an article on the subject). All I know is that IPChains makes a stateless decision of where to send a packet based on the packet's headers. On the other hand, IPTables makes a stateful decision. (That is the difference, and apparently a large one, although, I'm not sure what stateless and stateful imply.)

Yes - both IPChains and IPTables do "basically" the same thing. (Again, stateless/stateful thing comes into effect.) However, you should NOT, I repeat, NOT, have both IPChains and IPTables running. If you have the 2.4.x kernel or above, use IPTables. Otherwise, it seems to be of opinion that you use IPChains.


Dark Ninja

P.S. Maybe someone can clarify on the stateless/stateful "stuff."

EDIT:
Nevermind, I answered my own question. I found this posted up on a bulliten board on the web. Here you go:

"the difference is that in stateful filtering, the kernel
knows what connections are in progress and can therefore
do very sensible things.

the difference in concrete terms is that stateful filtering
allows things like outgoing active ftp, incoming passive ftp
and outgoing udp services much safer to allow through a filter."

SECOND EDIT: Good link on the subject: Linux Gets Stateful Firewalling (http://finmath.uchicago.edu/~wilder/scientific/Security/netfilter/SP_netfilter.html)

[ 02 November 2001: Message edited by: Dark Ninja ]

scanez
11-02-2001, 07:37 PM
Iptables is a replacement for ipchains included in the 2.4.x kernels, so no you don't need nor shouldn't use both. My guess for your errors when trying to use iptables is that you already have ipchains loaded so iptables recognizes this and can't load its own modules. If you want to use ipchains, no problem. If you want iptables, stop using ipchains first then load iptables.

Good luck
SC

Edit: ~lart scanez for typing too slow :)

[ 02 November 2001: Message edited by: scanez ]

X_console
11-02-2001, 08:10 PM
If you're using ipchains, don't use iptables. If you're using iptables, don't use ipchains. Use one, but not both. If you're using kernel 2.4.x, use iptables. By the looks of it, iptables wasn't built into your kernel by default, but they were built as modules. That's fine, but you have to load them. So look for all the iptables modules and then load all of them and you shouldn't get this error anymore.

Notfromkansas
11-03-2001, 11:07 AM
Thank you all for your quick and informative replies. :)