Openvpn client lost internet access

openvpnvpn

After installing and connecting my openvpn client on CentOS 7, the client (webserver) looks down for external connections. So I can't reach to the websites from remote connections.

Has anyone ideas to fix this?

xx.xx.0.0 = Server IP range
10.8.0.0 = VPN IP range

route (openvpn disabled)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    100    0        0 eth0
xx.xx.0.0       0.0.0.0         255.255.0.0     U     100    0        0 eth0

route (openvpn client enabled)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.8.0.29       128.0.0.0       UG    0      0        0 tun0
default         gateway         0.0.0.0         UG    100    0        0 eth0
vpn-srv-name    gateway         255.255.255.255 UGH   0      0        0 eth0
10.8.0.1        10.8.0.29       255.255.255.255 UGH   0      0        0 tun0
10.8.0.29       0.0.0.0         255.255.255.255 UH    0      0        0 tun0
128.0.0.0       10.8.0.29       128.0.0.0       UG    0      0        0 tun0
xx.xx.0.0       0.0.0.0         255.255.0.0     U     100    0        0 eth0

client openvpn.conf:

client
dev tun
proto udp
remote vpn-srv-name 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
comp-lzo
verb 3

Best Answer

In the openvpn server config, i changed this line: push "redirect-gateway def1"

to this: push "redirect-private"

Problem was solved and the duplicate gateway was removed, however I couln't connect between the clients. To solve this, I added the line below to the server config:

push "route 10.8.0.0 255.255.0.0"