0

I have an OpenVPN server running on my Asus router (merlin firmware). I can connect to the OpenVPN which gives me an ip of 172.16.36.0 255.255.255.0. I can connect to the router ip address (192.168.1.1) but I am unable to connect to my Synology running on 192.168.1.2. How can I achieve this? I tried everything, from iroute to route.

This is my server config:

daemon
topology subnet
server 172.16.36.0 255.255.255.0
proto udp
rcvbuf 0
sndbuf 0
port 1194
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.1.0 255.255.255.0"
duplicate-cn
push "dhcp-option DNS 192.168.1.1"
push "redirect-gateway def1"
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
duplicate-cn
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status 10

This is my client config:

client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1194
float
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
auth-user-pass
ns-cert-type server
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
resolv-retry infinite
nobind

I figured out it is due to the fact that my Synology is also a VPN client and has a 10.8.0.0/24 address assigned. When I disconnect this it works. How can I add a static route to my nas so that connected devices through the routers VPN (172.16.36.0/24) can access the synology AND get a response. Now traffic out from the synology is going through the 10.8.0.1 gateway because of the VPN client.

1
  • Whats the IP space of the remote network?
    – Linef4ult
    Commented Jan 21, 2016 at 0:37

1 Answer 1

0

I figured it out; I needed to configure a static route on my Synology DiskStation for the destination 172.16.36.0/24 (the OpenVPN subnet) to route through the gateway 192.168.1.1 (the router's LAN ip).

1
  • 1
    Be aware - If you connect from a remote location which also uses subnet 192.168.1.0/24 you will incur routing conflicts and will not be able to connect to your NAS.
    – dotvotdot
    Commented Feb 3, 2016 at 11:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .