Second NIC for some Docker Container


Recommended Posts

Hello, I need help setting up a second Docker network that communicates externally via a separate network card in the UNRaid server.

 

My setup is as follows: I have various VLANs in my home network routed through pfSense. Network 10.11.12.0 is my default network with VLAN tag 10. Network 192.168.20.0 is a secured network that goes to the internet via a VPN provider, running over VLAN tag 20. The tagging is done via the switchport.

 

The Docker containers run smoothly over 10.11.12.0. However, I want some containers to access the internet via the VPN LAN. For this, I have set up a second network card in Unraid. I can access the Unraid dashboard via both IPs.

 

Network Settings:

 

Hs5gIvr.jpeg

 

Docker Settings:

 

4ZLiAOP.jpeg

 

When I select one of the custom network settings in the container settings, I can no longer reach the container.

 

VnGF5lD.jpeg

 

Ideally, I would like a second internal Docker network that then performs NAT on my second network adapter.

Link to comment
On 1/28/2024 at 12:01 AM, digitaldex said:

Ideally, I would like a second internal Docker network that then performs NAT on my second network adapter.

Unraid won't do NAT, you need a router gateway in 192.168.20.1 for accessing Internet for VLAN20. To access that container, client also need in same subnet & network.

Edited by Vr2Io
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.