reaim.init 601 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. #FWINIT 75
  3. . /etc/rc.conf
  4. IPT=/usr/sbin/iptables
  5. WAN=${reaim_flags}
  6. case $1 in
  7. autostop) ;;
  8. autostart)
  9. test x"${reaim:-NO}" = x"NO" && exit 0
  10. exec sh $0 start
  11. ;;
  12. start)
  13. $IPT -A input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
  14. $IPT -A input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
  15. $IPT -A input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT
  16. $IPT -A input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT
  17. reaim
  18. ;;
  19. stop)
  20. killall reaim
  21. ;;
  22. restart)
  23. sh $0 stop
  24. sh $0 start
  25. ;;
  26. *)
  27. echo "Usage: $0 {start | stop | restart}"
  28. exit 1
  29. ;;
  30. esac
  31. exit $?