openvpn start with exit ubuntu 20

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

openvpn start with exit ubuntu 20

Post by scorpoin » Tue Nov 08, 2022 8:26 am

Greetings,

I have just setup openvpn on ubunut-20 it does not give any error or such when starting service

Code: Select all

#Server_Configuration
#=================
#File-Configuration
port 8800
proto udp
dev tun
ca    /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/server.crt
key /etc/openvpn/server/server.key
##dh /etc/openvpn/dh.pem # We are using ec algorithm so we do not need DH
dh none
server 10.10.10.0 255.255.255.0
mode server
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
#push "dhcp-option DNS 8.8.4.4"
#push "dhcp-option DNS 8.8.8.8"
client-config-dir /etc/openvpn/ccd # for fixed ip assigning for client
ifconfig-pool-persist /etc/openvpn/ipp.txt #log previous ip of cliemt
##tls-auth ta.key 0 # This file is secret
tls-crypt ta.key
auth SHA256
key-direction 0
##cipher AES-256-CBC
cipher AES-256-GCM
client-to-client # if you would like connecting clients to be able to reach each other over the VPN
#duplicate-cn # disble it if we are using one config for one client
keepalive 10 120
comp-lzo no
compress
user nobody
#group nobody # old_version_ubuntu
group nogroup #latest version ubuntu
persist-key
persist-tun
crl-verify crl.pem # Latested_ubuntu_version
explicit-exit-notify 1# if using UDP protocol
status /var/log/openvpn/openvpn-status.log
log /var/log/openvpn/openvpn.log
verb 4
mute 20

Code: Select all

#Base_config_Client
#===============
client
dev tun
proto udp
remote <WAN_IP> 8800 #This is serve IP
resolv-retry infinite
nobind
persist-key
persist-tun
cipher cipher AES-256-GCM
auth SHA256
remote-cert-tls server
key-direction 1
#comp-lzo
comp-lzo no
compress
auth-nocache
verb 3

Code: Select all

systemctl status openvpn.service 
● openvpn.service - OpenVPN service
     Loaded: loaded (/lib/systemd/system/openvpn.service; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2022-11-08 08:18:20 UTC; 3min 56s ago
    Process: 67581 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 67581 (code=exited, status=0/SUCCESS)

Nov 08 08:18:20 ubuntu-2gb-ash-1 systemd[1]: Starting OpenVPN service...
Nov 08 08:18:20 ubuntu-2gb-ash-1 systemd[1]: Finished OpenVPN service.
Even when I run ifconfig -a tun0 device does not list .

Code: Select all

netstat -aupn | grep 8800
shows nothing it seems like service is not running .

Any idea what could be the issue?

Regards
Last edited by scorpoin on Tue Nov 08, 2022 10:50 am, edited 2 times in total.

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: openvpn start with exit ubuntu 20

Post by ordex » Tue Nov 08, 2022 9:25 am

I presume this is happening on the server, right? can you check /var/log/openvpn.log ?

scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

Re: openvpn start with exit ubuntu 20

Post by scorpoin » Tue Nov 08, 2022 9:55 am

ordex wrote:
Tue Nov 08, 2022 9:25 am
I presume this is happening on the server, right? can you check /var/log/openvpn.log ?
Strange thing is there is nothing in /var/log/openvpn folder . I could not figure out what I have missed?

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: openvpn start with exit ubuntu 20

Post by ordex » Tue Nov 08, 2022 10:02 am

I was talking about the log file that you have specified in the server config

Code: Select all

log /var/log/openvpn.log

scorpoin
OpenVpn Newbie
Posts: 17
Joined: Thu Jan 03, 2019 8:27 am

Re: openvpn start with exit ubuntu 20

Post by scorpoin » Tue Nov 08, 2022 10:48 am

ordex wrote:
Tue Nov 08, 2022 10:02 am
I was talking about the log file that you have specified in the server config

Code: Select all

log /var/log/openvpn.log
There is no such file on path /var/log/openvpn.log

I have updated the path there is folderin /var/log/openvpn but no logs there :( .

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: openvpn start with exit ubuntu 20

Post by Pippin » Tue Nov 08, 2022 6:46 pm

I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

Post Reply