• RSS
  • Twitter
  • FaceBook

Re-compiling the Kernel

LAN support might not enabled yet, depending on the particular Linux distribution and version you have. (RedHat Linux 5.2 comes with the necessary modules configured.) You may need to recompile the kernel first.

RedHat Linux 5.2 comes with the necessary modules configured. For earlier versions specific ethernet drivers, LAN, masquerading and firewall support might not be enabled yet. You might need to recompile the kernel first.

In either case, re-compiling the kernel is a good idea. You can remove unneeded features, choose which features should be linked in and which should be dynamically loaded modules, and compile an executable for your specific CPU type.

This isn't as scary as it sounds. Take a deep breath. It'll be ok. <trust me>  ;-)

This step will be much easier if you're running X Windows. I'm assuming that you are. Also, be sure to read the manual for caveats.

cd /usr/src/linux
make mrproper
make xconfig

xconfig will present you with a long series of dialogues. Almost every item has a descriptive help section attached to it. Be sure to enable these:

  • loadable module support
  • kernel daemon support (for autoloading modules)
  • networking support
  • network firewalls
  • TCP/IP networking
  • <your driver(s)>
  • IP: forwarding/gatewaying
  • IP: syn cookies
  • IP: firewall packet logging
  • IP: masquerading
  • ICMP: masquerading (if you want to ping from an internal machine)
  • IP: accounting
  • IP: drop source routed frames

make dep
make clean
make boot
make modules
cd /lib/modules
mv <the current version directory> <the current version directory>.o
riginal
cd /usr/src/linux
make modules_install
cd /boot
mv vmlinuz.<version> vmlinuz.original
cp /usr/src/linux/arch/i386/boot/zImage ./vmlinuz.new
ln -fs vmlinuz.new vmlinuz
mv System.map.<version> System.map.original
cp /usr/src/linux/System.map ./System.map.new
ln -fs System.map.new System.map
cd /etc

You're almost ready to reboot!

Receive all the latest articles by email!

Get all articles delivered directly to your mailbox as and when they are released on WindowSecurity.com! Choose between receiving instant updates with the Real-Time Article Update, or a monthly summary with the Monthly Article Update. Sign up to the WindowSecurity.com Monthly Newsletter, written by George Chetcuti, BSc in Computing & IS (Honors), containing news, the hottest tips, security links of the month and much more. Subscribe today and don't miss a thing!



Receive all the latest articles by email!

Receive Real-Time & Monthly WindowSecurity.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowSecurity.com member!

Discuss your security issues with thousands of other network security experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Event Log Monitoring solution?