I'm setting up an iMAC in a store. They want to have the browser open to their website and restrict access so people can't use the computer to browse any other site. I see many discussions online but no actual code sample. Can you please write out the exact lines of code that I need to add to the hosts file and its location on a new iMAC with OS X.
Asked
Active
Viewed 468 times
1 Answers
0
You can achieve this by catching all web traffic and routing it to the IP address of the site you want to limit access to.
For example: If the website IP was 10.0.0.1
10.0.0.1 .com
10.0.0.1 .info
10.0.0.1 .org
(You can keep adding rows for each TLD (.com, .net etc) that you wish to block.
Any http requests sent from the machine would then try to resolve on that host. This should prevent other websites from resolving but the one you require.

Fintan Kearney
- 743
- 7
- 15
-
OK great, but then how do I deny access to any other site (IP address)? – Charles Apr 05 '16 at 18:25
-
1Oops. I see you answered that - "should prevent other websites from resolving but the one you require." I'll try it and get back to approve the answer. – Charles Apr 12 '16 at 15:20