Route a subnet except an IP to the tunnel

This is the forum to post your config. Include diagrams, usage graphs, and all the other goodies to show off your network.
Post Reply
julienmru
OpenVpn Newbie
Posts: 1
Joined: Fri Aug 25, 2017 5:14 am

Route a subnet except an IP to the tunnel

Post by julienmru » Fri Aug 25, 2017 5:16 am

Dear all,

My OpenVPN public IP is 1.2.3.4, and I'd like to route 1.2.3.0/24 to the OpenVPN tunnel. If I do this, OpenVPN stops working because 1.2.3.4 is also being routed on the VPN. Of course I can split my subnet in smaller chunks, but I was wondering if there's a way to push a configuration telling the client to route 1.2.3.4 via its default gateway and not via the VPN.

Thanks for sharing your ideas :)

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 3232
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route a subnet except an IP to the tunnel

Post by TinCanTech » Fri Aug 25, 2017 1:06 pm

See --redirect-gateway in The Manual v24x

Post Reply