1

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
| improve this question | | | | |
1

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"

| improve this answer | | | | |
0

Add redirect-private to openvpn.conf

| improve this answer | | | | |
  • I ran the client again: openvpn --redirect-private --config /etc/openvpn/openvpn.conf Unfortunately the same results. – Patrick Aug 29 '16 at 13:05
  • I think something is wrong with your openvpn or the config at server side... Then use up /path/script, to fix route issues after connection established. route del 0.0.0.0 gw 10.8.0.29 – Ipor Sircer Aug 29 '16 at 13:10
  • hmm i cant delete the route: SIOCDELRT: no such process – Patrick Aug 29 '16 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.