I currently configure an OpenVPN server on ubuntu 20 using this config; It will give private subnet (172.31.40.0 255.255.240.0) access to the clients, But this VPN redirect the client's internet traffic through my VPN. I want to disable this while preserving the private subnet access to the clients.
I tried removing these line as per the docs # push "redirect-gateway def1 bypass-dhcp"
But the client cant access the internet, and Clients get the no-internet error on browsers.
local 172.31.40.170
port 1500
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
client-to-client
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "route 172.31.40.0 255.255.240.0"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "block-outside-dns"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
verb 3
crl-verify crl.pem
explicit-exit-notify