Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. iptables -F
  2. iptables -X
  3.  
  4. iptables -N DENY
  5. iptables -A DENY -p tcp -m tcp -m limit --limit 30/sec --limit-burst 100 -m comment --comment "Anti-DoS" -j REJECT --reject-with tcp-reset
  6. iptables -A DENY -m limit --limit 30/sec --limit-burst 100 -m comment --comment "Anti-DoS" -j REJECT --reject-with icmp-proto-unreachable
  7. iptables -A DENY -m comment --comment "Alles andere ignorieren" -j DROP
  8.  
  9. iptables -N SERVICES
  10. iptables -A SERVICES -p tcp -m tcp --dport 53 -m comment --comment "Erlaube: DNS" -j ACCEPT
  11. iptables -A SERVICES -p udp -m udp --dport 53 -m comment --comment "Erlaube: DNS" -j ACCEPT
  12. iptables -A SERVICES -p tcp -m tcp --dport 22 -m comment --comment "Erlaube: SSH-Zugriff" -j ACCEPT
  13. iptables -A SERVICES -j RETURN
  14.  
  15. iptables -N TEAMSPEAK
  16. iptables -A TEAMSPEAK -p tcp -m tcp --dport 2008 -m comment --comment "Erlaube: TeamSpeak Accounting" -j ACCEPT
  17. iptables -A TEAMSPEAK -p udp -m udp --dport 9987 -m comment --comment "Erlaube: TeamSpeak Voiceport" -j ACCEPT
  18. iptables -A TEAMSPEAK -p udp -m udp --dport 9988 -m comment --comment "Erlaube: TeamSpeak Voiceport" -j ACCEPT
  19. iptables -A TEAMSPEAK -p tcp -m tcp --dport 10011 -m comment --comment "Erlaube: TeamSpeak ServerQuery" -j ACCEPT
  20. iptables -A TEAMSPEAK -p tcp -m tcp --dport 30033 -m comment --comment "Erlaube: TeamSpeak Avatar" -j ACCEPT
  21. iptables -A TEAMSPEAK -p tcp -m tcp --dport 41144 -m comment --comment "Erlaube: TeamSpeak TSDNS" -j ACCEPT
  22. iptables -A TEAMSPEAK -j RETURN
  23.  
  24. iptables -A INPUT -i lo -m comment --comment "Erlaube: Loopback" -j ACCEPT
  25. iptables -A INPUT -m state --state RELATED,ESTABLISHED -m comment --comment "Erlaube: Related und Established Verbindungen" -j ACCEPT
  26. iptables -A INPUT -m comment --comment "Erlaube Standard Dienste" -j SERVICES
  27. iptables -A INPUT -m comment --comment "Erlaube TeamSpeak Dienste" -j TEAMSPEAK
  28. iptables -A INPUT -p icmp -m comment --comment "Erlaube: ICMP" -j ACCEPT
  29. iptables -A INPUT -m comment --comment "Ignoriere alles andere" -j DENY
  30. iptables -P INPUT DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement