LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-18-2012, 02:28 AM   #1
Hammo
Member
 
Registered: Feb 2003
Posts: 31

Rep: Reputation: 1
iptables modules description


Hi all,

I am looking for a description of the iptables modules (e.g. nf_conntrack_ftp) that can be loaded when iptables starts: IPTABLES_MODULES directive in /etc/sysconfig/iptables-config

I have been trying to search google for this for hours with no luck.

I would really appreciate if someone could direct me to where I can find this information.


Regards
 
Old 05-18-2012, 06:34 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Probably isn't a list as it isn't needed, the info is right there if you know what the shortened names mean.

nf_conntrack_ftp

nf - netfilter
conntrack - connection tracker
ftp - the protocol this is for

You can also dump the info from the modules themselves with this :-
Code:
cd /lib/modules/$(uname -r)/kernel/net/netfilter/
modinfo *.ko | grep -e "filename:" -e "description:"
 
Old 05-18-2012, 07:21 AM   #3
Hammo
Member
 
Registered: Feb 2003
Posts: 31

Original Poster
Rep: Reputation: 1
this is really useful.. thanks a lot!

one more thing.. in the iptables config file it says that by default no modules are loaded unless specified in the directive.. however connection tracking does work without adding nf_conntrack in there.. are there some modules that are loaded by default? and if yes, how can we find out which ones these are?

cheers!
 
Old 05-19-2012, 02:57 AM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
2 points there

1 iptables does not have a config file, so whatever your looking at is distro specific
2 kernel module loading allows you to load a module that depends on other not yet loaded modules by on-demand loading of the other modules

so "modprobe nf_conntrack_ftp" will also pull in "nf_conntrack"
 
Old 05-21-2012, 01:07 AM   #5
Hammo
Member
 
Registered: Feb 2003
Posts: 31

Original Poster
Rep: Reputation: 1
so is there a way to find out which modules loads which other modules?

when i run an lsmod I get the following:

[root@rhce log]# lsmod | grep nf
nf_nat_ftp 3473 0
nf_conntrack_ftp 12911 1 nf_nat_ftp
nf_nat 22788 3 nf_nat_ftp,ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4 9440 6 iptable_nat,nf_nat
nf_defrag_ipv4 1449 1 nf_conntrack_ipv4
nf_conntrack_ipv6 19655 2
nf_conntrack 79643 8 nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,nf_conntrack_ipv6,xt _state
ipv6 321209 30 ip6t_REJECT,nf_conntrack_ipv6



I would expect this means that nf_conntrack loads nf_conntrack_ftp as well, but when I put nf_conntrack only in the iptables-config file the ftp inspection does not work (ls from remote ftp session). Only when I put nf_conntrack_ftp in the iptables-config file than ftp inspection works.

Any comments on that?
 
Old 05-23-2012, 04:45 AM   #6
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by Hammo View Post
I would expect this means that nf_conntrack loads nf_conntrack_ftp as well, but when I put nf_conntrack only in the iptables-config file the ftp inspection does not work (ls from remote ftp session). Only when I put nf_conntrack_ftp in the iptables-config file than ftp inspection works.

Any comments on that?
Your reading it back to front.

The modules on the right depend on the ones on the left, the column header kinda gives a hint.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
modules for iptables where is it? cormacson Linux - Networking 1 09-08-2010 08:52 AM
Loading Modules To Iptables lqchangba Linux - Server 2 05-26-2007 08:31 AM
Loading Modules To Iptables lqchangba Linux - Networking 2 05-25-2007 01:14 PM
iptables modules pingvina Linux - Networking 10 02-21-2006 12:39 PM
iptables modules load? shanenin Linux - General 0 01-06-2004 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration