How to enable IPTABLES support in Linux Kernel

You need to recompile kernel to enable IPTABLES support.

Get into the kernel source directory:

# cd /usr/local/src/kernel [download kernel source from kernel.org]
# Copy your current running kernel config.
# make menuconfig

Networking >> Networking options >> Network packet filtering (replaces ipchains) >> IP: Net Filter configurationS >> IP Tables support

# make
# make modules
# make modules_install
# make install

Move to /boot/grub and then modify your current grub config to load the new kernel.

Reinstall Grub Boot Loader

GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.

You can re-install grub by linux rescue method:

1) Put the 1st bootable linux cd on cdrom.
2) Reboot the system.
3) At boot prompt type “linux rescue” without quotes.
4) You will get a shell prompt.
5) Give command chroot /mnt/sysimage
6) Run: grub-install /dev/hda (primary master)

grub-install /dev/hda

7) Reboot the system

How to mount a linux LVM volume

You can check the disk that is using the LVM volume by using the command fdisk -l

# fdisk -l

You can run the command “pvs” to get the volume group.

# pvs

You can run lvdisplay /dev/”volume group”
This will display the list of logical volumes in the volume group

#lvdisplay /dev/VolGroup00

The volume group here is VolGroup00

# Mount the partition

mount /dev/VolGroup00/LogVol00 /home

The Logical volume here is LogVol00

Network Address Translation

PREROUTING

Address translation occurs before routing.

Facilitates the transformation of the destination IP address to be compatible with the firewall’s routing table.
Used with NAT of the destination IP address, also known as destination NAT or DNAT.

POSTROUTING

Address translation occurs after routing.

This implies that there was no need to modify the destination IP address of the packet as in pre-routing. Used with NAT of the source IP address using either one-to-one or many-to-oneNAT. This is known as source NAT, or SNAT.


YUM packages updater

Yum Commands

YUM packages updater (Fedora, RedHat and alike)

Download and install a rpm package

yum install package_name

This will install an RPM, and try to resolve all the dependencies for you using your repositories.

yum localinstall package_name.rpm

Update all rpm packages installed on the system

yum update

Upgrade a rpm package

yum update package_name

Remove a rpm package

yum remove package_name

List all packages installed on the system

yum list

Find a package on rpm repository

yum search package_name

Clean up rpm cache erasing downloaded packages

yum clean packages

Remove all files headers that the system uses to resolve dependency

yum clean headers

Remove from the cache packages and headers files

yum clean all

« Prev - Next »