How to handle overlapping LAN subnets for multiple VPN clients in pfSense?
-
Hi everyone,
I am creating a complete VPN network. The idea is that I have multiple customer that need VPN gateways to their LAN's networks. Each customer can't access a LAN they don't belong. It's also only for creating external access, the endpoint from each LAN's won't start a communication through a VPN tunnel.
The issues start here, each customer have their own private IP addressing, which mean two LAN can have the exact same subnet.
So I don't know how can I route this on the pfSense server, tried static route, but I can't separate into each tunnel, so IP overlap issue won't be solved. I also tried NAT and firewall rule, but couldn't get to work.
I also saw something about dynamic routing in the documentation, but I need to have one pair per tunnel only, from what I understood, to make it work, and I didn't get how I could connect tunnels in the server.
Tried only with WireGuard yet, will try with OpenVPN and IPsec too, but I think I will face the same problems.
Below a scheme of what I'm creating if it makes sense, simplified tunnels with dashed lines.
Thanks in advance for tips.
English is not my native language, tell me if something wasn't explained properly, I will clarify.

-
@Elouan said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
which mean two LAN can have the exact same subnet
You can't have that. You will have to move clients to different subnets.
-
Like two different streets in a same city,both streets have the same name : don't even try that. The poste office will have a hard job routing the lettres.
Btw : in a simple world, the one before VPN was invented, everybody could keep his LAN at 192.168.1.0/24. It's also the default LAN network for many ISP boxes.
Then came the VPN .... and know you know it's probably better to pick something else. Not a big deal, RFC1918 is big enough ^^ -
A friend of mine likes to use the 10 range using the street address to determine the next 2 octets. I like to use the 172.16 range for transit addresses, such as VPNs, I also like to use higher ranges in 192.168 for my home network (192.168.42.0/24 is taken
), but only even numbers. These types of odd strategies need to be socialized to our less network aware friends to reduce these collisions.I think your only low trouble solution is to change 1 or more of the client networks. Changing a network's subnet will be less trouble than any work-a-round to the collision.
-
Yup you would need to binat the traffic at both ends to obscure the remote sunbets and prevent a conflict.
But I would also recommend using separate servers for each customer to ensure separation of traffic.
What is the VPN device at the customer site?
-
@Gertjan said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
in a simple world, the one before VPN was invented, everybody could keep his LAN at 192.168.1.0/24. It's also the default LAN network for many ISP boxes.
Then came the VPN ....This is why everyone who can should move to IPv6. IPv4 became inadequate the day it became necessary to use NAT to get around the IPv4 address shortage.
-
@AndyRH said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
Changing a network's subnet will be less trouble than any work-a-round to the collision.
And it's quite easy to do with DHCP.
-
Thanks for the rapid answers, a bit sad we can't just completely isolate a tunnel from another. I think using multiple server will be the easiest solution to implement, maybe centralize that with port forward rules, I need to think about this.
@JKnott said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
@AndyRH said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
Changing a network's subnet will be less trouble than any work-a-round to the collision.
And it's quite easy to do with DHCP.
Would be great if I could manage all those LANs, but it is not always the case.
@stephenw10 said in How to handle overlapping LAN subnets for multiple VPN clients in pfSense?:
Yup you would need to binat the traffic at both ends to obscure the remote sunbets and prevent a conflict.
But I would also recommend using separate servers for each customer to ensure separation of traffic.
What is the VPN device at the customer site?
Binat seems a bit hard and a pain to manage, will skip this I think. And the VPN device would be Teltonika TRB140, just a 4G router that support multiple VPN, including WireGuard, OpenVPN and IPsec.
-
You could probably force this to work using policy routing but it's going to be very limiting. And using separate servers provides enough other advantages that's what I would do. Unless it's somehow impractical, like you'd need hundreds of servers maybe.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy