R
R
roa2016-08-30 07:47:08
linux
roa, 2016-08-30 07:47:08

How to set up routing on ubuntu, router, via vpn?

A website and an openvpn server run on a vps server.
The home computer (Ubuntu) is connected to the Internet via a wifi router.
The problem is the following. Two options for connecting to vpn:
1) If I connect to vpn from a wi-fi router, then vps / site / ip is not available from my home computer and does not respond .
2) If I connect to vpn directly from my home computer everything is ok .
How to set up routing so that ssh / site is available in the first option?
Routing tables on first option :
ubuntu machine:

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    600    0        0 wlp6s0
link-local      *               255.255.0.0     U     1000   0        0 wlp6s0
192.168.0.0     *               255.255.255.0   U     600    0        0 wlp6s0

wifi router:
[email protected]:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.8.0.5        128.0.0.0       UG    0      0        0 tun0
default         a.b.c.d   0.0.0.0         UG    0      0        0 rmnet0
10.8.0.1        10.8.0.5        255.255.255.255 UGH   0      0        0 tun0
10.8.0.5        *               255.255.255.255 UH    0      0        0 tun0
10.184.69.0     *               255.255.255.0   U     0      0        0 rmnet0
128.0.0.0       10.8.0.5        128.0.0.0       UG    0      0        0 tun0
w.x.y.z    a.b.c.d   255.255.255.255 UGH   0      0        0 rmnet0
192.168.0.0     *               255.255.255.0   U     0      0        0 bridge0
239.0.0.0       *               255.0.0.0       U     0      0        0 bridge0

vps:
[email protected] ~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         static.65.57.20 0.0.0.0         UG    0      0        0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
10.8.0.2        *               255.255.255.255 UH    0      0        0 tun0
138.201.57.64   static.65.57.20 255.255.255.192 UG    0      0        0 eth0
138.201.57.64   *               255.255.255.192 U     0      0        0 eth0

wxyz - vps ip
abcd - provider ip

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TyzhSysAdmin, 2016-08-30
@POS_troi

Should we come up with configs ourselves?
On the "computer" I do not see a VPN route at all, so we believe that you are lying and the "computer" is not connected to the OVPN server. :)
Also, do not forget that in the server config there must be a push route to the internal subnet of the "server", the same Ndinx does not accept connections on the tun interface.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question