Posted: Fri Mar 17, 2017 22:43 Post subject: OpenVPN working properly in Router mode, but not in Gateway
I'm running a Netgear R6300 v1, build v3.0-r31690 giga. When running in Router mode behind my ISP provided gateway, I'm able to connect to OpenVPN with full functionality. When I switch to Gateway mode and take my ISP provided gateway out of the equation, I'm able to connect to OpenVPN from an outside network, I receive what looks like an appropriate IP address, but I'm not able to communicate with any other devices or subnets, the assigned DHCP server, or the VPN router. The client does not receive a default gateway, or DNS server, and has a netmask of 255.255.255.252, which seems strange to me. My LAN is 192.168.7.0, VPN is 192.168.6.0.
I feel like this is a NAT issue, as I'm able to ping 192.168.6.1 when connected in Router mode, but not when connected in Gateway mode. I've spent a few hours trying to find a solution but find myself stumped. Thanks for any help!
Server Config: push "route 192.168.7.0 255.255.255.0"
push "dhcp-option DNS 192.168.6.1"
server 192.168.6.0 255.255.255.0
Routing Table:
default 0.0.0.0 x.x.x.x UG 0 WAN
x.x.x.0 255.255.255.0 * U 0 WAN
169.254.0.0 255.255.0.0 * U 0 LAN & WLAN
192.168.6.0 255.255.255.0 192.168.6.2 UG 0 tun0
192.168.6.2 255.255.255.255 * UH 0 tun0
192.168.7.0 255.255.255.0 * U 0 LAN & WLAN
192.168.8.0 255.255.255.0 192.168.7.249 UG 0 LAN & WLAN
192.168.9.0 255.255.255.0 192.168.7.250 UG 0 LAN & WLAN
192.168.10.0 255.255.255.0 192.168.7.251 UG 0 LAN & WLAN
Initially, it was configured as a router:
ISP Gateway -> (Lan to WAN) Router with OpenVPN -> (LAN to WAN) Routers for other subnets.
When I took the ISP gateway out, and switched the router with OpenVPN to gateway, I started having these issues.
Thanks for the advice about Server configuration, I had initially tried to configure that way but ran into the same issue I was having, where OpenVPN would connect, but could not communicate. Now that I have a working (although not ideal) configuration, I'll put some time into getting it running properly in server mode. Thanks!