To accurately speedtest a Celo VPN remote access connection using OpenVPN, the configuration requires specific attention to network interface selection and MTU settings. First, ensure the OpenVPN server configuration (server.conf) utilizes a TUN interface (dev tun). This creates a virtual network interface dedicated to the VPN tunnel.
dev tun
proto udp
port 1194
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
auth SHA256
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
On the client side (client.conf), specify the same protocol and TUN device. Crucially, adjust the MTU (Maximum Transmission Unit) and MSS (Maximum Segment Size) to account for VPN overhead. A typical starting point is mssfix 1400 and tun-mtu 1500. Lower these values if speedtests consistently report lower-than-expected bandwidth.
client
dev tun
proto udp
remote celo-vpn.example.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 3
mssfix 1400
tun-mtu 1500
Proper routing is essential for accurate Celo VPN speedtest results. The OpenVPN server configuration should push the VPN gateway as the default route for all client traffic (push "redirect-gateway def1 bypass-dhcp"). This ensures all traffic, including speedtest traffic, is routed through the VPN.
DNS configuration is equally important. Push DNS server addresses through the VPN tunnel to prevent DNS leaks and ensure consistent resolution. Use reputable public DNS servers or, ideally, a private DNS server within the VPN's network.
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
On the client, verify that the routing table reflects the VPN gateway as the default route after the VPN connection is established (route print on Windows, netstat -rn on Linux/macOS). Also, confirm that DNS queries are being resolved by the pushed DNS servers (nslookup google.com). If DNS leaks are detected, manually configure the client's DNS settings to use only the VPN's DNS servers.
Firewall rules on both the server and client must allow UDP traffic on the OpenVPN port (1194 in the example). On the server, ensure the firewall allows forwarding of traffic between the VPN tunnel interface and the external interface. For example, using iptables on Linux:
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -A FORWARD -o tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Performance optimization involves selecting an appropriate cipher. While AES-256-CBC offers strong security, it can be computationally intensive. Consider using AES-128-GCM for improved performance with a slight reduction in security. Ensure hardware acceleration (AES-NI) is enabled on the server if supported. The comp-lzo option, while intended for compression, can sometimes introduce latency and reduce speedtest results, so test performance with and without it.
To verify the Celo VPN speedtest configuration, use multiple speedtest services (e.g., speedtest.net, fast.com, nperf.com). Compare results obtained with and without the VPN connection to quantify the VPN's impact on bandwidth. Monitor CPU utilization on the server during speedtests to identify potential bottlenecks.
A common pitfall is incorrect MTU/MSS settings, leading to packet fragmentation and reduced throughput. Start with conservative values (MTU 1400, MSS 1360) and gradually increase them until optimal performance is achieved. Another pitfall is DNS leaks, which can skew speedtest results by routing traffic outside the VPN tunnel. Always verify DNS resolution after establishing the VPN connection. Finally, ensure the speedtest server selected is geographically close to the VPN server to minimize latency and obtain more accurate results.