Trên server (Tested Ubuntu 16.04)
Tải script về:
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
Tiến hành cài đặt:
sudo ./openvpn-install.sh
Làm theo hướng dẫn trong script là cài đặt xong. Cuối cùng nó sẽ thông báo nơi chứa file openvpn:
Client test added, the configuration file is available at /home/kiennd/test.ovpn. Download the .ovpn file and import it in your OpenVPN client.
Tải file test.ovpn về
Sau khi cài xong, tải file
Mở file /etc/sysctl.conf thêm dòng:
net.ipv4.ip_forward=1
Apply config bằng lệnh:
sudo sysctl -p
Trên máy Windows Client:
Cài đặt OpenVPN client đúng với phiên bản hệ điều hành.
Vứt file test.ovpn đã tải ở bước trên vào thư mục C:\Program Files\OpenVPN\config
Chạy OpenVPN GUI trên Desktop và kết nối.