3

My OpenVPN was working fine until yesterday when it was stuck while a client was connected to MiniDLNA and was scanning. OpenVPN status is returning:

● openvpn.service - OpenVPN service
   Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2019-01-30 10:45:42 UTC; 10min ago
 Main PID: 598 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4700)
   CGroup: /system.slice/openvpn.service

Jan 30 10:45:42 rock64 systemd[1]: Starting OpenVPN service...
Jan 30 10:45:42 rock64 systemd[1]: Started OpenVPN service.

Server and client configurations are as follows:

Server.conf:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "redirect-gateway 
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
duplicate-cn
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3
explicit-exit-notify 1


Client.conf:
client
dev tun
proto udp
remote xx.dns.xx 1194
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
verb 3

Is there anything I can do to solve this problem? I would also appreciate if anybody who can point me to a procedure where I can backup my full configuration (Ubuntu+Openvpn+ufw+Samba, etc..) from eMMC to a hard drive or a USB drive.

Thanks in advance.

12
  • Apologies for the way the error output and the server and clien configuartions appear! I couldn't find a way to input them in a way to preserve the way they're displayzs on my screen!
    – Naass
    Jan 30, 2019 at 16:21
  • Your OpenVPN status looks normal. What is the actual PROBLEM that you're trying to solve? Is your server really at 10.8.0.0? Report back to @heynnema
    – heynnema
    Jan 30, 2019 at 17:31
  • The problem is that OpenVPN is not loading/starting and as you can see on the status output, it says active: exited! Yes my server is at 10.8.0.0. Is it unrecommended?
    – Naass
    Jan 30, 2019 at 18:15
  • The status command shows code=exited, status=0/SUCCESS, and it says that it's started. Why do you think that OpenVPN is not running? Your server and client scripts are on two different machines, yes? Did you recently edit any OpenVPN files? Did this ever work for you? And yes, 10.8.0.0 is not a normal address to assign to an individual computer. Is your network set up for a static IP?
    – heynnema
    Jan 30, 2019 at 18:30
  • Ok, I started to panic because my clients are unable to connect. I am a newbie in Ubuntu/Openvpn, etc.. I now checked with systemctl status openvpn@server and it says it is actrtive and running.What made me panic is that my clients aren't connecting for some reason despite the fact that I didn't do anything to the server or clients configurations. The only thing I can recall is that I had a kodi client scanning MiniDLNA on the same server and it was stuck for some reason. So when I restarted everything this morning, I couldnt connect the clients to the Openvpn sever!
    – Naass
    Jan 30, 2019 at 18:59

2 Answers 2

1

Well, it turned out to be the DNS service (duckdns) wasn't updating my public address. That's why my clients couldn't connect. Thanks to heynnema for his help.

0

in my case it's because after I re-installed openvpn, the system script pointing to the wrong path:

$which open
/usr/local/sbin/openvpn

$/etc/init.d/openvpn point to the wrong path:
/usr/sbin/openvpn

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .