1
0

firewall6.init 426 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #PKG ip6tables
  3. #INIT 45
  4. . /etc/rc.conf
  5. case $1 in
  6. autostop) ;;
  7. autostart)
  8. test x"${firewall6:-NO}" = x"NO" && exit 0
  9. exec sh $0 start
  10. ;;
  11. start)
  12. . /etc/firewall6.conf
  13. ;;
  14. stop)
  15. ### Clear tables
  16. ip6tables -F
  17. ip6tables -X
  18. ip6tables -P INPUT ACCEPT
  19. ip6tables -P FORWARD ACCEPT
  20. ip6tables -P OUTPUT ACCEPT
  21. ;;
  22. restart)
  23. sh $0 stop
  24. sh $0 start
  25. ;;
  26. *)
  27. echo "Usage: $0 {start | stop | restart}"
  28. ;;
  29. esac
  30. exit $?