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 18:42
download | new post

  1.  
  2. #!/bin/bash
  3. #iptables config script
  4. echo `date +%y-%m-%d--%H%M` "Running firewall rules"
  5.  
  6. IPTABLES='/sbin/iptables'
  7.  
  8.  
  9. ### start by reverting to defaults
  10.  
  11. $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  12.  
  13.  
  14. #Set default policy to allow all incoming and outgoing, and drop forwarding
  15. $IPTABLES -P INPUT ACCEPT
  16. $IPTABLES -P FORWARD DROP
  17. $IPTABLES -P OUTPUT ACCEPT
  18. $IPTABLES -t raw -P OUTPUT ACCEPT
  19. $IPTABLES -t raw -P PREROUTING ACCEPT
  20. $IPTABLES -t nat -P OUTPUT ACCEPT
  21. $IPTABLES -t nat -P PREROUTING ACCEPT
  22. $IPTABLES -t nat -P POSTROUTING ACCEPT
  23.  
  24. $IPTABLES --flush
  25. $IPTABLES -t nat --flush
  26. $IPTABLES -t raw --flush
  27. $IPTABLES -X
  28. $IPTABLES -t nat -X
  29. $IPTABLES -t raw -X
  30.  
  31. #TF2 Public
  32. $iptables -A INPUT -i eth0 -p tcp --sport 27095 -m state --state ESTABLISHED -j ACCEPT
  33.  
  34. #Minecraft, map, admin
  35. $IPTABLES -A INPUT -i eth0 -p tcp --sport 25565 -m state --state ESTABLISHED -j ACCEPT
  36. $IPTABLES -A INPUT -i eth0 -p tcp --sport 8123 -m state --state ESTABLISHED -j ACCEPT
  37. $IPTABLES -A INPUT -i eth0 -p tcp --sport 27999 -m state --state ESTABLISHED -j ACCEPT
  38.  
  39. #Mumble
  40. $IPTABLES -A INPUT -i eth0 -p tcp --sport 64738 -m state --state ESTABLISHED -j ACCEPT
  41.  
  42. #ssh
  43. $IPTABLES -A INPUT -i eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
  44.  
  45. #www
  46. $IPTABLES -A INPUT -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
  47.  
  48. #NOTHING ELSE
  49. #$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