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:
55- Works out of the box on bridge or host network
66- NAT (Network translation protocol)
77- Has configuration wizard
8+ - LAN protection (does not allow traffic to LANs connected to server)
89
910## Configure
1011
Original file line number Diff line number Diff line change 77# Close OpenVPN port to outside
88ovpn-iptables -D INPUT -p udp -m udp --dport $PORT -j ACCEPT -m comment --comment " Open OpenVPN port"
99
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+
1015# Disable Routing Internet <--> VPN network
1116ovpn-iptables -D FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -j ACCEPT -m comment --comment " Allow traffic VPN --> Internet"
1217ovpn-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 77# Open OpenVPN port to outside
88ovpn-iptables -A INPUT -p udp -m udp --dport $PORT -j ACCEPT -m comment --comment " Open OpenVPN port"
99
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+
1015# Allow Routing Internet <--> VPN network
1116ovpn-iptables -A FORWARD -i tun0 -s $NETWORK_ADDRESS /24 -o eth0 -j ACCEPT -m comment --comment " Allow traffic VPN --> Internet"
1217ovpn-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