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/lSFWmpHTX1 Patrick Stewart talks about meeting Sting on the set of DUNE (Funny to the EXTREME)

Shaun Freeman @Zendmaster

I added a video to a @YouTube playlist https://t.co/pmXSmod4ti Anonymous - This will Change Everything You Know... (2018-2019)

Shaun Freeman @Zendmaster

I added a video to a @YouTube playlist https://t.co/GkwTCvBfes Will Artificial Intelligence Take Over The World?

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/Y1ulafmsC6 Frank Abagnale: "Catch Me If You Can" | Talks at Google

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/NBdW2xFnqD ETS2: Special Transport DLC Trailer