Using iptables to block incomming traffic but not effect outgoing traffic.

Solution:

iptables -F INPUT
iptables -A INPUT -m state –state ESTABLISHED -j ACCEPT
iptables -A INPUT -j REJECT

The below command permits incomming packets only if they are part of established outgoing connections.

iptables -A INPUT -m state –state ESTABLISHED -j ACCEPT

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.