The keys seem to work over LAN but for some reason I can not connect externally.
My router is set up correctly but I am not sure what happened this time around (I had to fresh install due to a HHD failure which caused a failed boot)…
I checked all ports with an online tester.
1194 (the default) shows that I can not connect as the port is closed.
I checked in server.conf and changed a couple of settings:
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/.crt
key /etc/openvpn/easy-rsa/pki/private/.key
dh none
ecdh-curve prime256v1
topology subnet
server ************ 255.255.255.0 <<< ************ This is the IP of my internal RPi
Set your primary domain name server address for clients
push “dhcp-option DOMAIN *****.ddns.net”
push “dhcp-option DNS 1.1.1.1”
push “dhcp-option DNS 1.0.0.1”
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”
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
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 openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3 #DuplicateCNs allow access control on a less-granular, per user basis. #Remove # if you will manage access by user instead of device. #duplicate-cn
Well, you are the only one who knows if this is correct . You can check if the NoIP DDNS is correctly set and pointing to your external IP your router has.
As connection is working inside your network (according your info), the issue doesn’t seems to be with DietPi
I checked the logs, and for both openvpn files that I could find, there was zero information in them.
I then ran
sudo ps -A
and openvpn is nowhere to be found!
So then I opened dietpi-services, and it says that openvpn is running??
I tried to uninstall, and openvpn still appears in services as inactive, despite an uninstall and reboot.
After unistalling a second time it then doesn’t appear in installations, but still does in processes as “inactive”.
I am really not sure what has happened here, so have decided to bite the bullet, back up the entire system, backup all configs of known working installs, and returning everything to scratch, attempting to install piVPN first and making sure this works.
I am not sure if this is a bug or something I have done by accident, but wish me luck!
TITLE OpenVPN 2.4.7 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] b$
TIME Fri Feb 5 23:52:55 2021 1612569175
HEADER CLIENT_LIST Common Name Real Address Virtual Address Virtual IPv6 Address Bytes Received Byte$
CLIENT_LIST ********* 192.168.0.1:65294 10.8.0.2 80570 71093 Fri Feb 5 23:52:18 $
HEADER ROUTING_TABLE Virtual Address Common Name Real Address Last Ref Last Ref (time_t)
ROUTING_TABLE 10.8.0.2 ******** 192.168.0.1:65294 Fri Feb 5 23:52:50 2021 1612569170
GLOBAL_STATS Max bcast/mcast queue length 0
END
90.200.112.206 isn’t responding on port 1194 (openvpn).
I guess it’s ok for the port scanner not detecting the VPN Server port because VPN server is running UDP and most of scanner checking on TCP
Anyway, OpenVPN is running correctly. If I understood as well, you are able to connect inside you network as well. Means it is working. You still need to find out what happen on your port forwarding.