How can I configure openvpn server without push default gateway?
This is a client setting.
For Linux clients, in NetworkManager: Edit Connections -> VPN -> (select the vpn configuration you would like to edit) -> Edit -> IPv4/IPv6 -> Routes -> Check the box that says "Use this connection only for resources on its network"
Simply do not add the
redirect-gateway in the client or server configuration and the default gateway will not be changed.
route-nopull in the .ovpn file, or
--route-nopull on the command line.
You'll then have to set up the routes yourself, of course.
I found that removing
from my client.conf stops pushing default route from server.