Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a explanation for modprobe command !

Status
Not open for further replies.

HaoDr

IS-IT--Management
Sep 26, 2001
32
VN
Hi all,

I have ever read a document directing me to setup a small firewall with IP chains, as follows:
---------------------------------------------------------
Add the following commands into /etc/rc.d/rc.local

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/modprobe ipchains
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -i eth0 -s 172.16.16.0/24 -j MASQ
....
---------------------------------------------------------

So I am wondering why I have to use command "/sbin/modprobe ipchains " ? What does it for ? I always think I have already installed Ipchains package, and of course, it will be loaded at startup process, is it right ? So I don't need use the above command, it seems to be useless, isn't it ?
Please tell me about this issue.

Thanks for your help.

Hao Dr
 
Hi,

Modprobe is similar to 'insmod' except it does dependency checking. If you do 'insmod' it just inserts a module into memory - effectively as an extension to the kernel. Some modules, however, depend (require) other modules. So modprobe checks in modules.dep for dependecies and 'insmod's all the dependent modules plus the one specified on the command line itself. Where does the modules.dep info come from ? From running the depmod -ae command which works out the dependencies.

See 'man modprobe' and 'man depmod'

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top