-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os-frr: No support for authentication in BGP #1972
Comments
|
I failed in my tests with just passwords, doesn't this require some kernel tweaks? |
|
I played with this a bit, 2 problems @fichtner for this I need TCP_SIGNATURE in kernel ( FRRouting/frr#1479 ) |
|
@mimugmail I don't think we currently can distinct the different sa entries, in which case I expect the manual ones might be dropped by the ipsec module (haven't tested it). The current construction isn't great, but it's quite time consuming to workout better alternatives, which I'm currently not planning to invest (if I'm not mistaken, ideally the policies should be assigned after the tunnel comes up, for which we miss events. Last time I spend time on setkey, I also remember the documentation and examples weren't really helpful). |
|
@AdSchellevis Users of BGP with IPsec in combination should be near zero as the encrypted traffic is already safe. |
|
@mimugmail sure, I can live with that if it doesn't lead to weird race conditions (at a first glance this looks quite static). If we can exclude these entries easily, I don't even mind changing some of the ipsec code, but someone needs to test it and collect the different scenarios that do exist. |
|
I've got a provider that insists on password authentication for BGP. This would be nice to have. |
|
@fichtner what so you think about adding signature support to kernel? |
|
Well, does it work nowadays? |
|
In the first step we need to add kernel support in general as this is no real authentication inside BGP protocol, rather on the TCP layer. In a second step we have to add/manipulate for each neighbor the SPD database like with ipsec, but I can't test second when kernel features are missing. |
|
@fichtner any news about MD5 Kernel support? |
|
Well with the WireGuard fiasco over at pfSense, I’m really eager to move over here. This is the most significant barrier to that means. Any update? |
|
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
|
Please reopen and assign me .. some day I can motivate @fichtner to add this option :) |
|
@mimugmail I went back in tools git but I never found a kernel that didn't have TCP_SIGNATURE unset... https://github.com/opnsense/tools/blob/ae1fabd98527460cddac3c74335259a3500fc13a/config/21.1/SMP#L18 What am I missing? |
|
Hm, I was under the impression it's not in yet, maybe I looked at the wrong files or we crosstalked in IRC. |
+1. Showstopper for us right now. Upstream demands that we set a neighbor password and our environment demands that we set
as well as
once FRR 7.5 is introduced. Right now OpnSense is on 7.4 so this isn't an issue yet but soon will be. No doubt it is impossible to expose all possible scenarios in the GUI without making it look ridiculous - FRR is vast. But Perhaps as a compromise for now expose a RAW CONFIG in the GUI where one can override the settings. That way we can use the GUI to get most of the way there and then add the 1 or 2 extra lines of needed tweaks to the resulting config file. This could come in especially handy when FRR 7.5 is added to OpnSense as it has new RPKI capabilities that are becoming best-practice right now and one needs a way to enable that down the track, too. |
No chance. You can use FRR manually as a FreeBSD port/package if the plugin cannot cover your use cases. |
|
I'd also like to migrate away from pfSense and have the same requirement from my upstream provider to use MD5 authentication and multihop 2. Is there any way I can help to fix this issue? |
|
The required module seems to be present and loaded in vanilla OPNsense 21.1.5: I will try install the FRR FreeBSD package, make it work and then work my way from there. I am guessing the MD5 TCP secret has to go into ipsec.conf as it would on FreeBSD-12.2
I gather the challenge here lies in not making os-frr overwrite or break actual IPSEC secrets? |
|
https://bird.network.cz/pipermail/bird-users/2018-March/012094.html In a file somewhere: Then: Seems to work, but I didn't check in live system. |
|
@mimugmail I'm not a huge fan to be honest, my experience so far is that some day someone opens ticket why this can't be combined and starts rambling everything is stupid. If it's the only way, so be it, but if we can engineer something smarter that would be my preference. |
|
I'm not sure about the glue between spd in legacy code and frr mvc .. but I'll have a look :) |
|
If you guys need someone for testing ping me... I have the same problem on vultr.com |
|
Ok, I successfully tested the approach above by hand, I try to get a draft next week. :) |
|
@mimugmail any progress so far? Can we test it? |
|
I try to start this evening, thx for the reminder :) |
|
@mimugmail Can i buy you a coffee? 😄 |
|
Sure :) |
|
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
|
This is already implemented, so help wanted is not correct :) |
|
Hi Guys, it seems it doesn't work using the below: FRRouting 7.5.1 (OPNsense.localdomain). Do you think the fix will come in the plugin itself with upcoming release ? |
|
It never worked for us. Session with IPv6 and bidirectional setkey MD5 secret just stays "Active". Logs show an error that may or may not be relevant Just tried again from scratch as the last time I tried was ~12 months ago. Now on OPNsense 22.7.11-amd64 |
|
Can you add a screenshot of neighbor config? |
Sure thing! The MD5 secret has no special characters and is of this sort of format: The prefix lists allow one prefix to be announced and default route to be received. Sanitized running config: |
|
You need to fill local Initiator IP to get this working. Maybe something for the docs |
Oh, it is not resolving from Should this work IPv6 - only ? |
|
It is used for setkey parameters |
|
Cool - will test it tomorrow. Thanks |
|
Tested and confirmed - it is working . Thanks everyone ! |
|
Seems like this implementation only works for IPv4 BGP peers? |
|
This has been my experience too. Cannot turn up a session with an IPv6 neighbor. |
|
Can you post the contents of the files in the PR above? Dont see a reason why it shouldnt work with v6 |
Line 63 + 65 in Seems to be described in the manpage for setkey as well;
|

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
[x] When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
For a sane production setup, BGP routing should be protected at least by a password.
Describe the solution you'd like
A field should be added to the neighbor table taht contains the MD5 password used to authenticate to the given neighbor. The fields content needs to be added as 'neighbor password ' to the configuration if set to a concrete value.
See also http://docs.frrouting.org/en/latest/bgp.html#clicmd-[no]neighborPEERpasswordPASSWORD
Describe alternatives you've considered
Running BGP without passwords, but I would consider this insecure and unsuited for production use.
The text was updated successfully, but these errors were encountered: