tonywhitmore.co.uk  

      blog : gallery : wiki : articles : projects : shell scripts : wallpaper : cv : links :
 Project Homepage

Netfilter Iptables

Preparation

  1. Download the iptables source code from www.iptables.org.
  2. Burn the file iptables-1.2.7a.tar.bz2 to a CD. This page assumes that the subdirectory /apps is used for the .tar.bz2 file. The CD-ROM can be a multi-session disk.

Give me more details on this

Booting

  1. Boot your Core Linux PC.
  2. Login as root. You will need to enter the password at the prompt.

Give me more details on this

Extract the source

  1. Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under /mnt/cdrom.
  2. Change to the /apps directory on the CD-R.
  3. Copy the iptables-1.2.7a.tar.bz2 file to the directory /usr/src.
  4. Change to the /usr/src directory and extract the source from the .tar.bz2 file.

Give me more details on this

Configure and compile

  1. Change to the /usr/src/iptables-1.2.7a directory.
  2. Run the make program as shown below:
    make BINDIR=/usr/bin LIBDIR=/usr/lib MANDIR=/usr/man KERNEL_DIR=/usr/src/linux
  3. Run the make program as shown below:
    make BINDIR=/usr/bin LIBDIR=/usr/lib MANDIR=/usr/man KERNEL_DIR=/usr/src/linux install

Give me more details on this

Initial Testing

  1. Ping the IP address 127.0.0.1. Your pings should be returned.
  2. Add the following rule using the iptables command:
    iptables -A INPUT -s 127.0.0.1 -p icmp -j DROP
  3. Ping the IP address 127.0.0.1. Your pings should not be returned.

Give me more details on this

Setting up iptables

Automating iptables

  1. Create a script called /etc/firewall listing all your iptables rules.
  2. Change the properties of the file /etc/firewall to make it executable.
  3. Append the following line to the /etc/rc.d/rc.mu script:
    /etc/firewall
    You can also add comments and echoes for your own information.
  4. Reboot the system and check that your firewall rules are implemented.

Give me more details on this

Creative Commons License
The text of this page is licensed under a Creative Commons License.


Valid CSS!     Valid HTML 4.0!     Valid RSS
Original design © For oswd.org by SquireCD