File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
root/defaults/example/config/basic_nat Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Features:
5
5
- Works out of the box on bridge or host network
6
6
- NAT (Network translation protocol)
7
7
- Has configuration wizard
8
+ - LAN protection (does not allow traffic to LANs connected to server)
8
9
9
10
## Configure
10
11
Original file line number Diff line number Diff line change 7
7
# Close OpenVPN port to outside
8
8
ovpn-iptables -D INPUT -p udp -m udp --dport $PORT -j ACCEPT -m comment --comment " Open OpenVPN port"
9
9
10
+ # Disable LAN protection of VPN
11
+ ovpn-iptables -D FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 10.0.0.0/8 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
12
+ ovpn-iptables -D FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 192.168.0.0/16 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
13
+ ovpn-iptables -D FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 172.16.0.0/12 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
14
+
10
15
# Disable Routing Internet <--> VPN network
11
16
ovpn-iptables -D FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -j ACCEPT -m comment --comment " Allow traffic VPN --> Internet"
12
17
ovpn-iptables -D FORWARD -i eth0 -d $NETWORK_ADDRESS /24 -o tun0 -j ACCEPT -m comment --comment " Allow traffic Internet --> VPN"
Original file line number Diff line number Diff line change 7
7
# Open OpenVPN port to outside
8
8
ovpn-iptables -A INPUT -p udp -m udp --dport $PORT -j ACCEPT -m comment --comment " Open OpenVPN port"
9
9
10
+ # Protect LANs after VPN
11
+ ovpn-iptables -A FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 10.0.0.0/8 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
12
+ ovpn-iptables -A FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 192.168.0.0/16 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
13
+ ovpn-iptables -A FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -d 172.16.0.0/12 -j REJECT -m comment --comment " Drop traffic VPN --> LANs"
14
+
10
15
# Allow Routing Internet <--> VPN network
11
16
ovpn-iptables -A FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -j ACCEPT -m comment --comment " Allow traffic VPN --> Internet"
12
17
ovpn-iptables -A FORWARD -i eth0 -d $NETWORK_ADDRESS /24 -o tun0 -j ACCEPT -m comment --comment " Allow traffic Internet --> VPN"
You can’t perform that action at this time.
0 commit comments