-
Notifications
You must be signed in to change notification settings - Fork 810
OpenVPN: Use OpenVPN's official p2p mode, consistent with standard OpenVPN behavior #8604
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
base: master
Are you sure you want to change the base?
Conversation
this will undo 66fd0e4 and reintroduce issues reported earlier (for both net30 as p2p). |
Can you describe the problem more precisely? I don't fully understand your statement, so I'll try to answer it.
|
@laozhoubuluo my mistake, I tightened the scope earlier for #7228 in 833765f, I'm just doubting changing this will be necessary as this will impact people with a If omitting the three additional parameters solves your issue, I don't mind having a look in omitting these, just let me know if that's the case. |
We have multiple networks in multiple points, and the networks are interconnected using OpenVPN or WireGuard. Due to the large number of points, the points change over time, and the interconnection requirements between each node vary, it is impossible to achieve full-mesh interconnection between all nodes. Considering the above problems, the current architecture uses a dynamic routing protocol to achieve interconnection between points (currently use BGP, and a private ASN number is assigned to each points. The points administrator manages the routing within the points). The P2P VPN interface address is only used for interconnection between two routers. The source address and destination address of the actual services are both addresses broadcast by the dynamic routing protocol, and there are situations where the source address and the destination are forwarded through multiple routers/firewalls. Both standard OpenVPN and WireGuard can meet this requirement, so theoretically there should be no technical problems in implementing the same scenario on OPNsense. The current scenario at OPNsense is different from the mainstream implementation and OpenVPN legacy, so I personally doubt whether there are many users who rely on this scenario. But if OPNsense deems it necessary, splitting into p2p and ovpn-p2p is also a viable option. |
I'm not sure what the question is, but if the p2p serves a larger net (<=29), the address calculation wouldn't be used in our case. Best go back to the drawing board and start with a ticket explaining what we are trying to fix and which circumstances. |
I'm create a new ticket #8622 for details. |
OpenVPN peer-to-peer tunnels in legacy mode can support traffic from any address instead of a specific peer-to-peer address. This is used for dynamic routing-based networking or scenarios where NAT is not allowed. This is achieved using OpenVPN's native p2p mode (mode p2p).
In the new version of the OPNsense's OpenVPN configuration interface, server mode (mode server) is hard-coded in the p2p scenario of configuring the /30 network segment. The server mode cannot support this scenario because it involves multiple clients. This causes traffic from non-specified peer-to-peer addresses to be dropped.
This PR restores OpenVPN's native p2p mode in peer-to-peer mode and removes client parameters that are invalid for real peer-to-peer requirements, thereby resolving this issue.
Ref: #7228