Advertisement
Guest User

pf.conf

a guest
Mar 14th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. ################ Interfaces
  2. int_if="em1"
  3. ext_if="em0"
  4.  
  5. ################ Ports
  6. vpn_ports="1701"
  7. icmp_types="{echoreq, unreach}"
  8.  
  9. ################ Networks
  10. net_my_local="192.168.0.0/16"
  11.  
  12. ################ IPs
  13. srv="192.168.0.245"
  14.  
  15. ################ Set RETURN instead of DROP
  16. set block-policy return
  17.  
  18. ################ Allow lo0 and local network
  19. set skip on lo0
  20. set skip on $int_if
  21.  
  22. ################ Normalize all incoming packets on all
  23. ################ interfaces (making packet from fragments
  24. ################ on gateway then sending further)
  25. scrub in all
  26. scrub out all
  27.  
  28. ####################################################################
  29. ####################################################################
  30. ## NAT
  31. ####################################################################
  32. nat on $ext_if from $net_my_local to any -> $ext_if
  33.  
  34. ####################################################################
  35. ####################################################################
  36. ## Redirects
  37. ####################################################################
  38.  
  39. rdr pass log on $ext_if inet proto tcp to 92.62.XX.XX port 25 -> $srv port 25
  40.  
  41. ############### Antispoof
  42. antispoof quick for $ext_if
  43.  
  44. ####################################################################
  45. ####################################################################
  46. ## Policies
  47. ####################################################################
  48. #block log all
  49.  
  50. ################ Pass PPTP port in
  51. #pass in quick on $ext_if inet proto tcp to $ext_if port 1723
  52.  
  53. ################ Pass PPTP clients to internal service IP
  54. #pass in quick from $net_vpn_local to $ip_my_vpn
  55.  
  56. ################ Pass SRV from world
  57. pass in log on $ext_if inet proto tcp from any to $ext_if port 25
  58.  
  59. ################ Pass all out from me and my lan
  60. pass out log on $ext_if from $ext_if to any
  61. pass out log on $ext_if from $net_my_local to any
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement