Docker container using bridge networking hosted in jail using macvlan networking #179
-
I've run into a networking issue with my jail (based on the jailmaker Docker template) and am wondering if it is expected behavior. Setup: Jailmaker jail created from jailmaker Docker template, containing the following network binds:
The idea is to allow my Docker containers to connect to the three vlans represented by those bridges without having access to my management vlan (br10). Inside the docker jail I have the following interfaces:
With this configuration the jail gets one IP on each vlan (each on its respective interface) as shown above and network connectivity seems perfect (DNS working, can access each VLAN, internet access works). When I create docker containers in this jail and specify macvlan networking (with the parent interface set to one of the mv-br* interfaces listed above) everything also works perfectly. However, when I create a docker container in this jail and specify bridge networking, the resultant container has no ability to access the outside world. If anyone has any tips or suggestions for troubleshooting they would be very much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
have you tried "network-bridge" instead of "network-macvlan" |
Beta Was this translation helpful? Give feedback.
-
I don't think the macvlan flag in nspawn is supposed to be used like that. For your usecase you're supposed to use bridge networking for the first bridge interface and then use I wrote about it on the old forum: https://www.truenas.com/community/threads/linux-jails-experimental-script.106926/page-6#post-805938 As far as I know none of the jailmaker users went through this trouble. So if you do please post back and consider updating the documentation. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the additional suggestion. I read through the linked discussions and unless I'm misunderstanding the nspawn docs, it seems like |
Beta Was this translation helpful? Give feedback.
Please try jailmaker from the veth-extra branch. This config template should get you started.