-
Notifications
You must be signed in to change notification settings - Fork 3k
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
How subnet conflicts are resolved? #565
Comments
Hi, your sample CCD files do not truly match what you are saying. Now, what will the VPN server do with this traffic? Either this traffic has to go somewhere else (look up the system routing table) or should be redirected to another client. If multiple clients are responsible for the same network, I believe simply keeps the directive of the last client that connected to the server (basically it overwrites any previous directive). Therefore it's up to you to resolve the conflict somehow. OTOH if you are using DCO on Linux, |
@ordex |
The clients will be assigned unique IP addresses on the VPN interface anyway. So if you want to "access the client", use these. If you want to access something on the LAN side of the client, and multiple clients use the same subnet, this is not something OpenVPN can fix for you - iroutes must be unique, or it will pick one or the other (first client to connect, or last client to connect, not sure, but "not determined by config"). |
@balck-paint maybe you should start from scratch and think about the logic steps you'd need to determine what exact LAN you want to connect to. From there, you may be able to figure out how to implement that on your side. You wrote "what my c really wants to access is the subnet of client B", but this is not something that can be converted to machine rules. What about other clients? Will the target LAN change over time? if yes, based on what? This said, I hardly believe OpenVPN alone can help you here. |
Am 06.06.24 um 09:32 schrieb Gert Doering:
The clients will be assigned unique IP addresses on the VPN interface
anyway. So if you want to "access the client", use these.
If you want to access something on the LAN side of the client, and
multiple clients use the same subnet, this is not something OpenVPN can
fix for you - iroutes must be unique, or it will pick one or the other
(first client to connect, or last client to connect, not sure, but "not
determined by config").
Or you can have different subnet between client and server and map them
with client-nat on the OpenVPN client side to the non-unique ones but
that is a setup that needs to be well planned and should be avoided in
the first place.
Arne
|
If two clients are configured with the same subnetwork segment, for example, client A and client B are configured with ccd iroute push 192.168.2.0 255.255.255.0, client C accesses 192.168.2.x, and the server cannot determine who to forward to. Can I implement specified forwarding? For example, what my c really wants to access is the subnet of client B
`
clientA ccd
iroute 192.168.1.0 255.255.255.0
iroute 192.168.2.0 255.255.255.0
`
`
clientB ccd
iroute 192.168.1.0 255.255.255.0
iroute 192.168.2.0 255.255.255.0
`
`
clientC ccd
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.2.0 255.255.255.0"
`
The text was updated successfully, but these errors were encountered: