The best option is access OpenKM (JBoss) through apache using mod_proxy or mod_jk. If you want to expose JBoss directly to Internet you should read JBoss documentation or search in the JBoss forums about securiting it. Also you should learn some basic (and advanced) tip on securiting an Ubuntu Linux...