Cara Menggunakan OpenVPN Pada Linux Desktop

Tidak semua user menggunakan os windows pada laptop/komputer mereka, dan disini saya akan menjelaskan bagaimana cara menggunakan openvpn terutama bagi anda yang menggunakan linux.

 

Disini saya menggunakan linux versi lubuntu, anda juga bisa menggunakan cara ini pada varian linux ubuntu lainnya.

Untuk install openvpn, bisa melalui terminal, command :

sudo apt-get update
sudo apt-get install openvpn

Hasil command installasi openvpn

yadi@yadi-PFN:~$ sudo apt-get install openvpn
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following additional packages will be installed:
 libpkcs11-helper1
Suggested packages:
 easy-rsa
The following NEW packages will be installed:
 libpkcs11-helper1 openvpn
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 465 kB of archives.
After this operation, 1,168 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://id.archive.ubuntu.com/ubuntu xenial/main amd64 libpkcs11-helper1 amd64 1.11-5 [44.0 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu xenial-updates/main amd64 openvpn amd64 2.3.10-1ubuntu2.1 [421 kB]
Fetched 465 kB in 18s (24.5 kB/s) 
Preconfiguring packages ...
Selecting previously unselected package libpkcs11-helper1:amd64.
(Reading database ... 177653 files and directories currently installed.)
Preparing to unpack .../libpkcs11-helper1_1.11-5_amd64.deb ...
Unpacking libpkcs11-helper1:amd64 (1.11-5) ...
Selecting previously unselected package openvpn.
Preparing to unpack .../openvpn_2.3.10-1ubuntu2.1_amd64.deb ...
Unpacking openvpn (2.3.10-1ubuntu2.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up libpkcs11-helper1:amd64 (1.11-5) ...
Setting up openvpn (2.3.10-1ubuntu2.1) ...
 * Restarting virtual private network daemon(s)... * No VPN is running.
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
yadi@yadi-PFN:~$

Jika anda pelanggan Premium Fast Network Anda bisa ambil openvpn secara gratis di halaman berikut.

Jika bukan, maka anda harus mencari config openvpn di internet dan lainnya.

Untuk menjalankan openvpn, jalankan pada terminal perintah berikut :

sudo openvpn --config namaconfig.ovpn

nameconfig.ovpn diganti sesuai dengan nama config file openvpn anda

Anda juga dapat menjalankan dengan spesific path, misalnya disini saya menyimpan pada folderĀ DocumentsĀ maka perintah pada terminal menjadi :

sudo openvpn --config ~/Documents/PFN-SG01-Config.ovpn

Log Tampilan :

yadi@yadi-PFN:~$sudo openvpn --config ~/Documents/PFN-SG01-Config.ovpn
Fri Mar 30 04:47:33 2018 Unrecognized option or missing parameter(s) in /home/yadi/Documents/PFN-SG01-Config.ovpn:15: block-outside-dns (2.3.10)
Fri Mar 30 04:47:33 2018 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Fri Mar 30 04:47:33 2018 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Fri Mar 30 04:47:33 2018 Control Channel Authentication: tls-auth using INLINE static key file
Fri Mar 30 04:47:33 2018 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 04:47:33 2018 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 04:47:33 2018 Socket Buffers: R=[87380->87380] S=[16384->16384]
Fri Mar 30 04:47:33 2018 Attempting to establish TCP connection with [AF_INET]xxx.xxx.xxx.xxx:1194 [nonblock]
Fri Mar 30 04:47:34 2018 TCP connection established with [AF_INET]xxx.xxx.xxx.xxx:1194
Fri Mar 30 04:47:34 2018 TCPv4_CLIENT link local: [undef]
Fri Mar 30 04:47:34 2018 TCPv4_CLIENT link remote: [AF_INET]xxx.xxx.xxx.xxx:1194
Fri Mar 30 04:47:34 2018 TLS: Initial packet from [AF_INET]xxx.xxx.xxx.xxx:1194, sid=9132d63f 0ed88e40
Fri Mar 30 04:47:35 2018 VERIFY OK: depth=1, CN=ChangeMe
Fri Mar 30 04:47:35 2018 Validating certificate key usage
Fri Mar 30 04:47:35 2018 ++ Certificate has key usage 00a0, expects 00a0
Fri Mar 30 04:47:35 2018 VERIFY KU OK
Fri Mar 30 04:47:35 2018 Validating certificate extended key usage
Fri Mar 30 04:47:35 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Mar 30 04:47:35 2018 VERIFY EKU OK
Fri Mar 30 04:47:35 2018 VERIFY OK: depth=0, CN=server
Fri Mar 30 04:47:36 2018 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Fri Mar 30 04:47:36 2018 Data Channel Encrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 04:47:36 2018 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Fri Mar 30 04:47:36 2018 Data Channel Decrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 04:47:36 2018 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Fri Mar 30 04:47:36 2018 [server] Peer Connection Initiated with [AF_INET]xxx.xxx.xxx.xxx:1194
Fri Mar 30 04:47:38 2018 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Fri Mar 30 04:47:38 2018 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.4 255.255.255.0'
Fri Mar 30 04:47:38 2018 OPTIONS IMPORT: timers and/or timeouts modified
Fri Mar 30 04:47:38 2018 OPTIONS IMPORT: --ifconfig/up options modified
Fri Mar 30 04:47:38 2018 OPTIONS IMPORT: route options modified
Fri Mar 30 04:47:38 2018 OPTIONS IMPORT: route-related options modified
Fri Mar 30 04:47:38 2018 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Mar 30 04:47:38 2018 ROUTE_GATEWAY 192.168.8.1/255.255.255.0 IFACE=wlp2s0 HWADDR=e8:39:df:6d:39:45
Fri Mar 30 04:47:38 2018 TUN/TAP device tun0 opened
Fri Mar 30 04:47:38 2018 TUN/TAP TX queue length set to 100
Fri Mar 30 04:47:38 2018 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Mar 30 04:47:38 2018 /sbin/ip link set dev tun0 up mtu 1500
Fri Mar 30 04:47:38 2018 /sbin/ip addr add dev tun0 10.8.0.4/24 broadcast 10.8.0.255
Fri Mar 30 04:47:38 2018 /sbin/ip route add xxx.xxx.xxx.xxx/32 via 192.168.8.1
Fri Mar 30 04:47:38 2018 /sbin/ip route add 0.0.0.0/1 via 10.8.0.1
Fri Mar 30 04:47:38 2018 /sbin/ip route add 128.0.0.0/1 via 10.8.0.1
Fri Mar 30 04:47:38 2018 Initialization Sequence Completed
Fri Mar 30 05:47:36 2018 TLS: soft reset sec=0 bytes=871404193/0 pkts=949734/0
Fri Mar 30 05:47:37 2018 VERIFY OK: depth=1, CN=ChangeMe
Fri Mar 30 05:47:37 2018 Validating certificate key usage
Fri Mar 30 05:47:37 2018 ++ Certificate has key usage 00a0, expects 00a0
Fri Mar 30 05:47:37 2018 VERIFY KU OK
Fri Mar 30 05:47:37 2018 Validating certificate extended key usage
Fri Mar 30 05:47:37 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Mar 30 05:47:37 2018 VERIFY EKU OK
Fri Mar 30 05:47:37 2018 VERIFY OK: depth=0, CN=server
Fri Mar 30 05:47:37 2018 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Fri Mar 30 05:47:37 2018 Data Channel Encrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 05:47:37 2018 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Fri Mar 30 05:47:37 2018 Data Channel Decrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 05:47:37 2018 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA

Untuk menonaktifkan openvpn, tekanĀ CTRL + C pada terminal, maka vpn akan putus dengan sendirinya dan kembali ke ip asal anda.

Fri Mar 30 05:47:37 2018 Data Channel Decrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Fri Mar 30 05:47:37 2018 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
^CFri Mar 30 05:59:06 2018 event_wait : Interrupted system call (code=4)
Fri Mar 30 05:59:06 2018 /sbin/ip route del xxx.xxx.xxx.xxx/32
Fri Mar 30 05:59:06 2018 /sbin/ip route del 0.0.0.0/1
Fri Mar 30 05:59:06 2018 /sbin/ip route del 128.0.0.0/1
Fri Mar 30 05:59:06 2018 Closing TUN/TAP interface
Fri Mar 30 05:59:06 2018 /sbin/ip addr del dev tun0 10.8.0.4/24
Fri Mar 30 05:59:06 2018 SIGINT[hard,] received, process exiting

Selesai

Leave a Reply

Your email address will not be published. Required fields are marked *