[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 384
  • Last Modified:

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
0
deeky
Asked:
deeky
  • 4
  • 3
1 Solution
 
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
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now