Last change
on this file since 10200 was 10200, checked in by richardvm, 13 years ago |
Blocking local access (natting prefent current setup
|
File size:
1.3 KB
|
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 on $wifi_if from $wl_net to $private
|
---|
29 | block on $int_if from $wl_net to $private
|
---|
30 |
|
---|
31 | # Allow wl access from access point (not yet reversed)
|
---|
32 | pass on $wifi_if from $wl_net to $wl_net
|
---|
33 |
|
---|
34 | # Allow directives
|
---|
35 | pass in on $ext_if inet proto tcp from any to $ext_if port $allow_ext_tcp keep state
|
---|
36 | pass in on $ext_if inet proto udp from any to $ext_if port $allow_ext_udp keep state
|
---|
37 | pass in on $int_if inet proto tcp from any to $vpn_net port $allow_int_tcp keep state
|
---|
38 | pass in on $int_if inet proto udp from any to $vpn_net port $allow_int_udp keep state
|
---|
39 | pass in on $int_if inet proto icmp from $wl_net to $vpn_net keep state
|
---|
40 |
|
---|
41 | # Enable statefull firewalling
|
---|
42 | pass out on {$ext_if, $int_if} keep state
|
---|
43 |
|
---|
44 |
|
---|
45 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.