The instance settings now includes a private instance option, which if turned on, will only let logged in users view your site. Private instances was one of our first issues, and it was a large effort, so its great to finally have this completed.
From the release notes.
I haven’t tried it but I think that making an instance private disables federation.