Disable loading kernel modules

Hi,

I am running CentOS 6.5 and I want to remove auto loading 8021q and garp modules, but there are no configure files in /etc/modprobe.d define bot modules.

I even added both module names to /etc/modprobe.d/blacklist.conf , both of them are still loaded after the reboot. How can I disable both modules from boot?

$ lsmod | grep 8021q
8021q                  25317  0 
garp                    7152  1 8021q

Thank you.

Rename them then reboot. Be sure to have a rescue disk handy...

1 Like

Try this: in modprobe.d create a new file called 8021q. In it, put the lines:

install 8021q /bin/true
install garp /bin/true

This tells the kernel to use non-standard versions of 8021q and garp from a file called /bin/true. /bin/true won't supply usable versions and the modules will not work. The NSA uses this trick in their linux hardeneing docs to disable stuff not intended to be disabled.

1 Like