0

I have a Ubuntu server hosted on Digital Ocean and used as a VPN and through it I would like to access my other servers there over the local network (Private Network). But I am unable to access other servers from my PC over the VPN (Request timed out on 10.8.0.1 = VPN server).
Route table on the VPN server:

default         _gateway        0.0.0.0         UG    0      0        0 ens3
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
10.19.0.0       0.0.0.0         255.255.0.0     U     0      0        0 ens3
10.19.0.0       10.19.0.1       255.255.0.0     UG    0      0        0 ens3
10.135.0.0      0.0.0.0         255.255.0.0     U     0      0        0 ens4
10.135.0.0      10.135.0.1      255.255.0.0     UG    0      0        0 ens4
7.7.7.0         0.0.0.0         255.255.240.0   U     0      0        0 ens3

tun0 is VPN network
ens3 is to the internet
ens4 is LAN
/Public net masked as 7.7.7.0/

So I would like to route all traffic going from 10.8.0.0/24 to 10.135.0.0/16 over ens4 (10.135.4.48) and all other traffic through ens3.

Do I have to change routing on my local machine?

0

Solved by amending ufw config at /etc/ufw/before.rules:

# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]

# Forward traffic from eth1 through eth0.
-A POSTROUTING -s 10.8.0.0/24 -d 10.135.0.0/16 -j MASQUERADE

COMMIT
  • Please accept your own answer so the question gets closed. Thanks. – user1794469 Jan 18 at 16:38

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.