GL-MT2500 OpenVPN Server not to act default Gateway (ie NO push redirect-gateway)

What I want is not to force OpenVPN server to be default gateway but serve push routes only Subnets I want

Currently if I Iedit this config file it is gets overwritten.

cat /tmp/ovpnserver/ovpnserver



auth SHA256

cipher AES-256-GCM


dev ovpnserver

dev-type tun

group nogroup

keepalive 10 120

mode server

mute 5

port 1194

proto udp

push “persist-key”

push “persist-tun”

push “redirect-gateway def1”

route-gateway dhcp

topology subnet


user nobody

mark 524288

verb 3


So what I want to be able to remove

push “redirect-gateway def1”

route-gateway dhcp

lines and add push route lines for 2 subnets I want.

You could do the gateway thing on the client side by adding to the client configuration file:

pull-filter ignore redirect-gateway

1 Like

This config file is generated by /lib/netifd/proto/, you can edit it to remove default options you don’t want.