I'm trying to configure a site-to-site connection using OpenVPN, and I'm experimenting with dynamic routing. I read on someone’s blog that this is impossible to achieve on RouterOS v6. I tried again on RouterOS v7, but the same issue occurs.
I know that site-to-site OpenVPN works fine with static routing, but I'm curious whether it’s possible to make it work with dynamic routing (OSPF or BGP).
Has anyone successfully implemented this, or can confirm whether it’s supported?
For dynamic routing on a site-to-site VPN you need a tunnel that can transport any traffic as controlled by a routing table. VPN protocols that use a “policy” defining what to route (local and remote subnet) cannot be used, unless you layer such a tunnel (IPIP, GRE, L2TP) on top of them.
OSPF works fine with OpenVPN - the only “difficulty” is that the openvpn server side has a mask of /32, where the mask of the clients is by default /24, configurable with the netmask= parameter on the OpenVPN server. I opted to set a /32 on both sides, and for it to work, the OSPF interface type has to be set to ptp.
For fun, I added a second OpenVPN client to the mix (router2) with almost the same configuration as router3. On router4 (the OpenVPN server), I added an entry to /interface/ovpn-server to bind the second username and interface, and added it to the OSPF interface-template.
I just logged into the forum again after a hectic week. I appreciate all the suggestions and answers. I’ll run a quick lab as soon as possible, and I’ll let you know if I run into any other issues.