Accessing Docker Containers when connected to Unraid Wireguard VPN


Recommended Posts

Hello

So I set up unraid wireguard vpn for tunnel for docker containers and it created a wg0 interface for the vpn.

I created new container and set its network to wg0.

However now I cannot access the container UI over port 8888 as its IP is in the 172.x range. Normally I use br0 and it gets 192.168. IP and it works.

My unraid server is on a different LAN to my clients and so far I just have route between those 2 LANs to allow clients to talk to Unraid from the other LAN.

thanks

Link to comment
39 minutes ago, Squid said:

This might help 

In my particular case though, I found it far easier to remotely access a barebones VM via WG (or Connect) and then connect to the containers.

 

 

I dont mean using WG to access my server externally.

I am using a commercial VPN and set up WG connection within UnRaid and selected tunnel docker so I can run containers to use the VPN. But doing this means I can no longer access the container from my LAN. Not sure if it makes a difference but my LAN client is on different subnet then unraid.

Link to comment
  • 3 months later...
  • 4 weeks later...
  • 1 month later...
On 7/22/2023 at 3:13 PM, nekromantik said:

I dont mean using WG to access my server externally.

I am using a commercial VPN and set up WG connection within UnRaid and selected tunnel docker so I can run containers to use the VPN. But doing this means I can no longer access the container from my LAN. Not sure if it makes a difference but my LAN client is on different subnet then unraid.

I am using it in this exact scenario as well. Unraid lives on my main LAN and any device on my main LAN can hit the containers. Any device on a different subnet is a no go. As a test I made sure nothing was blocked between VLANS with the same issues, explicitly wrote allow rules, tried adding routes etc with no success.

 

I use a commerical provider that supports port forwarding and run Emby behind that over the tunnel. Absolutley hate having to put the firesticks etc on the main network to be able to access Emby locally.

 

I wasted most of my day setting up a VPN client on my UDMP, enabling VLANs in Unraid and assigning the containers to a VLAN, just to realize Unifi doesn't support forwarding on the interface. Saw a forum post on modifying the IP tables on the UDMP and tried that, even if it worked, they don't persist after a reboot. 

 

It sounds like you abandoned the built in Unraid wireguard tunnel in favor of a container. Are you able to access your resources properly now?

Link to comment
  • 2 weeks later...
On 1/22/2024 at 6:12 AM, david0161 said:

I am using it in this exact scenario as well. Unraid lives on my main LAN and any device on my main LAN can hit the containers. Any device on a different subnet is a no go. As a test I made sure nothing was blocked between VLANS with the same issues, explicitly wrote allow rules, tried adding routes etc with no success.

 

I use a commerical provider that supports port forwarding and run Emby behind that over the tunnel. Absolutley hate having to put the firesticks etc on the main network to be able to access Emby locally.

 

I wasted most of my day setting up a VPN client on my UDMP, enabling VLANs in Unraid and assigning the containers to a VLAN, just to realize Unifi doesn't support forwarding on the interface. Saw a forum post on modifying the IP tables on the UDMP and tried that, even if it worked, they don't persist after a reboot. 

 

It sounds like you abandoned the built in Unraid wireguard tunnel in favor of a container. Are you able to access your resources properly now?

yup everything works

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.