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.

Wireguard Tunnel + Access Docker/VM with different IP than Host + Router does not support static routes

Featured Replies

I was reading on the following thread, that did not provide a solution to the question raised.

I have Dockers and VMs running on a different IP than the Host IP.

 

1. I have setup Wireguard to connect to the Unraid Server, working fine.

2. I'd like to access now the other Dockers and VMs as well, but based on my current setup there is no connection.

3. My issue is that my Router does not support static routing.

 

Is there a way to resolve this feature gap my router has?

 

I am hoping there is maybe a way to let the Host (Unraid) route the call of the remote device to the respective Docker/VM IP?

 

 

Solved by bmartino1

  • Community Expert

I don't understand the problem.

 

this is done under setting :

 

image.png.41c6282934d750f086f51569edbf6d05.png

 

When I connect to my tunnel i can hit my dockers IP. pi hole, unraid gui... etc...

 

I'm also running a mac vlan docker network.

image.png.ff0011d4a6ce9659665c239d1dce00e0.png

Edited by bmartino1

  • Community Expert

If you go to settings network settings, you can add a custom IP route

 

the gateway would be unraid host ip...

 and the custum ip scheme...

 

Screenshot 2024-04-07 134010.png

  • Author
6 minutes ago, bmartino1 said:

I don't understand the problem.

See my Wireguard Setting:
grafik.thumb.png.6c79317516aa00d473f58d7bff6e3419.png

My Unraid is 192.168.2.201

My Docker is e. g. 192.168.2.208

 

Access to Unraid works fine, no access to docker on 192.168.2.208 with the above config.

  • Community Expert

I'm running 6.12.10 your wireguard tunnel doesn't look right to me, I'm also using UPNP

 

image.thumb.png.910170b5271bac91c1e320f58569ad71.png

 

you may be missing your static route...

 

image.thumb.png.e77b3509d182c2d19341225b5c792244.png

Edited by bmartino1

  • Author
10 minutes ago, bmartino1 said:

If you go to settings network settings, you can add a custom IP route

 

the gateway would be unraid host ip...

 and the custum ip scheme...

 

Screenshot 2024-04-07 134010.png

Done, but address still not reachable:
 

grafik.png

 

Running 6.12.10 as well.

Edited by freetgy

  • Community Expert

it apears taht you are using a bridge netwrok  that is not carring your newtokr settings.

 

I recommend some down time and switching to a macvaln netwrok driver for dockers.

Since you are using bridge mode. ?you may have a misconfigured docker setting trying to use ipvlan...

 

step once stop all vm and docker and disable them

 

step 2 disable bridging. (optional enable bonding)

 

step 3 go to docker settings. and set 

Docker custom network type:

macvlan

Host access to custom networks:

Enabled

 

enable docker and enable vm .

 

tunnel would also fail if docker doesn't have host access to custom networks.

Screenshot 2024-04-07 135723.png

  • Community Expert

Under the Peer Allowed IPs field you need to put entries for each subnet you want to be able to access via WireGuard.

  • Community Expert
3 minutes ago, itimpi said:

Under the Peer Allowed IPs field you need to put entries for each subnet you want to be able to access via WireGuard.

 

i think its the docker setting host access preventing this. I agree that adding the ip scheme there should fix this as well. That is not my current setting to allow access and access the ip schema.

 

image.thumb.png.17754f7bc02304607aabb8d225b062d1.png

  • Author

OK, trying to follow all your guidances. Step by Step

 

Added Host Access to Custom Networks on Docker

Added Route from 192.168.2.201 to 192.168.2.208

 

Docker Setting:

grafik.thumb.png.d0e98e32163dfd386b32190698831d54.png

 

Example Docker:

grafik.thumb.png.768d2c89e3df47e65bf5189713e98028.png

Network Tab:

grafik.thumb.png.4c11e974c07c236e4fbbf104042f73fa.png

WireGuard

grafik.thumb.png.75650f424cdce762314fc333aa3e1815.png

 

Result same for me: Access to 192.168.2.201 works, 192.168.2.208 does not.

 

Rebooting the Server now just in case.

 

Edited by freetgy

  • Community Expert
  • Solution

Can you access any other 2.x address such as your router over the tunnel? if yes its your docker 2.208 settings. if no its network/routing issue.

 

Other than the bad route data. as metric should be 1 but that line ipv4 192.168.2.208 wg0 is not a good data rout. that's telling unraid that ip goes to interface wg0 no traffic would be making it across.

I belie you should disable bridging. this may be causing a macvlan trace issue.

Otherwise, set docker setting to ipvlan.

 

You may also need to reboot the device.

Edited by bmartino1

  • Author

As far as i can tell ipv4 192.168.2.208 wg0 gets added automatically, if i add 192.168.2.208 as allowed peer IPs under Wireguard VPN Manager.

• Removed 192.168.2.208 from allowed peers under VPN

• Disabled Bridging

 

The Disabling of Bridging did it i think, access to all Dockers works now as well as other network devices and router.

 

Thank you very much for taking your time of supporting a newbie here. Thank you for your patience, I see i need to learn more network stuff to understand all the mechanics at play in Unraid. Any tips for a good read-up? Also i fundamentally lack understanding on the difference between macvlan and ipvlan. I understand we should use ipvlan going forward as per the latest release notes of Unraid?

 

 

 

 

 

Edited by freetgy

  • Community Expert
1 hour ago, freetgy said:

As far as i can tell ipv4 192.168.2.208 wg0 gets added automatically, if i add 192.168.2.208 as allowed peer IPs under Wireguard VPN Manager.

• Removed 192.168.2.208 from allowed peers under VPN

• Disabled Bridging

 

The Disabling of Bridging did it i think, access to all Dockers works now as well as other network devices and router.

 

Thank you very much for taking your time of supporting a newbie here. Thank you for your patience, I see i need to learn more network stuff to understand all the mechanics at play in Unraid. Any tips for a good read-up? Also i fundamentally lack understanding on the difference between macvlan and ipvlan. I understand we should use ipvlan going forward as per the latest release notes of Unraid?

 

 

 

 

 

 

kinda... from other post I have made. Back in unraid version 6.9 eara before docker network of ipvlan vs macvlan, unraid used macvlan for the default network communication. Unraid deves decided to move to ipvaln to fix other issues. tehy weere starting to get isues with how they Handled network bridgining and how macvlan atached itself to gain access. this issues cause a kernel panic call trace which can be seen to be worked on since verison 6.12.x... There dev team has made greate strides to incoperate and maintain. but the default while not setting the correcet settings are network to enable bridigin and macvaln. there is a ongoin issues due to the nature of Nic and promesioc mode. That causes the macvlan trace bug. the fix has been to turn off briding or to use the docker netwrok driver for ipvaln.


I'm a bit old school, i highly recommend this video going over the docker networks.

 

Please see posts:
 

 

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.