Hey everyone! I'm new to posting here and hope I'm following the rules. I recently got a Raspberry Pi and I'm setting up a homelab while learning about networking and Docker. I'm testing a **MacVLAN** network and created an NGINX container in that setup. I did some ping tests, and while the container can reach my gateway and the internet, I noticed it can't ping my Raspberry Pi (host). I knew that was expected since MacVLAN isolates the container from the host. However, I'm confused because the container can't ping my laptop, which is connected to the same sub-network via Wi-Fi, even though I can successfully ping the container from my laptop. My container's ARP table shows my laptop's name, IP address, and MAC address, so I'm unsure why this is happening. Here's a diagram of my network setup if that helps. Thanks for your insights!
3 Answers
Yep, it indeed sounds like a firewall issue—yours or the laptop’s. I use MacVLAN often without this problem, but I made sure to adjust my firewall rules for the new Docker setups. It’s worth checking into.
This issue probably isn't related to Docker itself. Many devices have ICMP (ping) disabled due to security settings. Have you tried pinging your laptop from any other device in the same network to troubleshoot further?
I just checked, and I can’t ping my laptop from the Pi either. It seems like a firewall issue on my laptop. I plan to deploy Pi-hole in that container, will the firewall be a problem for that?
Could you share what your end goal is with this setup? This MacVLAN approach might not be the most efficient for your needs.
No specific goal right now, just experimenting with Docker. I was considering deploying Pi-hole, and since it needs a static IP as a DNS, I thought MacVLAN would help with that. Does that seem like a bad idea?
Since I couldn't ping the laptop even from my Raspberry Pi, it’s definitely a firewall or similar issue on my laptop. I guess it’s time to dig into that!