Hello,
I want to run OVPN Server on one of my routerOS devices. I’ve succesfully setup ovpn server and configured in ethernet mode. I’ve also succesfully connected one of the clients to the ovpn server. Than I managed to configure ospf between this 2 routers and there comes the problem.
The network for the ovpn is 10.6.0.0/24.
After the client connects to the ovpn server, the server will create route with netmask /32
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
4 ADC 10.6.0.102/32 10.6.0.1 <ovpn-bela> 0
However, the client side will create route with netmask /24.
10 ADC 10.6.0.0/24 10.6.0.102 vpn-main 0
Then I want to add those network to ospf, on both sides I’ll add 10.6.0.0/24. Then I can see in logs that error:
10:17:50 route,ospf,info Discarding Hello packet: mismatch in network mask
10:17:50 route,ospf,info mine=255.255.255.255
10:17:50 route,ospf,info remote=255.255.255.0
10:17:50 route,ospf,info source=10.6.0.102
So after that I figured out that it is impossible to use ovpn+ospf in ethernet mode because of the netmask mismatch that is created by automatic routes.
However, during writing this post I’ve tried to use ovpn in ip mode and it is possible to use ospf but on ovpn server I must add every connected device to ospf network with netmask /32.
Is there any elegant solution to solve these problems ?
Thank you.