Setting Up an OpenVPN Server

Setting Up an OpenVPN Server

OpenVPN is a battle-tested VPN solution with broad client compatibility. The easiest way to set it up is using the angristan install script.

Step 1 — Run the Install Script

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

The script will ask for your server IP, port (default 1194 UDP), DNS provider, and first client name. It configures everything automatically.

Step 2 — Open Firewall Port

ufw allow 1194/udp

Step 3 — Download the Client Config

The script generates a .ovpn file (e.g., client1.ovpn) in the current directory. Transfer it to your device:

scp root@YOUR_SERVER_IP:/root/client1.ovpn ~/

Step 4 — Connect from Your Device

  • Windows/macOS: Download the OpenVPN client from openvpn.net/client and import the .ovpn file
  • Linux: apt install openvpn -y && openvpn --config client1.ovpn
  • Android/iOS: OpenVPN Connect app — import the .ovpn file

Add Additional Clients

bash openvpn-install.sh

Run the script again and choose Add a new client.

Revoke a Client

bash openvpn-install.sh

Choose Revoke existing client.

WireGuard vs OpenVPN

  • WireGuard: Faster, simpler config, modern cryptography
  • OpenVPN: Wider device compatibility, better firewall traversal (TCP mode on port 443)
  • 0 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

Securing SSH Access

Securing SSH Access SSH is the main entry point to your server. Hardening it is one of the most...

Setting Up a Firewall with UFW

Setting Up a Firewall with UFW UFW (Uncomplicated Firewall) makes managing firewall rules...

Installing Fail2Ban to Prevent Brute Force Attacks

Installing Fail2Ban Fail2Ban monitors your log files and automatically bans IP addresses that...

Setting Up Let's Encrypt SSL Certificates

Setting Up Let's Encrypt SSL Certificates Let's Encrypt provides free, trusted SSL certificates....

Scanning for Rootkits with rkhunter and chkrootkit

Scanning for Rootkits Rootkits are malware that hide from standard detection tools. Two widely...