adding a module to iptables permanently

I need to add the module ip_conntrack_ftp module to the Kernel so that my FTP sessions work.  When I type modprobe ip_conntack_ftp at the command line it loads, but when IPTABLES or the system restarts, I lose it.

Where can I put this command to load the module so that is automatically loads with IPTABLES?

Thanks,

Deeky
deekyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wesly_chenCommented:
> Where can I put this command to load the module so that is automatically loads with IPTABLES
Put it into /etc/init.d/iptables

Wesly
0
deekyAuthor Commented:
My problem is where?  That file looks like a program with variables and echos everywhere.  I wouldn't know the proper place for it to execute.

Deeky
0
wesly_chenCommented:
Right after
-------
. /etc/init.d/functions
modprobe ip_conntack_ftp   <====
----
Wesly
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

deekyAuthor Commented:
I cannot find this.  Would this be different for different Linux Distros.  Mine is Fedora 2.

Maybe it would help if I knew how to search in vi editor.

Deeky
0
wesly_chenCommented:
. /etc/init.d/functions   <=== This line is right at the 6 or 7 lines. (After the "#" comments) in /etc/rc.d/init.d/iptables

I use Fedora Core 3.

Should be similar.

Wesly
0
deekyAuthor Commented:
Well, I have found your position in the script.

When I place the command where you said, and restart iptables, then type lsmod |grep ip, I'm not seeing the conntrack_ftp module.  If I type modprobe ip_conntrack_ftp at the regular prompt, it does work.

If I type the word "test" into the script where you said to put the modprobe command, I receive an error on that line.  So, I know it is processing that line.

I am typing is like "modprobe ip_conntrack_ftp"  and also tried "/sbin/modprobe ip_conntrack_ftp"

Deeky
0
wesly_chenCommented:
=====
. /etc/init.d/functions
/sbin/modprobe ip_conntack_ftp  
echo $status >/tmp/status
======
Then
/etc/init.d/iptables restart

cat /tmp/status
if 0 ,then it runs. Or it fail.

Wesly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.