Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com

This Blog is protected by DMCA.com

huuphan.com. Powered by Blogger.

How to connect openvpn server from a linux computer

Connect access server (VPS) from a linux computer. In this tutorial, I will access server VPS installed OpenVPN server from a linux computer. Ref to How to setup OpenVPN Server on Centos 7
  • Install openvpn client on linux
  • Run Openvpn client with .ovpn file for example: client.ovpn

Install OpenVPN client on linux 

Fedora/CentOS/RedHat client
sudo yum install openvpn

Ubuntu/Debian client
sudo apt-get install openvpn

Checking Openvpn client version
[[email protected] ~]$ openvpn --version
The output as below:
OpenVPN 2.4.6 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Apr 26 2018
library versions: OpenSSL 1.1.0h-fips  27 Mar 2018, LZO 2.08

Running the OpenVPN client linux computer with the downloaded client config ovpn file:
[[email protected] vpn-client-01-config]$ sudo openvpn --config client.ovpn
The output OpenVPN client linux connect to server OpenVPN server as below:
Sun Jul  1 21:43:35 2018 TUN/TAP device tun0 opened
Sun Jul  1 21:43:35 2018 TUN/TAP TX queue length set to 100
Sun Jul  1 21:43:35 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Sun Jul  1 21:43:35 2018 /sbin/ip link set dev tun0 up mtu 1500
Sun Jul  1 21:43:35 2018 /sbin/ip addr add dev tun0 172.0.1.2/24 broadcast 172.0.1.255
Sun Jul  1 21:43:35 2018 /sbin/ip route add 138.162.27.9/32 via 192.168.1.1
Sun Jul  1 21:43:35 2018 /sbin/ip route add 0.0.0.0/1 via 172.0.1.1
Sun Jul  1 21:43:35 2018 /sbin/ip route add 128.0.0.0/1 via 172.0.1.1
Sun Jul  1 21:43:35 2018 Initialization Sequence Completed
How to connect openvpn server from a linux computer

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com