Ignore:
Timestamp:
May 6, 2012, 10:42:31 PM (13 years ago)
Author:
rick
Message:

Provide an working example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/etc/pf.hybrid.conf

    r10610 r10694  
    5454nat on $ext_if inet proto tcp from $wl_net to any port { $publicnat } -> ($ext_if)
    5555
    56 # Redirect some internal facing services outside, please mind also need allow rules (bottom of file) (7)
    57 rdr on $ext_if inet proto tcp from any to $ext_if port 8081 -> 172.16.4.46 port http
    5856
    5957# Redirect user to captive portal they have not clicked OK yet (6)
    6058no rdr on { $captive_portal_interfaces } proto tcp from <wlportal> to !$wl_net port http
    6159rdr on { $captive_portal_interfaces } proto tcp from $wl_net to !$wl_net port http -> 172.31.255.1 port 8081
     60
     61# Redirect some internal facing services outside (7)
     62rdr on $ext_if inet proto tcp from any to $ext_if port 8081 tag SRV -> 172.16.4.46 port http
     63
     64# Make the device on WL find the proper gateway back (7)
     65nat on ! $ext_if inet from any to $wl_net tagged SRV -> $masterip
     66
     67# Special allow rules for inbound piercing (7)
     68pass in quick on $ext_if inet tagged SRV keep state
    6269
    6370# Localhost is considered safe (5)
     
    8491pass in on $ext_if from $private to $wl_net keep state
    8592
    86 # Allow exposing some (internal) WL Services to the inet - see rdr on top as well (7)
    87 pass in on $ext_if inet proto tcp from any to $ext_if port { 8081 } keep state
    88 
    8993# Packets going out are the ones to the internet with an certain limit (1)
    9094pass out on $ext_if inet proto tcp from $wl_net to any port { $publicnat } keep state \
Note: See TracChangeset for help on using the changeset viewer.