OpenVPN connects, but no internet (only when the server is using a specific NIC)

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ykchen
OpenVpn Newbie
Posts: 1
Joined: Mon Feb 18, 2019 3:26 am

OpenVPN connects, but no internet (only when the server is using a specific NIC)

Post by ykchen » Mon Feb 18, 2019 3:33 am

(1) I set up an OpenVPN server on Ubuntu 18.04.2 LTS at home. The VPN service works perfectly when the server is using the WiFi interface. However, the VPN service does not work well when the server is using the ethernet interface. (The ethernet interface is working. Both WiFi interface and the ethernet interface are connected to the same home gateway. For testing purpose, I only enabled one of them.)

(2) When the server is using the ethernet interface, my client can still establish the connection to the VPN server. The client will be assigned a local IP address (10.8.0.2). That is, OpenVPN connects. However, there is no internet for the client. The client can ping 10.8.0.1, but cannot reach any other device behind this point (not even my home gateway).

(3) Disabling the firewall using "sudo ufw disable" does not make any difference.

(4) A glance of iptables rules (using "sudo iptables -L") does not seem to have any NIC specific rules.

(5) I am very confused why it works for one NIC, but not for the other NIC. When I am using the ethernet interface, I "turned off" the WiFi interface via "sudo ifconfig wlp2s0 down". When I am using the WiFi interface, I disconnected the ethernet cable. That is, there is only one NIC interface connected to the subnet at one time.

Here is OpenVPN configuration file information (/etc/openvpn/server.conf):

Code: Select all

port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-auth ta.key 0
topology subnet
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.4.4"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem

Post Reply