Ignore:
Timestamp:
Apr 10, 2012, 2:51:13 PM (13 years ago)
Author:
rick
Message:

Merging and cleanups of files found in various other places and trees of SVN.

File:
1 edited

Legend:

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

    r10242 r10417  
    1 wifi_if="wlan0"
    21all_node="172.31.255.1/32"
    3 
    42wl_net="172.16.0.0/12"
    5 vpn_net="172.17.64.0/28"
    63allow_ext_tcp="{22}"
    74allow_ext_udp="{161}"
    8 allow_int_tcp="{22,53,80,3128}"
    9 allow_int_udp="{53,131,161,12345}"
     5allow_int_tcp="{22,3128}"
     6allow_int_udp="{53,161,12345}"
    107allow_int_udp_any="{67}"
    118
     
    1815nat on $int_if from $private to $wl_net -> ($int_if)
    1916
     17# Redirection, needs source natting and allow rules
     18#rdr on $ext_if inet proto tcp from any to $ext_if port 1022 -> 192.168.84.1 port 22   
     19
    2020# Block all
    21 block in on $ext_if
    22 pass in on $int_if
     21block in on $ext_if from any to $ext_if
     22block in on $int_if from any to $int_if
    2323
    24 # Allow wl access from access point (not yet reversed)
    25 pass on $wifi_if from $wl_net to $wl_net
    26 
    27 # Block this device from wifi
    28 block in on $wifi_if inet from any to $wifi_if
    29 block inet from any to $all_node
    30 
     24# Allow private to private
    3125# Enable me to access anything
    32 pass out on {$ext_if, $int_if, $wifi_if} keep state
     26pass out on {$ext_if, $int_if} keep state
    3327
    3428# Allow internet access from the network
    35 pass in on $wifi_if inet proto tcp from $wl_net to any port $publicnat keep state
    36 block in on $wifi_if inet proto tcp from $wl_net to $wifi_if port $publicnat
    37 block in on $wifi_if inet proto tcp from $wl_net to $all_node port $publicnat
     29pass in on $int_if inet proto tcp from $wl_net to any port $publicnat keep state
     30block in on $int_if inet proto tcp from $wl_net to $int_if port $publicnat
    3831
    3932# Allow directives
     
    4134pass in on $ext_if inet proto udp from any to $ext_if port $allow_ext_udp keep state
    4235
    43 pass in on $int_if inet proto tcp from $wl_net to $vpn_net port $allow_int_tcp keep state
    44 pass in on $int_if inet proto udp from $wl_net to $vpn_net port $allow_int_udp keep state
    45 pass in on $int_if inet proto icmp from $wl_net to $vpn_net keep state
    46 pass in on $int_if inet proto udp from any to any port $allow_int_udp_any keep state
    47 
    48 pass in on $wifi_if inet proto tcp from $wl_net to $wl_net port $allow_int_tcp keep state
    49 pass in on $wifi_if inet proto udp from $wl_net to $wl_net port $allow_int_udp keep state
    50 pass in on $wifi_if inet proto icmp from $wl_net to $wl_net keep state
    51 pass in on $wifi_if inet proto udp from any to any port $allow_int_udp_any keep state
     36pass in on $int_if inet proto tcp from $wl_net to $int_if port $allow_int_tcp keep state
     37pass in on $int_if inet proto udp from $wl_net to $int_if port $allow_int_udp keep state
     38pass in on $int_if inet proto icmp from $wl_net to $int_if keep state
    5239
    5340# Allow wl access from local network
     
    5542
    5643# Make sure to block local network access from wl
    57 block on $wifi_if from $wl_net to $private
    5844block on $int_if from $wl_net to $private
    5945
     46# Otherwise lvrouted breaks:
     47pass in on $int_if
Note: See TracChangeset for help on using the changeset viewer.