Page 1 of 1

unable to redirect default gateway

Posted: Mon May 12, 2014 2:32 pm
by snaf
Hello. I can't connect my vps to vpn server. It shows me this message :

Code: Select all

Mon May 12 16:16:56 2014 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
OS = debian 7 ( stable )

Code: Select all

openvpn --version
OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Jun 18 2013
Just testing purpose I used the same config to connect my working pc to the vpn, and it was working perfect.
OS = Gentoo
openvpn = 2.3.2

It is posible to solve this problem?

Re: unable to redirect default gateway

Posted: Mon May 12, 2014 3:05 pm
by snaf
Finaly I connected to the vpn using this command

Code: Select all

openvpn --config "conf.ovpn" --route-gateway my_ip_address
But after this I lost control against vps, it wasn't respondig to ping or ssh. I logged to the server using KVM and using this command:

Code: Select all

curl curlmyip.com
I realised that it is succesfully connected and the output IP is changed.

How to force my vps to respond to ping/ssh throw global ip?

Re: unable to redirect default gateway

Posted: Sat May 02, 2015 11:35 pm
by josazee
In terminal type this:

Code: Select all

/sbin/ip addr show ppp0 | grep peer | awk ' { print $4 } ' | sed 's/\/32//'
The result of the above code is that it shows your default gateway.

Next type this:

Code: Select all

ip route replace default via xx:xx:xx:xx dev ppp0
The above code manually sets the default gateway.

NOTE: Replace xx:xx… with your gateway shown by the first code.

It should be solved

For more details see here http://9jera.com/forums/topic/unable-to ... t-gateway/