I have a server where I have 2 VMs (proxmox). One runs open media vault and the other Ubuntu server 18.04. I want to run a vpn on the ubuntu server VM such that I can access the remote LAN and the NAS drives from the other VM.
I got a VPN running. However, I can't access the NAS drive nor the remote LAN. The command
sudo route add 192.168.2.XX dev tun0
properly redirects me to a specific LAN device, so I assume a DHCP-option is wrong.
What do I need to change to access the remote LAN (and the NAS drives)? As you can see I already tried some options (see the commented lines). Merci! 😃
This is my /etc/openvpn/server.conf
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert **cert**.crt
key **key**.key
dh none
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
#push "dhcp-option DNS 192.168.2.254" # tried the router for DNS, no luck
push "dhcp-option DNS 208.67.222.222" # openDNS1
push "dhcp-option DNS 208.67.220.220" # openDNS2
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1 bypass-dhcp"
#push "remote-gateway vpn_server_ip" # saw this in a tutorial, made no difference.
client-to-client
keepalive 1800 3600
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
Where my .ovpn file contains (without the certificates):
client
dev tun
proto udp
remote **MYIP** 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
tls-version-min 1.2
verify-x509-name **NAME** name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3
Why not a VPN using OMV-extra's?: I can SSH into the ubuntu VM, and aim to use it for maintenance and other projects later. For now I am learning how to set everything upwhere OMV is already