Let OSPF ignore the default route

Hi, I’m trying to get OSPF up and running
and would like to ask if I can somehow set it to ignore the default route and leave it as is.

Everything is between 2 routers, both connected to the internet, one has a DHCP address and this other one has a dynamic address via PPPoE. The OpenVPN server is running on this one. The first one is a client so I can easily set the route on the interface. For this server also, but after a connection failure the route disappears. Hence OSPF.
As you can see in the green entry, it works.
image.png
Unfortunately, OSPF also tries to create a new default route 2) via OpenVPN, which cuts a branch underneath itself, since everything is connected to the Internet via 1) Cetin PPPoE. So it gets into a cycle and keeps repeating.

I’d use Wireguard, but it only runs between 2 other routers in my current RouterOS v7.5 version, and I can’t add a third.
Is there a way to set it to leave the default route albeit dynamic as is?

I’m not sure I am understanding the problem, you are learning the OSPF route via the ovpn tunnel sure, but it comes at higher distance and is not currently Active in your screenshot, so shouldn’t be getting used at all. Or does it sometimes become the active route?

Either way, you can filter out default route in ospf route filters (ospf-out) on the far end (or possibly on the ospf-in on local end)

Great, thanks for the kick in the right direction, it led me to /routing/ospf/instance where I had all redistribute options enabled.
I left just static and it’s working normally now.

/routing/ospf/instance> print 
Flags: X - disabled, I - inactive 
 0   name="default-v2" version=2 vrf=main router-id=192.168.7.1 redistribute=static