I'm creating a Java project for my university and one of the features of my project is to block / allow websites that was set by the teacher (it's an open-source laboratory monitoring software). Actually I need something easier: block ALL sites but allow only a few (allow about 2 or 3 sites, all the others must be blocked).
I've found this excellent tutorial that uses /etc/hosts.allow and /etc/hosts.deny to do exactly what I need. However I discovered that these files and this method of blocking / allowing websites is deprecated.
I don't think IPTables is a good way to achieve my aim, because to allow the access to a single website I need allow an IP address - but remember that a single hostname can have several IP addresses (like any Google service, Facebook and even Moodle of my university).
Aucun commentaire:
Enregistrer un commentaire