Archive for the tag 'block incomming traffic'

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