Pages

Monday 5 December 2011

IPTABLES on Debian ?? HOW TO

Installing IPTABLES on Debian ::

install required component, all done with one command :

aptitude update && aptitude -u full-upgrade && aptitude install iptables && aptitude clean

or u can check the cache that the programs installed correctly on your machine :

                 dpkg -l iptables

n u will see the screenshot like this :
and seewhere is the places that already installed :
if you cannot see that, then it done with :

                 apt-get update && apt-get install iptables

now, we need to create test rules.,

                 nano /etc/iptables.angel.rules

you can downloads my rules from this site

store them :

                   iptables-restore < /etc/iptables.angel.rules

and :           iptables -L

if you satisfied with that, now we need to save them :

                    iptables-save > /etc/iptables.devil.rules

and init the scripts on network interfaces 

                     nano /etc/network/if-pre-up.d/iptables

inside if.pre.up file you create, insert :
  #!/bin/bash
  /sbin/iptables-restore < /etc/iptables.devil.rules

and now we make it exetutable

                      chmod +x /etc/network/if-pre-up.d/iptables

we must add too the scripts on network configurations :

                      nano /etc/network/interfaces

and insert : "pre-up iptables-restore < /etc/iptables.devil.rules"

after two files, look at screenshot :

done.!!

No comments:

Post a Comment

How About it.

Note: only a member of this blog may post a comment.