OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: gjarboni on September 12, 2019, 04:24:08 am

Title: How to automatically add a line to bgpd.conf and zebra.conf
Post by: gjarboni on September 12, 2019, 04:24:08 am
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:

Code: [Select]
password <password>
or

Code: [Select]
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!
Title: Re: How to automatically add a line to bgpd.conf and zebra.conf
Post by: mimugmail on September 12, 2019, 05:48:06 am
Did you try


vtysh

Via CLI?
Title: Re: How to automatically add a line to bgpd.conf and zebra.conf
Post by: gjarboni on September 12, 2019, 08:10:37 pm
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 (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!
Title: Re: How to automatically add a line to bgpd.conf and zebra.conf
Post by: mimugmail on September 12, 2019, 09:26:52 pm
I'm you can set weights via via route-maps. If you want to use only pkg Just install via pkg install frr
Title: Re: How to automatically add a line to bgpd.conf and zebra.conf
Post by: gjarboni on September 16, 2019, 09:12:13 pm
Will do. Thanks for your help!