A few seconds after connection to my VPN through CentOS 7 on my virtual Machine, I lose Connection with no errors in the log, This only appears to be happening with the cenOS 7/8. OVH documentation cover adding either.
51.195.234.254 - 255.255.255.255 eth0
51.195.234.0 - 255.255.255.0 eth0
default 51.195.234.254
or
51.195.234.254 dev eth0
default via 51.195.234.254
to /etc/sysconfig/network-scripts/route-eth0 however this does not help.
Debian 10 (working):
ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:00:00:ff:3b:ea brd ff:ff:ff:ff:ff:ff
inet 145.239.xxx.xxx/32 brd 145.239.xxx.xxx scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::ff:feff:3bea/64 scope link
valid_lft forever preferred_lft forever
ip r
default via 51.195.234.254 dev eth0
51.195.234.254 dev eth0 scope link
After connecting to VPN: ip r
0.0.0.0/1 via 10.8.0.9 dev tun0
default via 51.195.234.254 dev eth0
10.8.0.0/24 via 10.8.0.9 dev tun0
10.8.0.9 dev tun0 proto kernel scope link src 10.8.0.10
VPNIP via 51.195.234.254 dev eth0
51.195.234.254 dev eth0 scope link
128.0.0.0/1 via 10.8.0.9 dev tun0
CentOS 7:
ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:00:00:ff:3b:ea brd ff:ff:ff:ff:ff:ff
inet 145.239.xxx.xxx/32 brd 145.239.xxx.xxx scope global dynamic eth0
valid_lft 21599969sec preferred_lft 21599969sec
inet6 fe80::ff:feff:3bea/64 scope link
valid_lft forever preferred_lft forever
ip r
default via 51.195.234.254 dev eth0
51.195.234.254 dev eth0 scope link
After connecting to VPN: ip r
0.0.0.0/1 via 10.8.0.9 dev tun0
default via 51.195.234.254 dev eth0
10.8.0.0/24 via 10.8.0.9 dev tun0
10.8.0.9 dev tun0 proto kernel scope link src 10.8.0.10
VPNIP via 51.195.234.254 dev eth0
51.195.234.254 dev eth0 scope link
128.0.0.0/1 via 10.8.0.9 dev tun0
I have also tried adding the gateway of the VPN
ip route add 5.45.126.254 dev eth0
ip r
0.0.0.0/1 via 10.8.0.17 dev tun0
default via 51.195.234.254 dev eth0
5.45.126.254 dev eth0 scope link
10.8.0.0/24 via 10.8.0.17 dev tun0
10.8.0.17 dev tun0 proto kernel scope link src 10.8.0.18
VPNIP via 51.195.234.254 dev eth0
51.195.234.254 dev eth0 scope link
128.0.0.0/1 via 10.8.0.17 dev tun0
Could I have to maybe modify VPNIP via 51.195.234.254 dev etho0 so that it's routed through VPNIP 5.45.126.254 dev eth0? if so how can I achieve that?
Why Is OpenVPN Losing Connection Through CentOS 7 With OVH?
Related questions
- Reinstall VPS from my own ISO Image
5657
26.11.2018 08:38
- Upgrading ram possible?
5189
05.06.2018 14:58
- Upgrade from Ubuntu 20.10 to Ubuntu 21.04
4830
02.01.2022 15:21
- Remote Desktop can't connect to the remote computer for one of these reasons
4119
14.03.2019 08:58
- No FreeBSD option while reinstalling VPS
4118
30.06.2021 08:58
- Debian 10 Buster Availability
3743
13.07.2019 12:27
- Softether OVH VPN
3533
11.08.2018 18:07
- Rocky Linux instead of centos stream
3422
28.04.2021 23:23
- Private VPN on VPS OVH?
3188
20.12.2019 19:52
- How to set up ip source "all" in IP firewall section
3116
12.03.2018 11:26