How to automatically add a line to bgpd.conf and zebra.conf

Started by gjarboni, September 12, 2019, 04:24:08 AM

Previous topic - Next topic
Hello,

I'm running OPNSense 19.7.3 with the frr plug-in. I'd like to be able to add a password to the end of zebra.conf & bgpd.conf.

The line would be either:

password <password>

or

no login

Either of these lines would give me access to the frr command line where it's a lot faster to type "show ip bgp" then look at Routing, Diagnostics, BGP (which sometimes doesn't show anything, unfortunately).

But I like the command line, so the above isn't a big deal. I just hate having to restart BGP (and potentially Zebra) every time I want to see what networks are being advertised to the OPNSense box via BGP.

Otherwise I have to restart bgpd every time I want to test things.

I looked at /usr/local/etc/rc.d/frr but couldn't see anything there. However shell scripting is not my forte, so I might have missed something.

Can this be done?

Thanks!


I hadn't tried that. It worked great, thanks!

Another frr question. Is it possible to start the frr daemons without enabling said daemons and (therefore) generating a config in the GUI? The need would be to use settings that aren't supported in the GUI yet (adding weights in BGP, for example). I'm not 100% sure that I'll need this functionality, but I might.

I see from: https://forum.opnsense.org/index.php?topic=8759.msg38959#msg38959 (number 12) how you can set up a shell scrupt in /usr/local/etc/rc.d/ to start software. So the question is then: does every file in /usr/local/etc/rc.d get run and if so, will a script placed there survive an update?

Thanks!

I'm you can set weights via via route-maps. If you want to use only pkg Just install via pkg install frr