default.txt 755 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # from the PF FAQ: http://www.openbsd.org/faq/pf/example1.html
  2. # macros
  3. int_if="xl0"
  4. tcp_services="{ 22, 113 }"
  5. icmp_types="echoreq"
  6. comp3="192.168.0.3"
  7. # options
  8. set block-policy return
  9. set loginterface egress
  10. set skip on lo
  11. # FTP Proxy rules
  12. anchor "ftp-proxy/*"
  13. pass in quick on $int_if inet proto tcp to any port ftp \
  14. divert-to 127.0.0.1 port 8021
  15. # match rules
  16. match out on egress inet from !(egress:network) to any nat-to (egress:0)
  17. # filter rules
  18. block in log
  19. pass out quick
  20. antispoof quick for { lo $int_if }
  21. pass in on egress inet proto tcp from any to (egress) \
  22. port $tcp_services
  23. pass in on egress inet proto tcp to (egress) port 80 rdr-to $comp3
  24. pass in inet proto icmp all icmp-type $icmp_types
  25. pass in on $int_if