OpenVPN not routing traffic

Need help configuring your VPN? Just post here and you'll get that help.

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
mauricio.lopes
OpenVpn Newbie
Posts: 1
Joined: Fri May 26, 2023 2:41 pm

OpenVPN not routing traffic

Post by mauricio.lopes » Fri May 26, 2023 3:04 pm

Hello, good morning,

I have an OpenVPN Community Edition installed, version 2.6.4, and I have already removed the line "push "redirect-gateway def1 bypass-dhcp"". I have tried modifying my server.conf file multiple times, but even so, my clients who connect to my server have their internet traffic routed through the VPN. What I actually want is to route only the traffic for the machines on the local network through the VPN, while allowing other traffic to use the client's internet connection. What am I doing wrong? Could you help me?

server.conf
local 172.31.92.206
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
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"
client-to-client
keepalive 10 120
cipher AES-256-CBC
max-clients 50
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 3
explicit-exit-notify 1
auth SHA512
tls-crypt tc.key


client.ovpn
client
dev tun
proto udp
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
verb 3
<ca>
-----BEGIN CERTIFICATE-----
xxx
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
xxx
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
xxx
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
xxx
-----END OpenVPN Static key V1-----
</tls-crypt>

Post Reply