SHARE
TWEET

Untitled

a guest Jun 19th, 2017 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Limit the number of incoming tcp connections
  2. # Interface 0 incoming syn-flood protection
  3. iptables -N syn_flood
  4. iptables -A INPUT -p tcp --syn -j syn_flood
  5. iptables -A syn_flood -m limit --limit 1/s --limit-burst 3 -j RETURN
  6. iptables -A syn_flood -j DROP
  7. #Limiting the incoming icmp ping request:
  8. iptables -A INPUT -p icmp -m limit --limit  1/s --limit-burst 1 -j ACCEPT
  9.  
  10. iptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 1 -j LOG --log-prefix PING-DROP:
  11. iptables -A INPUT -p icmp -j DROP
  12.  
  13. iptables -A OUTPUT -p icmp -j ACCEPT
RAW Paste Data
Top