0

OpenVPN

Install OpenVPN Server

Download script untuk install OpenVPN:

curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh 
chmod +x openvpn-install.sh

Jalankan script:

./openvpn-install.sh

Selesai.

Untuk konfigurasi OpenVPN dan firewall dapat dilihat di:

/etc/rc.local -> Firewall 
/etc/openvpn/server/server.conf -> Konfigurasi OpenVPN

Jika ingin menambahkan user lain, dapat menjalankan ulang script di atas.

Command OpenVPN Server

sudo systemctl stop openvpn@server # <--- stop server
sudo systemctl start openvpn@server # <--- start server
sudo systemctl restart openvpn@server # <--- restart server
sudo systemctl status openvpn@server # <--- get server status

Install OpenVPN Client

Install package.

sudo apt install openvpn

Copy file .ovpn ke directory /etc/openvpn/, kemudian rename dengan extension .conf

sudo systemctl start openvpn@client  # <--- start client

IP forwarding pada Client

Buka file /etc/sysctl.conf

Uncomment baris #net.ipv4.ip_forward=1

Simpan file

Reboot