Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Wireguard - Local & Destination Network Same IP Range
« previous
next »
Print
Pages: [
1
]
Author
Topic: Wireguard - Local & Destination Network Same IP Range (Read 8138 times)
Deku2
Newbie
Posts: 30
Karma: 1
Wireguard - Local & Destination Network Same IP Range
«
on:
February 24, 2022, 09:04:23 pm »
Setting up Wireguard and having a routing issue I suspect. We unfortunately used a common 192.168.1.0 address scheme in our office, but most home networks use a similar IP subnet. I have the WG network on 10.10.10.0, but can't seem to route out of the VPN to the local or external network on the destination. Is there any way to make this work with some type of 10.10.10.0 NAT? I rather not have to readdress the entire office to allow a few people to VPN in.
Logged
bartjsmit
Hero Member
Posts: 2005
Karma: 193
Re: Wireguard - Local & Destination Network Same IP Range
«
Reply #1 on:
February 25, 2022, 07:43:07 am »
There is no way around this. Every host will always use the local IP subnet before any routes.
You will need to change the IP range for the office or get your VPN users to change their home networks.
Bart...
Logged
Patrick M. Hausen
Hero Member
Posts: 6700
Karma: 564
Re: Wireguard - Local & Destination Network Same IP Range
«
Reply #2 on:
February 25, 2022, 08:36:56 am »
Quote from: bartjsmit on February 25, 2022, 07:43:07 am
There is no way around this. Every host will always use the local IP subnet before any routes.
Mostly but not entirely correct. If the local subnet is a typical /24 a single /32 host route will override that. So, while it's not pretty you can
- if the VPN users need to access only one or a few hosts (e.g.) Citrix
- tell the users to make sure these addresses are not part of their dynamic DHCP pool
- set host routes for all of these hosts in the users' wireguard configs
- the VPN users will use the tunnel address to connect, so you don't need to get fancy with NAT at the office
Alternatively, depending on which services need to be accessed:
- set up a remote access solution like Apache Guacamole (can do SSH, Telnet, RDP, VNC)
- use inbound NAT (port-forwarding) on the wireguard interface at the office to access that host
- let users activate a supposedly secure VPN connection and use Guacamole in a browser to access services
Third, least pretty and most error prone but if it works most transparent to users:
- set up an alternate subnet on some interface with a sufficient number of alias adresses
- set up wireguard to access these
- again use port-forwarding to redirect to your servers
I have not implemented the last option and would need to experiment if you can put the alias addresses on the wireguard interface (which would be the most sane and manageable way) or if you need another interface for that.
HTH,
Patrick
P.S. @bartjsmit I've seen things you people wouldn't believe ... Attack ships on fire off the shoulder of Orion ... er, no. I have seen enterprise setups with identical (10/8) networks on both sides, double NAT with DNS translation and Windows domain trusts across that. Not pretty
And not possible with just OPNsense.
«
Last Edit: February 25, 2022, 08:40:04 am by pmhausen
»
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
bartjsmit
Hero Member
Posts: 2005
Karma: 193
Re: Wireguard - Local & Destination Network Same IP Range
«
Reply #3 on:
February 25, 2022, 09:34:40 am »
Thanks Patrick, I bow to your superior knowledge
We had WFH users change their home subnets a few decades ago in a previous gig, but that was a bunch of techies.
An even uglier setup would be VM's on the remote users' workstations that only connect to the tunnel and don't see the local subnet
Sorry Jeff, I would apply the KISS principle
Bart...
Logged
Deku2
Newbie
Posts: 30
Karma: 1
Re: Wireguard - Local & Destination Network Same IP Range
«
Reply #4 on:
February 27, 2022, 04:19:23 am »
Thank you both for the comments! I'll have to think about which option would work best for us. 👍
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Wireguard - Local & Destination Network Same IP Range