- client <-> OpenVPN <-> Internet
- Define IPs statically
- Modify IP assignments without restarting OpenVPN
My current configuration allows clients to connect, get a dynamically assigned IP from the "server" pool, and all traffic is tunneled through the VPN (besides RFC1918 space). This is perfect aside from the dynamically assigned IP.
What I've tried:
- Using the server's ifconfig-pool-persist option I can specify common name to IP mappings. However, this seems to require a full service restart to pick up changes. Is there some other way to pick up changes here besides a service restart? Restart is impractical as it causes currently connected clients to stall / lose connection.
- Using client-config-dir option and specifying in each client's ccd file "ifconfig-push client_ip 255.255.255.255 I can correctly assign specific clients the correct IP. However, when I do this, clients no longer tunnel traffic through the VPN! Why?
- Have yet to try client-connect script but I do expect this to be have the same as option (2) above.
server 10.5.0.0 255.255.0.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 126.96.36.199"
keepalive 10 120
ifconfig-push 10.5.0.1 255.255.255.255
remote server_ip port
route 10.0.0.0 255.0.0.0 net_gateway
route 127.0.0.0 255.0.0.0 net_gateway
route 172.16.0.0 255.240.0.0 net_gateway
route 192.168.0.0 255.255.0.0 net_gateway
route 188.8.131.52 255.255.255.0 net_gateway