Can VyOS put OSPF routes in a specific table?

Is it somehow possible to put OSPF routes into a specific routing table? (it works for static routes).

I have a multi-homed set up and need to keep my routes and the default route separate for policy routing.
In the default configuration both default route (obtained via DHCP) and OSPF routes land in “main” which makes policy routing impossible.

Hi! Have you tried using VRFs in your setup? This should be able to help you segregate your routing tables. You can find more about VRFs here.

Indeed this would be an amazing solution if it worked.

It was actually suggested in Putting DHCP default gateway in different routing table - #8 by acosgrove . Since then I spent countless hours to get it working with no clear resolution (Simple source routing not so simple? (How to migrate this simple RouterOS example to VyOS) - #3 by exp, How can I make my wireguard tunnel accessible via policy routing? - #2 by 16again, Why do my outgoing TCP connections fail when ICMP and incoming connections are OK? - #11 by n.fort).

Either I misunderstand something completely about VRFs or there are big bad bugs in it (I’m afraid it’s the latter). So I am trying to scope if there are any other ways to implement source routing in a multi-homed setup.

Oh yeh… my bind-to-all suggestion was just for some of the services (SSH, SMTP). When dealing with dynamic routing you need to stick all of that in the vrf -> protocols section. Here’s a snippet of my stuff and Oracle OCI

Portion of my vrf config
vrf {
    bind-to-all
    name oracle {
        protocols {
            bgp {
                address-family {
                    ipv4-unicast {
                        redistribute {
                            connected {
                            }
                        }
                    }
                    ipv6-unicast {
                        redistribute {
                            connected {
                            }
                        }
                    }
                }
                neighbor 172.31.255.253 {
                    address-family {
                        ipv4-unicast {
                            prefix-list {
                            }
                            route-map {
                                export V4-ORACLE-OUT
                            }
                            soft-reconfiguration {
                                inbound
                            }
                        }
                    }
                    ebgp-multihop 2
                    remote-as 31898
                    update-source vti10
                }
                system-as 65020
            }
        }
        table 1000
    }
Routing table for oracle
vyos@vyos:~$ show ip route vrf oracle
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF oracle:
B>* 10.0.0.0/24 [20/0] via 172.31.255.253, vti10, weight 1, 00:02:57
C>* 172.31.255.252/31 is directly connected, vti10, 00:08:01
C>* 172.31.255.254/31 is directly connected, vti20, 00:08:01
C>* 192.168.2.0/24 is directly connected, dum100, 00:05:41