Basic iptables command


assalamualaikum all :D
malem2 gini ga bisa tidur -_- , Galau Mode On
dan Ga Bisa kill pid nya / udah kaya kena fork Bomb Galau ..hahaha-

Oke lanjut daripada ane galau mending menulis aja dah..

kemaren udah di pelajari Dasar-dasar ttg Firewall iptables.
and Now i am just give example for iptables :P
this is Firewall Linux. So important for SysAdmin.

check out..

1. Basic Comand iptables

[#] Install :
~ sudo apt-get install iptables

[#] Start , Stop and Restart iptables :
/etc/init.d/iptables start
~ /etc/init.d/iptables stop
~ /etc/init.d/iptables restart

[#] Put iptables on startup
~ chkconfig iptables on

[#] Show iptables status
~ service iptables status

[#] Show configuration iptables
~ iptables -L -n -v

2. Block Incoming Packet from spesific IP
iptables -I INPUT -s 192.168.0.149 -j REJECT

3. Block output packet
iptables -A OUTPUT -p tcp -d 192.168.10.2 -j DROP

4. Close some Port
iptables -A INPUT -p tcp  --dport 22 -j REJECT
*Block port 22 for SSH

5.Delete Rules
[#] For specific Rules
iptables -D INPUT 3

[#] For all Rules
iptables -F FORWARD

Oke it is SOme Example from me :P
and you can get all command " iptables -h " :P
./logout wassalam
Title : Basic iptables command
Description : assalamualaikum all :D malem2 gini ga bisa tidur -_- , Galau Mode On dan Ga Bisa kill pid nya / udah kaya kena fork Bomb Galau ..hahah...

0 Response to "Basic iptables command"

Post a Comment