Installing OVPN on Ubuntu server 22.04

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
neuran
OpenVpn Newbie
Posts: 2
Joined: Fri Jan 05, 2024 11:07 am

Installing OVPN on Ubuntu server 22.04

Post by neuran » Fri Jan 05, 2024 1:05 pm

Hello community,
I'm following this guide to install OVPN on my Ubuntu server 22.04.3 LTS.
The process described is very simple and I can complete the installation, but I cannot connect any client to the OVPN server even if it is running.
I did the installation as the root user. I have imported the .ovpn client file into the app OpenVPN Connect v.3.4.3, but the connection fails. I'm on OSX 10.15 and iOS 15.

This is the status of the OVPN server:

Code: Select all

● openvpn@server.service - OpenVPN connection to server
     Loaded: loaded (/etc/systemd/system/openvpn@.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-01-05 11:54:29 CET; 4min 28s ago
       Docs: man:openvpn(8)
             https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
             https://community.openvpn.net/openvpn/wiki/HOWTO
   Main PID: 289376 (openvpn)
     Status: "Initialization Sequence Completed"
      Tasks: 1 (limit: 2249)
     Memory: 1.8M
        CPU: 30ms
     CGroup: /system.slice/system-openvpn.slice/openvpn@server.service
             └─289376 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config />

Jan 05 11:54:29 localhost ovpn-server[289376]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Jan 05 11:54:29 localhost ovpn-server[289376]: Socket Buffers: R=[212992->212992] S=[212992->212992]
Jan 05 11:54:29 localhost ovpn-server[289376]: UDPv4 link local (bound): [AF_INET][undef]:1194
Jan 05 11:54:29 localhost ovpn-server[289376]: UDPv4 link remote: [AF_UNSPEC]
Jan 05 11:54:29 localhost ovpn-server[289376]: GID set to nogroup
Jan 05 11:54:29 localhost ovpn-server[289376]: UID set to nobody
Jan 05 11:54:29 localhost ovpn-server[289376]: MULTI: multi_init called, r=256 v=256
Jan 05 11:54:29 localhost ovpn-server[289376]: IFCONFIG POOL IPv4: base=10.8.0.2 size=253
Jan 05 11:54:29 localhost ovpn-server[289376]: IFCONFIG POOL LIST
Jan 05 11:54:29 localhost ovpn-server[289376]: Initialization Sequence Completed

neuran
OpenVpn Newbie
Posts: 2
Joined: Fri Jan 05, 2024 11:07 am

Re: Installing OVPN on Ubuntu server 22.04

Post by neuran » Thu Jan 11, 2024 2:41 pm

Additional information, hoping someone's help:

Code: Select all

root@localhost:~# ufw status
Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
Nginx Full                 ALLOW       Anywhere                  
1194/udp                   ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)             
Nginx Full (v6)            ALLOW       Anywhere (v6)             
1194/udp (v6)              ALLOW       Anywhere (v6) 
I think the problem is the IPv4 0.0.0.0 which preceed the port number, but I don't know how to change it:

Code: Select all

root@localhost:~# netstat -anp | grep openvpn
udp        0      0 0.0.0.0:1194            0.0.0.0:*                           408660/openvpn      
unix  2      [ ]         DGRAM      CONNECTED     96452780 408660/openvpn       
unix  3      [ ]         STREAM     CONNECTED     96452775 408660/openvpn   

Post Reply