A lot of interesting responses here! And the correct answer goes to Claudio! ;)
Claudio correctly noted that if I am logging into the firewall via an SSH daemon running in a non-zero rdomain, then all commands I run in that SSH VTY will also be run under that rdomain :) And I will do some more testing with my cronjobs to figure out why I had to add route -T0 exec to my crons, maybe I broke something in login.conf. As always, thanks for your time and comments everyone! Always appreciated Andy > On 24 Oct 2023, at 18:51, Claudio Jeker <cje...@diehard.n-r-g.com> wrote: > > On Tue, Oct 24, 2023 at 08:39:33AM -0000, Stuart Henderson wrote: >>> On 2023-10-24, Andy Lemin <andrew.le...@gmail.com> wrote: >>> Hi all, >>> >>> Just a quick question. >>> >>> I have multiple rdomains. My outside rdomain (rdomain 0) has a single >>> default route to my ISP. And my internal rdomain 9 has multiple default >>> routes pointing to various pairX interfaces for some funky routing stuff. >>> >>> Everything works beautifully, however, every command I type on the box >>> locally or over SSH which needs internet for example, is being executed >>> under the internal rdomain, not the edge rdomain. >>> >>> So I have to run; >>> ‘route -T0 exec syspatch’ for example. >>> >>> How do I set/override the default rdomain for system level CLI commands? >> >> The basic answer to your question is "set rtable in login.conf for the >> relevant class". But that doesn't explain why your machine is not already >> using rtable 0.. >> > > Because I think login.conf(5) is wrong. The default rtable is not 0. If > rtable is not set the current rtable is not modified by login_cap(3). > > -- > :wq Claudio > > Index: login.conf.5 > =================================================================== > RCS file: /cvs/src/share/man/man5/login.conf.5,v > retrieving revision 1.70 > diff -u -p -r1.70 login.conf.5 > --- login.conf.5 31 Mar 2022 17:27:23 -0000 1.70 > +++ login.conf.5 24 Oct 2023 08:41:21 -0000 > @@ -284,7 +284,7 @@ Initial priority (nice) level. > Require home directory to login. > .\" > .Pp > -.It rtable Ta number Ta Dv 0 Ta > +.It rtable Ta number Ta "" Ta > Rtable to be set for the class. > .\" > .Pp >