Nonetheless, I read that with wireguard you should use a own new subnet and can’t be added to a bridge due to how wireguard works (layer 3).
However, we have 4 locations which are connected via ipsec. At the moment all road warrior clients connect via l2tp/ipsec to location A, get a ip address via dhcp from the according subnet (e.g. office subnet) and can e.g. access also services at location 1-4. This is possible e.g. because the office subnet from location A is allowed to access some service at location B.
Now with wireguard I’m looking for a solution so that the wireguard road warriors act like they have a ip adress from the existing office subnet without reconfigurating all firewall rules of all locations. I’m afraid I wasn’t able to google a working solution. Think I’m missing some basic network understanding.
Might be more helpful to first have a drawing clearly showing what you currently have and how you would like it to work.
Pay attention to all used subnets (also clients) and what needs to connect to where.
Export of your current config of the device acting as central hub might also be needed (minus serial number, public WANIP and Private/Public keys)
Yes, it’s possible if you are able to allocate a free subnet for the remote clients within that adress range like for example 10.4.10.0/29 (6 clients) or 10.4.10.0/28 (14 clients).
Just bear in mind that the Mikrotik WG implementation doesn’t offer dynamic allocation of ip addresses (of your office address subnet) thus you have to allocate a static ip for each client.
Without a much clearer set of requirements that doesnt talk about the config in any way, and a network diagram, wont touch it with a 10 foot pole. https://forum.mikrotik.com/viewtopic.php?p=908118
Drawing of the network setup is enclosed. I configured a test setup according to Larsa with a wireguard with an ip range within the subnet. However, tunnel is up an running (handshake), but no connection is possible within the subnet 10.1.10.0/24
What is my goal?
I want that road warriors get an ip address within the ip range 10.1.10.0/24
OR
kind of routing is working so that the road warrios “behave” like they have a ip address within the ip range 10.1.10.0/24
Okay, so a few differences wireguard is peer to peer.
So you have choices,
a. connect RW to site 1 directlly via wireguard and
b. connect RW to site 2 directly via wireguard OR
c. connect RW to site1 directly and via the same or different wireguard interface on site 1 relay to site2 OR
d. connect RW to site 2 directly and via the same or different wiregard interface on site 2 relay to site 1
Connectivity is very much dependent upon which ROUTERS have accessible public IP addresses or have routers in front of them that can port forward to the MT.
IN terms of connecting the two devices, it would be important to know this fact as then one will be a client for the initial handshake and the other the server.
If they both are capable then we can expand that to either way. Is one of them the Central site (1) and other a branch site (2).
Is there any reason you may want to keep the tunnel between the two routers separate from the tunnels of RW to Sites, it adds complexity and overhead without gaining any security as the routes, peers allowed and firewall rules will permit granular control of access…
Finally are both sites Mikrotik devices ??
It speaks as I said to stating clearly the users needs… telling me they get an office IP is useless and not how WG works.
What I need to know are the users requirements.
a. connect to other users/devices on subnet A at site 1
b. connect to a single device on subnet B at site 2
c. access the internet through Site 3
That is traffic originating at the RW !
Now between site1 and site 2 you would need to detail users originating traffic to each other
site 1 users to site 2
site 2 users to site 1
admin traffic ( assuming at R1 to config R1, at R2 to config R2) but via wireguard.
R1 admin able to config R2
R2 admin able to config R1
RW admin to be able to config both R1 and R2 ???
The intent of wireguard is not to provide the same subnet addressing that may exist on the office LAN.
I believe zerotier or other methods are better suited to such endeavours. Wireguard is peer to peer.
What you can do as a RW is come out of the tunnel and then through firewall rules.
access any device or user on any subnet as required and setup by the admin.
THERE IS NO NEED to be part of the subnet… and thus not sure what functionality you are using or requirement that the RW coming in has the same IP addressing ???
The fact that you got it working is cool, but I dont understand the need so cannot really comment further.