Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question about WireGuard Complex Network setup: 'Local server uses NAT' set to 'No' loses access to WAN

Featured Replies

Hi,

 

 

According to the 'Complex Networks' section here:

 

there are specific combinations of Docker 'Host access to custom networks' and WireGuard 'Local server uses NAT' that should work or not work (screenshot below).

 

ComplexNetworks.thumb.png.7d19c20a30c815ac2656779ebc228ef9.png

 

 

I am trying to setup the last option in the list above:

"With "Use NAT" = No and "Host access to custom networks" = enabled and static route 

--server and dockers on bridge/host - accessible!

--VMs and other systems on LAN - accessible!

--dockers with custom IP - accessible!

(woohoo! the recommended setup for complex networks)"

 

 

I have tried the following settings:

-WireGuard 'Local server uses NAT' = No

-Docker 'Host access to custom networks' = Enabled

-static route on my router 10.253.0.0/24 to IP_of_Unraid_machine

 

with the above, when I connect my mobile device (on cellular network) to WireGuard, I get access to other machines on my LAN, and to Unraid Docker containers with custom IPs. But I don't have access to the WAN. A traceroute on my mobile device stops at my router and doesn't make it out to the WAN, even if I try to access a website by URI (i.e., 172.217.1.14 for google.com )

 

 

I then tried the following settings:

-WireGuard 'Local server uses NAT' = Yes (only change compared to above)

-Docker 'Host access to custom networks' = Enabled

-static route on my router 10.253.0.0/24 to IP_of_Unraid_machine

 

with the above, when I connect my mobile device (on cellular network) to WireGuard, I get access to other machines on my LAN, and to Unraid Docker containers with custom IPs, and now I also get access to the WAN.

 

 

I am left scratching my head why my setup works with the opposite 'Local server uses NAT' setting compared to the quickstart guide? The guide says I should leave the 'Local server uses NAT' set to 'No', but when I do that I lose access to the WAN. When I leave 'Local server uses NAT' set to 'Yes', then I get access to everything LAN, Docker containers with custom IPs, and the WAN, but the quickstart guide specifically indicates these settings should not work this way.

 

Am I missing something obvious here? Will having 'Local server uses NAT' set to 'Yes' create problems down the road for me?

 

 

Very confused, thank you for any insight you can provide!

Edited by rousseau
image in-line

  • 1 month later...

Does your "client" (phone in this case), have "allowed IPs = 0.0.0.0/0" in it's configuration? That will allow that client to get out to the internet, which is what i think you mean when you say "Access to WAN". I find it strange about the wireguard protocol that the client will tell the host what IPs it is allowed to access, not the other way around.

  • Author
6 hours ago, capnJiP said:

Does your "client" (phone in this case), have "allowed IPs = 0.0.0.0/0" in it's configuration?

 

Yes it does, but still no dice unfortunately.

  • 3 months later...
On 2/5/2023 at 9:15 PM, rousseau said:

Hi,

 

 

According to the 'Complex Networks' section here:

 

there are specific combinations of Docker 'Host access to custom networks' and WireGuard 'Local server uses NAT' that should work or not work (screenshot below).

 

ComplexNetworks.thumb.png.7d19c20a30c815ac2656779ebc228ef9.png

 

 

I am trying to setup the last option in the list above:

"With "Use NAT" = No and "Host access to custom networks" = enabled and static route 

--server and dockers on bridge/host - accessible!

--VMs and other systems on LAN - accessible!

--dockers with custom IP - accessible!

(woohoo! the recommended setup for complex networks)"

 

 

I have tried the following settings:

-WireGuard 'Local server uses NAT' = No

-Docker 'Host access to custom networks' = Enabled

-static route on my router 10.253.0.0/24 to IP_of_Unraid_machine

 

with the above, when I connect my mobile device (on cellular network) to WireGuard, I get access to other machines on my LAN, and to Unraid Docker containers with custom IPs. But I don't have access to the WAN. A traceroute on my mobile device stops at my router and doesn't make it out to the WAN, even if I try to access a website by URI (i.e., 172.217.1.14 for google.com )

 

 

I then tried the following settings:

-WireGuard 'Local server uses NAT' = Yes (only change compared to above)

-Docker 'Host access to custom networks' = Enabled

-static route on my router 10.253.0.0/24 to IP_of_Unraid_machine

 

with the above, when I connect my mobile device (on cellular network) to WireGuard, I get access to other machines on my LAN, and to Unraid Docker containers with custom IPs, and now I also get access to the WAN.

 

 

I am left scratching my head why my setup works with the opposite 'Local server uses NAT' setting compared to the quickstart guide? The guide says I should leave the 'Local server uses NAT' set to 'No', but when I do that I lose access to the WAN. When I leave 'Local server uses NAT' set to 'Yes', then I get access to everything LAN, Docker containers with custom IPs, and the WAN, but the quickstart guide specifically indicates these settings should not work this way.

 

Am I missing something obvious here? Will having 'Local server uses NAT' set to 'Yes' create problems down the road for me?

 

 

Very confused, thank you for any insight you can provide!

Did you find a solution for this? I have the exact same issue.

  • Author
On 7/21/2023 at 10:46 AM, Bruno Figueroa said:

Did you find a solution for this? I have the exact same issue.

 

Unfortunately no. In my hunt for a solution I read that the Unraid OS implementation of networking for Docker has some bugs, so I gave up thinking I could find a solution.

 

Sad to say I now have a completely separate machine running PiVPN as a Wireguard VPN server (i.e., https://adamtheautomator.com/wireguard-raspberry-pi/ )

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.