Sunday, July 01, 2007

Three jump - the mostly used on IPTABLES

There's about 27 jump on IPTABLES. But only three jump that's usually used by firewall mostly.
They are ACCEPT, DROP, and REJECT.

ACCEPT - have function to allow packet if rule is true or accepted.
eg :
iptables -A INPUT -p tcp -d 192.168.0.2 --dport 22 -j ACCEPT
(this mean if destination packet is IP (192.168.0.2) and destination port is 22 and use protocol tcp, allow input packet)

DROP - have function to drop or reject packet (without acknowledge to sender) if rule is true or accepted.
eg :
iptables -A INPUT -p tcp -d 192.168.0.2 --dport 22 -j DROP
(this mean if destination packet is IP (192.168.0.2) and destination port is 22 and use protocol tcp, reject or drop input packet without acknowledge to sender)


REJECT - have function to drop or reject packet (with acknowledge to sender) if rule is true or accepted.
eg :
iptables -A INPUT -p tcp -d 192.168.0.2 --dport 22 -j REJECT
(this mean if destination packet is IP (192.168.0.2) and destination port is 22 and use protocol tcp, reject or drop input packet with acknowledge to sender)

That's all for today.

Please give me comment if I need to repair something or add something on it.

Thanks.