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

persist-key

persist-tun

auth SHA256

cipher AES-256-GCM

ncp-disable

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

duplicate-cn

user nobody

mark 524288

verb 3

server 10.19.0.0 255.255.255.0

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/ovpnserver.sh, you can edit it to remove default options you don’t want.