Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. *filter
  2. :INPUT DROP [0:0]
  3. :FORWARD ACCEPT [0:0]
  4. :OUTPUT ACCEPT [0:0]
  5. :sshguard - [0:0]
  6.  
  7. -A INPUT -i enp3s0 -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT -m comment --comment "Allow incoming SSH"
  8. -A INPUT -i enp3s0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT -m comment --comment "Allow outgoing SSH"
  9. -A INPUT -i enp3s0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT -m comment --comment "Allow incoming HTTP"
  10. -A INPUT -i enp3s0 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT -m comment --comment "Allow incoming HTTPS"
  11. -A INPUT -i enp3s0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT -m comment --comment "Allow outgoing HTTP"
  12. -A INPUT -i enp3s0 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT -m comment --comment "Allow outgoing HTTPS"
  13. -A INPUT -i enp3s0 -p udp --sport 53 -j ACCEPT -m comment --comment "Allow outgoing DNS"
  14.  
  15. -A INPUT -i lo -j ACCEPT -m comment --comment "Allow ALL from localhost"
  16.  
  17. -A INPUT -p icmp --icmp-type echo-request -j ACCEPT -m comment --comment "Allow incoming ping"
  18. -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT -m comment --comment "Allow outgoing ping"
  19. -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT -m comment --comment "Prevent DoS attacks"
  20. -A INPUT -p tcp --dport 443 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT -m comment --comment "Prevent DoS attacks"
  21. -A INPUT -p tcp -m tcp --dport 22 -j sshguard -m comment --comment "SSH access protection"
  22. COMMIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement