You are not logged in.

#1 2020-11-25 19:32:46

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

openvpn client not starting with systemd

I am using Openvn to connect to a Debian server.

I generated the client.ovpn and copied it to the local machine.
When I run

 openvpn ~/path/to/client.ovpn

I connect and everything works fine.

However when I copy that certificate to /etc/openvpn/client/client.conf and do

systemctl start openvpn-client@client

There is no connection. I have internet access (the server is configured to route all traffic), but the tun device isn't raised and>

systemctl status openvpn-client@client

shows:

Loaded: loaded (/usr/lib/systemd/system/openvpn-client@.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-11-25 12:27:06 CST; 51min ago
       Docs: man:openvpn(8)
             https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
             https://community.openvpn.net/openvpn/wiki/HOWTO
   Main PID: 486 (openvpn)
     Status: "Initialization Sequence Completed"
      Tasks: 1 (limit: 3521)
     Memory: 2.9M
     CGroup: /system.slice/system-openvpn\x2dclient.slice/openvpn-client@client.service
             └─486 /usr/bin/openvpn --suppress-timestamps --nobind --config client.conf

Nov 25 13:04:48 kyzer openvpn[486]: ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=wlp12s0 HWADDR=00:22:5f:f1:0a:4a
Nov 25 13:04:48 kyzer openvpn[486]: TUN/TAP device tun1 opened
Nov 25 13:04:48 kyzer openvpn[486]: net_iface_mtu_set: mtu 1500 for tun1
Nov 25 13:04:48 kyzer openvpn[486]: net_iface_up: set tun1 up
Nov 25 13:04:48 kyzer openvpn[486]: net_addr_v4_add: 172.27.234.4/24 dev tun1
Nov 25 13:04:53 kyzer openvpn[486]: ROUTE remote_host is NOT LOCAL
Nov 25 13:04:53 kyzer openvpn[486]: net_route_v4_add: IP/32 via 192.168.1.1 dev [NULL] table 0 metric -1
Nov 25 13:04:53 kyzer openvpn[486]: net_route_v4_add: 0.0.0.0/1 via 172.27.234.1 dev [NULL] table 0 metric -1
Nov 25 13:04:53 kyzer openvpn[486]: net_route_v4_add: 128.0.0.0/1 via 172.27.234.1 dev [NULL] table 0 metric -1

Note, when I enable the service and reboot, it does not load either. The only way is manually connecting.

Offline

#2 2020-11-25 19:57:27

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 630

Re: openvpn client not starting with systemd

openvpn-client@client.service

path is..
/etc/openvpn/client

.conf, cert and password.txt go there.

Your conf file should point to your cert and password.txt

https://forums.openvpn.net/viewtopic.php?t=11342

Last edited by Zod (2020-11-25 20:00:34)

Offline

Board footer

Powered by FluxBB