Hi everyone,
I setup an Openvpn connection like that :
- server side : Synology NAS (dsm 6) at home
- client side : Ubuntu server 20.04 on a remote vps
Server side is setup correctly (basic setup) as below, and client seems to be connected :
Client configuration openvpn file :
dev tun
tls-client
remote HOME_PUBLIC_IP_BOX 1195
# The "float" tells OpenVPN to accept authenticated packets from any address,
# not only the address which was specified in the --remote option.
# This is useful when you are connecting to a peer which holds a dynamic address
# such as a dial-in user or DHCP client.
# (Please refer to the manual of OpenVPN for more information.)
#float
# If redirect-gateway is enabled, the client will redirect it's
# default network gateway through the VPN.
# It means the VPN connection will firstly connect to the VPN Server
# and then to the internet.
# (Please refer to the manual of OpenVPN for more information.)
#redirect-gateway def1
# dhcp-option DNS: To set primary domain name server address.
# Repeat this option to set secondary DNS server addresses.
#dhcp-option DNS DNS_IP_ADDRESS
pull
# If you want to connect by Server's IPv6 address, you should use
# "proto udp6" in UDP mode or "proto tcp6-client" in TCP mode
proto udp
script-security 2
reneg-sec 0
cipher AES-256-CBC
auth SHA512
auth-user-pass
<ca>
-----BEGIN CERTIFICATE-----
RESERVED
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
RESERVED
-----END CERTIFICATE-----
<ca>
and when i do "ip route show" on client side, it seems to be strange for the 10.10.0.0 network :
Note : there is another Openvpn connection on 10.8.0.0 network and for it, that ubuntu remote vps is the server and my computer is the client :
default via REMOTE_VPS_GATEWAY dev ens3 proto dhcp src REMOTE_VPS_PUBLIC_IP metric 100
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 # Another OPENVPN connection to my computer at home
10.10.0.0/24 via 10.10.0.5 dev tun1
10.10.0.1 via 10.10.0.5 dev tun1
10.10.0.5 dev tun1 proto kernel scope link src 10.10.0.6
HOME_PUBLIC_IP_BOX dev ens3 proto dhcp scope link src REMOTE_VPS_PUBLIC_IP metric 100
I tried to ping server > client with no problem, but i cant ping client > server (tried 10.10.0.1 and 10.10.0.5)
I can add there is no problem of closed/forwarded port, because i did a rsync command (client to server) successfully via ddns name from client (ubuntu vps) to the server (nas at home):
sudo rsync -avrtuP --delete -e 'ssh -p 5555 -i /home/box/.ssh/id_rsa' /folder-to-save backup@nas_ddns_name:/volume1/Backup/folder
If i try the same command and replace "nas_ddns_name" with vpn ip server "10.10.0.1" (i tried 10.10.0.5 too), i cant reach the server this time
Is there any mess with :
- The other openvpn connection between my home computer (client) and the ubuntu "openvpn server role" side?
- The route table on ubuntu "openvpn client role" side and the nas (server) ? where does come from this 10.10.0.5 ? the ip client is still 10.10.0.6
i didn't tried to uncomment #redirect-gateway def1 because i just need a connection between the nas and the client, and i dont want to do the mess on the client side (its a web server too), i don't want the client to use the nas as a gateway for internet