I've got a LAN behind OpenVPN client (mikrotik router) which connects to a server, and allows access to the machines inside LAN for every other client that connects to the server. The LAN has its own subnet, other than other clients which connect to this server. I am unable to configure this client to force server to add route, which will properly route traffic for this subnet. Currently I have to manually go to the server and run:
route del -net <client's subnet> netmask 255.255.255.0 gw <old client's ip> route add -net <client's subnet> netmask 255.255.255.0 gw <new client's ip>
Is there anyway I could change server's settings to make it do that automatically?
Clients' ips are dynamic, and I would prefer to leave it this way. I've tried adding: The open vpn client settings on mikrotik router are quite limited, so there's not much I can do on the client's side, but I hoped there's something I could do on the server side to set the route upon client connection + push this route to other clients connecting. I have actually tried adding
push “route <client's subnet> 255.255.255.0”
on the server, but I still have to manually set the route on other clients. However the most important thing for me, is to set the OpenVPN server [system] route upon client's connection.