Jump to content

Wireguard: access to remote LAN not working


Recommended Posts

Hey all. I have a wireguard tunnel set up on my server, and I have the port forwarded already, as well as two peers.

 

On my phone (first peer), the traffic is routed as expected, and I can access everything.

On my laptop (second peer), the traffic is routed through the tunnel, and I can still access the internet, but whenever I attempt to connect to my server on the remote LAN (192.168.1.xxx), I am instead accessing the actual local net where I am.

 

Since the traffic is going through, I assume that this is a configuration error on my end, but looking at the wireguard peer settings, I can't tell what is different between my phone and my laptop peer that is causing this issue. I have read that you need to have the allowed IPs set to 0.0.0.0/0 in order to block all local traffic, and it is set that way on my machine, but this is still going on. I can even ping from the server UI to the device and get a response.

 

What is it that I'm missing? Here is a screenshot from the client's end on the peer settings:

 

Screen Shot 2022-01-02 at 3.18.55 PM.png

Edited by hking0036
shrink image
Link to comment

Have you checked the IP addresses on your phone and laptop.   You do not want both client and server to be on the same subnet as this can cause routing issues.    I deliberately set my home subnet to be something other than 192.168.0.x or 192.168.1.x as this would mean there is a good chance of both client and server ending up on the same subnet.

Link to comment
4 hours ago, itimpi said:

Have you checked the IP addresses on your phone and laptop.   You do not want both client and server to be on the same subnet as this can cause routing issues.    I deliberately set my home subnet to be something other than 192.168.0.x or 192.168.1.x as this would mean there is a good chance of both client and server ending up on the same subnet.

Ah, yeah, they are both on the same subnet. Maybe it would be less of a fight if I was to make a distinction on that front; I'll try and configure that some more when I get the opportunity.

Link to comment

If you want all traffic to go through the VPN tunnel then the "Peer type of access" should be set to "Remote tunneled access". The WireGuard settings page should then show a warning similar to this, advising that the peer's network IP range cannot be the same as Unraid's network:

image.png

Link to comment
  • 1 month later...
On 1/2/2022 at 4:21 PM, hking0036 said:

On my laptop (second peer), the traffic is routed through the tunnel, and I can still access the internet, but whenever I attempt to connect to my server on the remote LAN (192.168.1.xxx), I am instead accessing the actual local net where I am.

 

What is it that I'm missing? Here is a screenshot from the client's end on the peer settings:

 

 

Your listening ports of peer and server needs to be the same. (51820)

Set your DNS server to be the server wireguard ip address.. (10.253.0.xx)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...