I'm connecting a BB to the internet and want to make sure it is

I’m connecting a BB to the internet and want to make sure it is relatively secure. Things like Cloud9, BoneScript, and root default password are all things that might leave open security holes.

I’m no Unix expert so I’ll pose the question here. Can anyone point me to a guide for what I should do to make the BB secure for long term autonomous connection to the Internet?