Got OpenVPN to start working for me. I can connect from my Linux client and browse the internet... for a few minutes. After that, no internet traffic comes in or out, nor can I ping 8.8.8.8. I can, however, still ping 10.8.0.1, so the tunnel is open, and I can ping IPs on my local network. Also, I did verify that internet in those first few minutes is actually going through the VPN. No one else is connecting to the VPN but me (which seems to be the first thing people think of when I describe the problem).
server.conf:
port 443
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 6
sndbuf 0
rcvbuf 0
client.ovpn:
client
dev tun
proto udp
remote "the server" 443
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
ca ca.crt
cert desktop.crt
key desktop.key
ns-cert-type server
comp-lzo
verb 3
sndbuf 0
rcvbuf 0
Also possibly of note, the results of route -n before connecting, while connecting (and it works), and while connecting (and it doesn't work):
[username@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
[username@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.8.0.5 0.0.0.0 UG 0 0 0 tun0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.8.0.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
"server ip address" 10.0.0.1 255.255.255.255 UGH 0 0 0 enp2s0
[username@tcl ~]$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 tun1
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
10.8.0.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
"server ip address" 10.0.0.1 255.255.255.255 UGH 0 0 0 enp2s0
Any idea why this is happening?