pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by Ex on Sat 23rd Jun 17:41
download | new post

  1. #!/bin/bash
  2. #iptables config script
  3. echo `date +%y-%m-%d--%H%M` "Running firewall rules"
  4.  
  5. IPTABLES='/sbin/iptables'
  6.  
  7.  
  8. ### start by reverting to defaults
  9.  
  10.  
  11. #Set default policy to allow all incoming and outgoing, and drop forwarding
  12. $IPTABLES -P INPUT ACCEPT
  13. $IPTABLES -P FORWARD DROP
  14. $IPTABLES -P OUTPUT ACCEPT
  15. $IPTABLES -t raw -P OUTPUT ACCEPT
  16. $IPTABLES -t raw -P PREROUTING ACCEPT
  17. $IPTABLES -t nat -P OUTPUT ACCEPT
  18. $IPTABLES -t nat -P PREROUTING ACCEPT
  19. $IPTABLES -t nat -P POSTROUTING ACCEPT
  20.  
  21. #Remove rules from all chains, and remove user-defined chains, in default and nat tables
  22. #If any other tables are used they should be added here
  23. $IPTABLES --flush
  24. $IPTABLES -t nat --flush
  25. $IPTABLES -t raw --flush
  26. $IPTABLES -X
  27. $IPTABLES -t nat -X
  28. $IPTABLES -t raw -X
  29.  
  30. #TF2 Public
  31. iptables -A INPUT -i eth0 -p tcp --sport 27095 -m state --state ESTABLISHED -j ACCEPT
  32.  
  33. #Minecraft, map, admin
  34. iptables -A INPUT -i eth0 -p tcp --sport 25565 -m state --state ESTABLISHED -j ACCEPT
  35. iptables -A INPUT -i eth0 -p tcp --sport 8123 -m state --state ESTABLISHED -j ACCEPT
  36. iptables -A INPUT -i eth0 -p tcp --sport 27999 -m state --state ESTABLISHED -j ACCEPT
  37.  
  38. #Mumble
  39. iptables -A INPUT -i eth0 -p tcp --sport 64738 -m state --state ESTABLISHED -j ACCEPT
  40.  
  41. $IPTABLES -A INPUT -j DROP

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@


Remember my settings