DEV Community

Angga Lesmana
Angga Lesmana

Posted on

connect OpenVpn Server in Ubuntu

simple step to connect our vpn office using ubutu
first we register our address / port / ip
step to register our vpn
-> open terminal and try cd into hosts
-> cd /etc
-> sudo vi hosts

and we can register our vpn there

and install openvpn server in our system
command sudo su use as root

Sign in to your Linux system on the console or via SSH and obtain root privileges.
Run the commands below to install updates and trigger a prompt to reconfigure the timezone settings.

apt update
apt upgrade
apt install tzdata
dpkg-reconfigure tzdata
Enter fullscreen mode Exit fullscreen mode
  1. Install OpenVPN Access Server from the software repository Option 1: Install via repository (recommended) The recommended method to install the OpenVPN Access Server is to use the official OpenVPN Access Server software repository. You will need to be logged on to your Linux system either on the console or via SSH, and have root privileges. Then copy and paste the commands below to add the repository to your system, and install the OpenVPN Access Server client bundle and the OpenVPN Access Server package itself.
apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian jammy main">/etc/apt/sources.list.d/openvpn-as-repo.list
apt update && apt -y install openvpn-as
Enter fullscreen mode Exit fullscreen mode

if u already install that
check for run vpn service

systemctl start openvpn-server@server
systemctl status openvpn-server@server
Enter fullscreen mode Exit fullscreen mode

if your system openVpn is running

● openvpn-server@server.service - OpenVPN service for server
     Loaded: loaded (/lib/systemd/system/openvpn-server@.service; enabled; vend>
     Active: active (running) since Mon 2022-08-15 14:41:44 WIB; 4h 30min ago
       Docs: man:openvpn(8)
             https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
             https://community.openvpn.net/openvpn/wiki/HOWTO
   Main PID: 15604 (openvpn)
     Status: "Initialization Sequence Completed"
      Tasks: 1 (limit: 28457)
     Memory: 1.8M
        CPU: 161ms
Enter fullscreen mode Exit fullscreen mode

Top comments (0)