OpenVPN – Exclude specific IPs or networks from routes

In order to exclude a specific range or IP address, you need to add the parameter "net_gateway".

For example, it is necessary that the network "10.0.0.0/8" is routed through the VPN, but at the same time the network "10.0.1.0/24" is excluded from the route, the entry in the configuration file will look like this:

push "route 10.0.0.0 255.0.0.0"
push "route 10.0.1.0 255.255.255.0 net_gateway"

 

 

Tagged: Tags

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments