How Can We Help?

Can I setup OpenVPN through a 1:1 Dedicated IP on a Linux Servers

Yes, here’s a complete guide:

This tutorial shows you how to configure a Linux server to connect to a VPNUK 1:1 Dedicated IP using OpenVPN. This setup routes all traffic through the VPN, binds services to your VPN IP, and includes optional DDoS mitigation steps.

What You’ll Need

Step 1: Install OpenVPN

sudo apt update
sudo apt install openvpn -y


Step 2: Add the VPNUK Config

Save your .ovpn file as:

/etc/openvpn/vpnuk.conf

If your config file add this line for saving your credentials:

auth-user-pass /etc/openvpn/credentials.txt

Create that file:

sudo nano /etc/openvpn/credentials.txt

Add your login credentials on two lines:

yourvpnusername
yourvpnpassword

Secure it:

sudo chmod 600 /etc/openvpn/credentials.txt

Step 3: Enable Full VPN Routing

Edit vpnuk.conf and add these lines

redirect-gateway def1
auth-user-pass /etc/openvpn/credentials.txt

Step 4: Start the VPN

sudo openvpn --config /etc/openvpn/vpnuk.conf

Or run as a service:

sudo systemctl start openvpn@vpnuk
sudo systemctl enable openvpn@vpnuk

Step 5: Verify IPs

Check your assigned VPN internal IP (e.g. 10.133.177.x):

ip a show dev tun0

Check your public IP (should be your VPNUK 1:1 IP, e.g. 5.133.177.x):

curl https://api.ipify.org

Step 6: Bind Services to the VPN IP

Example: Bind SSH to VPN public IP (port 22)

Edit SSH config:

sudo nano /etc/ssh/sshd_config

Add or update:

Port 22
ListenAddress 5.133.177.x

Restart SSH:

sudo systemctl restart ssh