Linux WireGuard Setup

Follow this guide to set up WireGuard on your Linux system

1

Install WireGuard

Install WireGuard using your distribution's package manager:

Ubuntu/Debian
Fedora
Arch Linux
CentOS/RHEL
sudo apt update
sudo apt install wireguard
sudo dnf install wireguard-tools
sudo pacman -S wireguard-tools
sudo yum install epel-release
sudo yum install wireguard-tools
💡 Tip: Most modern Linux distributions include WireGuard in the kernel (5.6+). You only need to install the tools.
2

Get Your Configuration

Download your WireGuard configuration from the GetIP.online dashboard.

⚠️ Account Required: You need to create an account and generate a tunnel first.

Create Account
3

Configure WireGuard

Set up your WireGuard configuration:

  1. Copy your configuration to the WireGuard directory:
    sudo cp ~/your-tunnel.conf /etc/wireguard/wg0.conf
    sudo chmod 600 /etc/wireguard/wg0.conf
  2. The configuration file should be readable only by root for security
⚠️ Security Note: Always protect your WireGuard configuration files. They contain your private keys.
4

Start Your Tunnel

You can start WireGuard using either method:

Method 1: Using wg-quick (Recommended)

# Start the tunnel
sudo wg-quick up wg0

# Stop the tunnel
sudo wg-quick down wg0

Method 2: Using systemd

# Enable and start the service
sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0

# Check status
sudo systemctl status wg-quick@wg0
💡 Auto-start: Using systemd with enable will start your tunnel automatically on boot.
5

Verify Connection

Check that your tunnel is working correctly:

Check WireGuard status:

sudo wg show

Check IPv6 connectivity:

# Check your IPv6 address
ip -6 addr show

# Test IPv6 connectivity
ping6 google.com

# Check routing
ip -6 route show
💡 Test IPv6: Open your browser and visit test-ipv6.com to verify your IPv6 connection.
6

Additional Configuration

Enable IPv6 forwarding (if needed):

# Temporary
sudo sysctl -w net.ipv6.conf.all.forwarding=1

# Permanent
echo "net.ipv6.conf.all.forwarding=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Firewall configuration:

If you're using a firewall, allow WireGuard traffic:

# For UFW
sudo ufw allow 51820/udp

# For firewalld
sudo firewall-cmd --add-port=51820/udp --permanent
sudo firewall-cmd --reload
?

Troubleshooting

Connection fails to start

  • Check if the WireGuard module is loaded: lsmod | grep wireguard
  • Verify configuration syntax: sudo wg-quick strip wg0
  • Check system logs: sudo journalctl -xe | grep wireguard

No internet after connecting

  • Check DNS resolution: nslookup google.com
  • Verify IPv6 is enabled: cat /proc/sys/net/ipv6/conf/all/disable_ipv6 (should be 0)
  • Check firewall rules aren't blocking traffic

Performance optimization

  • Enable BBR congestion control: sudo sysctl -w net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr
  • Adjust MTU if needed in your configuration file

All Set!

You're now connected to the IPv6 internet through GetIP.online. Your tunnel will remain active for 30 days.

Manage Tunnels Other Platforms