firewall.conf 551 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # firewall command
  3. FwCMD="/sbin/ipfw -q"
  4. ${FwCMD} -f flush
  5. # Networks defines
  6. # Safe zones
  7. ${FwCMD} table 22 add 127.0.0.1
  8. # Safe zones allow policy
  9. ${FwCMD} add 45 allow ip from table\(22\) to me
  10. ${FwCMD} add 45 allow ip from me to table\(22\)
  11. # ssh access.
  12. #${FwCMD} add 46 deny ip from any to me dst-port 22
  13. #${FwCMD} add 46 deny ip from me to any src-port 22
  14. # mysql access
  15. ${FwCMD} add 47 deny ip from any to me dst-port 3306
  16. ${FwCMD} add 47 deny ip from me to any src-port 3306
  17. ${FwCMD} add 65535 allow all from any to any