Getting .local domain working on OS X and iOS

Getting .local domain working on OS X and iOS

I have been playing around with the Raspberry Pi recently and came across a problem, it happened when I put a web server on it and wanted to view it on my local network.

"So what's this to do with OS X and iOS?" you say, well when I tried viewing the website via it's local name which is 'raspberrypi.local' on my Mac and iPad it was timing out, but I could get to it via the ip address which was a little confusing.

After days of scratching my head over this and trying very ideas of the internet it occurred to me it might me a firewall problem. So I had set up iptables on the Pi I removed them for experimental purposes and tried again and bam! It worked.

So what was the problem? It has to do with the way OS X and iOS look for .local domains, they use bonjour to find .local domain and my firewall was blocking it. So the fix is to allow bonjour through the firewall.

Bonjour run on port 5353 using the UDP protocol so all I had to is add the firewall rule for my network which is running on the 192.168.1.* range the rule I added was this

-A INPUT -p udp --dport 5353 -s 192.168.1.0/24 -j ACCEPT

With that added to the firewall I was able to once again use the .local domain on my Apple devices.

I hope this helps someone


02/09/2015 09:47:00 Shaun Freeman Filed Under: OSX Apple, iOS, OSX, Raspberry Pi

Twitter Feed
Shaun Freeman @Zendmaster

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/8nGfvmdsI2 From Carnivore Diet to Near-Death: Lessons Learned From Today's Most Popular Fad Diet

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/EFLh2y3I24 Carnivore Diet – Myths about Meat – Phil Escott – WHIS 2018

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/dTcBFM4q5A WHY I STOPPED BEING VEGAN | MY STORY

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/RVuVCieSsD Dr. Paul Mason - 'Low Carb from a Doctor's perspective'

Shaun Freeman @Zendmaster

I added a video to a @YouTube playlist https://t.co/MFRRuBG23F It's Already Too Late - Elon Musk