The first server (SR1) is using IP (192.168.100.63/24) from the LAN subnet (192.168.100.0/24) behind the Mikrotik router. I have WG server deployed on it.
The second server(SR2) is installed on a Win 10 PC which is using IP (192.168.68.101/22) from ISPs dummy router (192.168.68.0/22). I have installed WG client on this PC and when I connect to WG server I can reach LAN behind Mikrotik with no problems, respectively SR2 can initiate session with SR1. So far so good.
The problem is when SR1 needs to initiate session with SR2. LAN subnet behind Mikrotik can’y reach IP address set on the PCs LAN adapter. I tried to disable the Defender, to make static route in Windows and etc. When I ping -S 192.168.101.112 192.168.68.101 there is no ping which leads me there is something in the Windows setup that I have to change.
To be honest, this router is a hub in a large topology, the configuration is large and contains information that is not a good idea to share.
Assuming we are talking about a configuration from scratch, feel free to suggest another alternative solution. WG is not mandatory, the goal, as I mentioned, is to have two-way communication between SR1 and SR2.
Sorry cannot help without config and need basic details on the wan (private/public, static/dynamic)
The config requested does not show any details that are concerning.
To be clear
DO NOT also INCLUDE dhcp leases or any scripts you may have added as sometimes there are items there one may not wish to share.
There is no other information that I can think of thats of concern.
Hi, this is the config below. Everything is the same, only 192.168.68.0/22 has been changed to 192.168.68.0/24. WG is connected, SR2 can ping everything behind the Mikrotik, SR1 can ping only the WG adapter address(192.168.101.112) on the SR2 PC, but can’t ping LAN adapter IP: 192.168.68.101
so you are using a wireguard switch for a router?
is it behind an ISP modem router ( aka where is internet from ).
assuming its providing you an IP address from ether1 connection.
If you added netmask manually to dhcp server network, remove it, not required to enter.
Your firewall rules are extremely lacking, but lets assume the ISP modem router has a public IP and you can forward a port from this device to 10.10.10.1 /32 the private WANIP of your MT device.
So, the WAN network in the lab (10.10.10.0/30) is not a problem, it is just needed to establish a connection between MT and a 3rd-party router. The connection between the WG server and the WG client is fine, no problem.
If I change the route to the WG gateway instead of the WG client, the route becomes USI.
The WG allowed IPs on the windows 10 PC (SR2) are 192.168.100.0/23
There is no conflict between the WG subnet and Win PC (SR1), nor with Win PC (SR2).
In short:
Win PC SR1 is using: 192.168.100.63 from the MT LAN subnet - 192.168.100.0/24
WG Server on MT is using: 192.168.101.97 from the WG subnet - 192.168.101.96/27
Win PC SR2 is using: 192.168.68.101 from the 3rd-party router subnet - 192.168.68.0/24
I am adding an updated topology with more details. I hope this helps to better understand the idea and the result I am looking for.
Now your wans are on the same subnet ???
Going from bad to worse trying to fake a real world situation.
If the MT is the server for handshake, then SR2 being the client connections to the MT wireguard service.
SR2 depending upon firewall rules can.
a. via input chain rule modify the MT device config
b. via forward chain rule reach LAN devices.
b is predicated by having either 0.0.0.0/0 on the clients device for allowed IPs
OR
b is predicated upon having 192.168.101.97/32,192.168.100.0/24 for allowed IPs.
AND route on MT device of
add address=192.168.68.0/24 gateway="Wiregard Server" table=main
++++++++++++++++++++++++++++++++++++++++++++++
Also On the Mikrotik device
allowed-address=192.168.101.112/32,192.168.68.0/24
Personal prefence: Do Not name interface names like they were comments aka no quote marks.
/interface wireguard
add listen-port=13231 mtu=1420 name=WgServer
/interface wireguard peers
add allowed-address=192.168.101.112/32,192.168.68.0/24 interface=WgServer
name=Peer1 public-key="xxxx"
Remove netmask=24 if you added this manually........