Cannot connect two VM's via an openvpn service
Posted: Thu Aug 27, 2020 4:14 pm
To the dear good people at openvpn, i am very new to this. I have been struggling for days to get a connection working between two Ubuntu VM's, one a server, the other a client. I keep getting a network unreachable error. Running sudo openvpn client.conf just hangs. However the server appears to be up and running ok (active, tun shows up in ip a). I would post the logs, however am unable to get them out of the VM at this point.
I was wondering whether someone could look over my conf files, perhaps they will spot an error.
Error from client log:
write UDP - Network is unreachable (code101)
Error from server log
Socket bind failed on local address [AF inet] undef:1194 Address already in use (errno:98)
Any help much appreciated.
The client conf file has undergone numerous changes and the two lines key-direction 1 and remote-cert-tls server are the most recent experimental additions.
client
dev tun
proto udp
port 1194
remote 10.10.10.1
resolv-retry infinite
persist-key
persist-tun
ca <path>
cert <path>
key <path>
key-direction 1
cipher AES-256-CBC
auth SHA512
auth-nocache
user nobody
group nogroup
compress lz4
log <path>
status <path>
verb 4
remote-cert-tls server
port 1194
proto udp
dev tun
ca <path>
cert <path>
key <path>
dh <path>
crl-verify <path>
server 10.10.10.0 255.255.255.0
push "redirect-gateway def1"
duplicate-cn
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-etc>>>
auth SHA512
auth-nocache
keepalive 20 60
persist-key
persist-tun
compress lz4
daemon
user nobody
group nogroup
log-append <path>
verb 3
I was wondering whether someone could look over my conf files, perhaps they will spot an error.
Error from client log:
write UDP - Network is unreachable (code101)
Error from server log
Socket bind failed on local address [AF inet] undef:1194 Address already in use (errno:98)
Any help much appreciated.
The client conf file has undergone numerous changes and the two lines key-direction 1 and remote-cert-tls server are the most recent experimental additions.
Client.conf
client
dev tun
proto udp
port 1194
remote 10.10.10.1
resolv-retry infinite
persist-key
persist-tun
ca <path>
cert <path>
key <path>
key-direction 1
cipher AES-256-CBC
auth SHA512
auth-nocache
user nobody
group nogroup
compress lz4
log <path>
status <path>
verb 4
remote-cert-tls server
Server Config
port 1194
proto udp
dev tun
ca <path>
cert <path>
key <path>
dh <path>
crl-verify <path>
server 10.10.10.0 255.255.255.0
push "redirect-gateway def1"
duplicate-cn
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-etc>>>
auth SHA512
auth-nocache
keepalive 20 60
persist-key
persist-tun
compress lz4
daemon
user nobody
group nogroup
log-append <path>
verb 3