Restrict Access within a domain

I have a closed Elgg (no registration option and approximately 100 users) hosted online but I would like to restrict the site to log in only from within a fixed domain, like an intranet.  We don't have the option to set up a server in the small LAN.

  • Log in
  • Check referring domain
  • Reject accept based on

This is not intended for high security, only to deter registered users from accessing outside the organisation which is a small school.

I suspect this would be similar to requests I have seen for registration only from a domain, and I appreciate this would be a hack but is this something I could do with some guidance?  I have no OOPHP experience only PHP knowledge.