Line | |
---|
1 | ext_if="sis0"
|
---|
2 | int_if="tap0"
|
---|
3 | wifi_if="wlan0"
|
---|
4 |
|
---|
5 | wl_net="172.16.0.0/12"
|
---|
6 | vpn_net="172.17.64.0/28"
|
---|
7 |
|
---|
8 | publicnat="{80, 443}"
|
---|
9 | allow_ext_tcp="{22}"
|
---|
10 | allow_ext_udp="{161}"
|
---|
11 | allow_int_tcp="{22,53,80,3128,12345}"
|
---|
12 | allow_int_udp="{53,67,68,131,161,12345}"
|
---|
13 |
|
---|
14 | private="{ 10.0.0.0/8 , 192.168.0.0/16 }"
|
---|
15 |
|
---|
16 | # Nat the internet
|
---|
17 | nat on $ext_if from $wl_net to any port $publicnat -> ($ext_if)
|
---|
18 |
|
---|
19 | # Nat local wl access
|
---|
20 | nat on $int_if from any to $wl_net -> ($int_if)
|
---|
21 | pass on $ext_if from any to $wl_net keep state
|
---|
22 |
|
---|
23 | # Block all
|
---|
24 | block in on $ext_if
|
---|
25 | pass in on $int_if
|
---|
26 |
|
---|
27 | # Make sure to block local network access from wl
|
---|
28 | block out on $ext_if from $wl_net to $private
|
---|
29 |
|
---|
30 | # Allow wl access from access point (not yet reversed)
|
---|
31 | pass on $wifi_if from $wl_net to $wl_net
|
---|
32 |
|
---|
33 | # Allow directives
|
---|
34 | pass in on $ext_if inet proto tcp from any to $ext_if port $allow_ext_tcp keep state
|
---|
35 | pass in on $ext_if inet proto udp from any to $ext_if port $allow_ext_udp keep state
|
---|
36 | pass in on $int_if inet proto tcp from any to $vpn_net port $allow_int_tcp keep state
|
---|
37 | pass in on $int_if inet proto udp from any to $vpn_net port $allow_int_udp keep state
|
---|
38 | pass in on $int_if inet proto icmp from $wl_net to $vpn_net keep state
|
---|
39 |
|
---|
40 | # Enable statefull firewalling
|
---|
41 | pass out on {$ext_if, $int_if} keep state
|
---|
42 |
|
---|
43 |
|
---|
44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.