clients: Add support for static subnet
* Allow static clients to be placed on 192.168.254.0/24 subnet.
This commit is contained in:
parent
5e3c9719c8
commit
26a14d2f4b
@ -36,7 +36,9 @@ persist-key
|
||||
persist-tun
|
||||
push "dhcp-option DNS 8.8.4.4"
|
||||
push "dhcp-option DNS 8.8.8.8"
|
||||
|
||||
client-config-dir $OPENVPN/ccd
|
||||
route 192.168.254.0 255.255.255.0
|
||||
|
||||
proto udp
|
||||
port 1194
|
||||
|
@ -15,6 +15,9 @@ if [ ! -d "$OPENVPN/ccd" ]; then
|
||||
mkdir -p /etc/openvpn/ccd
|
||||
fi
|
||||
|
||||
# Static subnet
|
||||
iptables -t nat -A POSTROUTING -s 192.168.254.0/24 -o eth0 -j MASQUERADE
|
||||
# Dynamic subnet
|
||||
iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE
|
||||
|
||||
openvpn --config "$OPENVPN/udp1194.conf"
|
||||
|
Loading…
Reference in New Issue
Block a user