|
|
| Author |
Message |
motherface
RealPoor Guru

Joined: 12 Mar 2003 Posts: 3407
|
Posted: 03/17/06 - 20:09 Post subject: Linux: Where do you put modprobe statements?
|
|
|
I finally overcame my trepidation about kernel compiling and built a 2.6.15.6 kernel on my old Athlon 750 so I could take advantage of some of the ipsec stuff. The compile went fine and it booted and loaded fine but when I ran my old firewall script, all the iptables statements kept saying "iptables who? Do you need to run insmod?" So after some hunting I found all the crap I need to modprobe for it to work: | Code: | $MODPROBE ip_tables
$MODPROBE ipt_conntrack
$MODPROBE iptable_filter
$MODPROBE iptable_mangle
$MODPROBE iptable_nat
$MODPROBE ipt_LOG
$MODPROBE ipt_limit
$MODPROBE ipt_state
$MODPROBE ipt_MASQUERADE
$MODPROBE ipt_REJECT
$MODPROBE ipt_tos |
I tossed that all into the firewall script itself, and that works fine, but is there a centralized place where that crap is supposed to go so it gets loaded at boot?
|
|
|
Back to top
|
|
|
|
 |
Occulis
RealPoor Jedi

Joined: 11 Oct 2002 Posts: 13293
Location: Moral Relativity Central
|
Posted: 03/17/06 - 21:37 Post subject:
|
|
|
Not sure what distro you have. Debian, put your list of modules in /etc/modules
RedHat, it's something like the /etc/rc.sysinit
You could always create your own file in /etc/init.d/ called superdave and then symlink it in each of the runlevel directories
ie:
| Code: |
for i in 2 3 5; do
ln -s /etc/rc$i.d/S30-davesmods /etc/init.d/superdave;
done
|
(I broke it up into 3 lines but you can issue it all on 1)
Which is the same as typing:
| Code: |
ln -s /etc/rc2.d/S30-davesmods /etc/init.d/superdave
ln -s /etc/rc3.d/S30-davesmods /etc/init.d/superdave
ln -s /etc/rc5.d/S30-davesmods /etc/init.d/superdave
|
|
|
|
Back to top
|
|
|
|
 |
Jukas
Toomuchtimeonhands

Joined: 19 Mar 2003 Posts: 896
|
Posted: 03/18/06 - 00:52 Post subject: Re: Linux: Where do you put modprobe statements?
|
|
|
| motherface wrote: | I finally overcame my trepidation about kernel compiling and built a 2.6.15.6 kernel on my old Athlon 750 so I could take advantage of some of the ipsec stuff. The compile went fine and it booted and loaded fine but when I ran my old firewall script, all the iptables statements kept saying "iptables who? Do you need to run insmod?" So after some hunting I found all the crap I need to modprobe for it to work: | Code: | $MODPROBE ip_tables
$MODPROBE ipt_conntrack
$MODPROBE iptable_filter
$MODPROBE iptable_mangle
$MODPROBE iptable_nat
$MODPROBE ipt_LOG
$MODPROBE ipt_limit
$MODPROBE ipt_state
$MODPROBE ipt_MASQUERADE
$MODPROBE ipt_REJECT
$MODPROBE ipt_tos |
I tossed that all into the firewall script itself, and that works fine, but is there a centralized place where that crap is supposed to go so it gets loaded at boot? |
I just put it all in my /etc/init.d/rc.firewall and then update-rc.d rc.firewall defaults so it runs at every boot level.
There's probably a more correct way to to it, but that worked quick and easily for me.
|
|
|
Back to top
|
|
|
|
 |
|
|