Advertisement
Guest User

iptables

a guest
Feb 19th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh -e
  2. #
  3. # rc.local
  4. #
  5. # This script is executed at the end of each multiuser runlevel.
  6. # Make sure that the script will "exit 0" on success or any other
  7. # value on error.
  8. #
  9. # In order to enable or disable this script just change the execution
  10. # bits.
  11. #
  12. # By default this script does nothing.
  13.  
  14. ##Iptables firewall settings
  15. iptables --flush
  16. iptables --table nat --flush
  17. iptables --delete-chain
  18. iptables --table nat --delete-chain
  19. iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
  20. iptables --append FORWARD --in-interface wlan0 -j ACCEPT
  21. ##REQIRED IPTABLES RULES FOR IODINE
  22. iptables -t filter -A FORWARD -i eth0 -o dns0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  23. iptables -t filter -A FORWARD -i dns0 -o eth0 -j ACCEPT
  24. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement