Hi guys, new to the forum & first time user of openvpn. (tried to use oconf/olog)
I have installed the server on a Debian 10 VM, client on a W8.1.
The connection works but I cannot access any device on the remote/server LAN.
I have started over a few times, tried a lot of different settings but without any luck
What am I missing/doing wrong!?
Thanks a lot in advance!
Server side config
Server: 172.16.0.9/24
GW: 172.16.0.1
DNS & DHCP (virtual pi-hole): 172.16.0.3
in /etc/sysctl.conf
net.ipv4.ip_forward=1
local 172.16.0.9
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh.pem
server 10.8.0.0 255.255.255.0
push "route 172.16.0.0 255.255.255.0"
route 192.168.1.0 255.255.255.0
;push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 172.16.0.3"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
explicit-exit-notify 1
;client-to-client
;push "route 192.168.1.0 255.255.255.0"
contents of /etc/openvpn
-rw------- 1 root root 1184 Dec 6 13:27 ca.crt
drwxr-xr-x 2 root root 4096 Dec 6 14:05 client
-rw-r--r-- 1 root root 33 Dec 6 13:56 client.conf
-rw------- 1 root root 424 Dec 6 13:28 dh.pem
drwxr-xr-x 4 root root 4096 Dec 6 13:22 easy-rsa
drwxr-xr-x 2 root root 4096 Feb 20 2019 server
-rw-r--r-- 1 root root 725 Dec 6 16:51 server.conf
-rw------- 1 root root 4586 Dec 6 13:28 server.crt
-rw------- 1 root root 1704 Dec 6 13:27 server.key
-rw------- 1 root root 636 Dec 6 13:27 ta.key
-rwxr-xr-x 1 root root 1468 Feb 20 2019 update-resolv-conf
contents of /etc/openvpn/client
-rw------- 1 root root 1184 Dec 6 13:31 ca.crt
-rw------- 1 root root 4470 Dec 6 13:31 client.crt
-rw------- 1 root root 1704 Dec 6 13:31 client.key
contents of /etc/openvpn/client.conf (gave this file that extension because system wouldn't let me name it the same as directory)
iroute 192.168.1.0 255.255.255.0
Client side config
W8.1: 192.168.1.71/24
GW & DNS: 192.168.1.254
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################
# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client
# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap
# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
;proto tcp
proto udp
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote <here goes my WAN IP> 1194
;remote my-server-2 1194
# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
;remote-random
# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite
# Most clients don't need to bind to
# a specific local port number.
nobind
# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody
# Try to preserve some state across restarts.
persist-key
persist-tun
# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert client.crt
key client.key
# Verify server certificate by checking that the
# certicate has the correct key usage set.
# This is an important precaution to protect against
# a potential attack discussed here:
#
http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the keyUsage set to
# digitalSignature, keyEncipherment
# and the extendedKeyUsage to
# serverAuth
# EasyRSA can do this for you.
remote-cert-tls server
# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
# Note that v2.4 client/server will automatically
# negotiate AES-256-GCM in TLS mode.
# See also the ncp-cipher option in the manpage
cipher AES-256-CBC
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
#comp-lzo
# Set log file verbosity.
verb 3
# Silence repeating messages
;mute 20
contents of C:\Program Files\OpenVPN\config
06/12/2019 13:31 1 184 ca.crt
06/12/2019 13:31 4 470 client.crt
06/12/2019 13:31 1 704 client.key
06/12/2019 13:40 3 603 client.ovpn
06/12/2019 13:35 340 README.txt
06/12/2019 13:27 636 ta.key
contents of client.log
Fri Dec 06 23:11:32 2019 OpenVPN 2.4.8 i686-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 31 2019
Fri Dec 06 23:11:32 2019 Windows version 6.2 (Windows 8 or greater) 32bit
Fri Dec 06 23:11:32 2019 library versions: OpenSSL 1.1.0l 10 Sep 2019, LZO 2.10
Enter Management Password:
Fri Dec 06 23:11:32 2019 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Fri Dec 06 23:11:32 2019 Need hold release from management interface, waiting...
Fri Dec 06 23:11:32 2019 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'state on'
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'log all on'
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'echo all on'
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'bytecount 5'
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'hold off'
Fri Dec 06 23:11:32 2019 MANAGEMENT: CMD 'hold release'
Fri Dec 06 23:11:32 2019 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Dec 06 23:11:32 2019 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Dec 06 23:11:32 2019 MANAGEMENT: >STATE:1575670292,RESOLVE,,,,,,
Fri Dec 06 23:11:33 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]<here goes my WAN IP>:1194
Fri Dec 06 23:11:33 2019 Socket Buffers: R=[65536->65536] S=[65536->65536]
Fri Dec 06 23:11:33 2019 UDP link local: (not bound)
Fri Dec 06 23:11:33 2019 UDP link remote: [AF_INET]<here goes my WAN IP>:1194
Fri Dec 06 23:11:33 2019 MANAGEMENT: >STATE:1575670293,WAIT,,,,,,
Fri Dec 06 23:11:33 2019 MANAGEMENT: >STATE:1575670293,AUTH,,,,,,
Fri Dec 06 23:11:33 2019 TLS: Initial packet from [AF_INET]<here goes my WAN IP>:1194, sid=a7528292 5ebcff1d
Fri Dec 06 23:11:33 2019 VERIFY OK: depth=1, CN=server
Fri Dec 06 23:11:33 2019 VERIFY KU OK
Fri Dec 06 23:11:33 2019 Validating certificate extended key usage
Fri Dec 06 23:11:33 2019 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Dec 06 23:11:33 2019 VERIFY EKU OK
Fri Dec 06 23:11:33 2019 VERIFY OK: depth=0, CN=server
Fri Dec 06 23:11:33 2019 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Fri Dec 06 23:11:33 2019 [server] Peer Connection Initiated with [AF_INET]<here goes my WAN IP>:1194
Fri Dec 06 23:11:34 2019 MANAGEMENT: >STATE:1575670294,GET_CONFIG,,,,,,
Fri Dec 06 23:11:34 2019 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Fri Dec 06 23:11:34 2019 PUSH: Received control message: 'PUSH_REPLY,route 172.16.0.0 255.255.255.0,dhcp-option DNS 172.16.0.3,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM'
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: timers and/or timeouts modified
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: --ifconfig/up options modified
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: route options modified
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: peer-id set
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: adjusting link_mtu to 1624
Fri Dec 06 23:11:34 2019 OPTIONS IMPORT: data channel crypto options modified
Fri Dec 06 23:11:34 2019 Data Channel: using negotiated cipher 'AES-256-GCM'
Fri Dec 06 23:11:34 2019 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Dec 06 23:11:34 2019 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Fri Dec 06 23:11:34 2019 interactive service msg_channel=0
Fri Dec 06 23:11:34 2019 ROUTE_GATEWAY 192.168.1.254/255.255.255.0 I=3 HWADDR=00:24:e8:f5:7a:a4
Fri Dec 06 23:11:34 2019 open_tun
Fri Dec 06 23:11:34 2019 TAP-WIN32 device [Local Area Connection] opened: \\.\Global\{B4826954-3FCF-444D-8E06-E7CA70D183B2}.tap
Fri Dec 06 23:11:34 2019 TAP-Windows Driver Version 9.24
Fri Dec 06 23:11:34 2019 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {B4826954-3FCF-444D-8E06-E7CA70D183B2} [DHCP-serv: 10.8.0.5, lease-time: 31536000]
Fri Dec 06 23:11:34 2019 Successful ARP Flush on interface [32] {B4826954-3FCF-444D-8E06-E7CA70D183B2}
Fri Dec 06 23:11:34 2019 MANAGEMENT: >STATE:1575670294,ASSIGN_IP,,10.8.0.6,,,,
Fri Dec 06 23:11:39 2019 TEST ROUTES: 2/2 succeeded len=2 ret=1 a=0 u/d=up
Fri Dec 06 23:11:39 2019 MANAGEMENT: >STATE:1575670299,ADD_ROUTES,,,,,,
Fri Dec 06 23:11:39 2019 C:\Windows\system32\route.exe ADD 172.16.0.0 MASK 255.255.255.0 10.8.0.5
Fri Dec 06 23:11:39 2019 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Fri Dec 06 23:11:39 2019 Route addition via IPAPI succeeded [adaptive]
Fri Dec 06 23:11:39 2019 C:\Windows\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.5
Fri Dec 06 23:11:39 2019 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Fri Dec 06 23:11:39 2019 Route addition via IPAPI succeeded [adaptive]
Fri Dec 06 23:11:39 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Dec 06 23:11:39 2019 Initialization Sequence Completed
Fri Dec 06 23:11:39 2019 MANAGEMENT: >STATE:1575670299,CONNECTED,SUCCESS,10.8.0.6,<here goes my WAN IP>,1194,,