How did I block these websites on OS X?
December 18, 2019 9:18 AM   Subscribe

About a year ago, I found some mechanism to block particular websites on OS X. I did this in a single user account on one machine. I'd like to add some additional sites to be blocked. Help me figure out how I did it - I am baffled.

I work on an OS X machine that is at 10.14.6. I use separate accounts for different projects so I can have different sets of programs running and to avoid seeing notifications from mail or texts on from my main account which distract me. One one account I set up for doing some coding, I needed access to technical documentation online but found myself wandering off into the depths of the internet so I found a way - that I have forgotten - to block the two most distracting domains on both Chrome and Safari.When I visit those domains, I get a message saying that the domain cannot be reached, which is prefect as that reminds me not to go down the distraction rabbit hole. Now I find there are some other sites that I'd like to add, but I can't figure out what I did in the first place. Here are the clues that I have:

• It is something specific to that one account. The domains are perfectly reachable from other accounts on the same machine.
• It isn't an extension in either Chrome or Safari - I looked there.
• The domains are reachable from Firefox, which I downloaded to test, and lynx from the command line, so it doesn't affect all programs on the account.
• There are no changes to the /etc/hosts file.
• Parental controls are not enabled for the account.
• Running a recursive search through the account for the names of the domains doesn't point me towards anything useful.

While I greatly admire the cunning of my past self, I'd like to be that cunning now. What am I missing?
posted by procrastination to Computers & Internet (14 answers total) 1 user marked this as a favorite
 
Reachable in Firefox, but not Chrome or Safari rules out a DNS-based restriction and suggests something configured in the browsers. Maybe check Safari to see if you set up some kind of weird proxy server? Proxy settings in Safari
posted by Lame_username at 9:40 AM on December 18, 2019 [1 favorite]


Response by poster: I hadn't thought to check the proxy settings, but that wasn't it. :(
posted by procrastination at 9:52 AM on December 18, 2019


Assuming that your work account is not the master account, you should be able to do it by logging into the master account, selecting the work account, and going to "parental controls."
posted by slkinsey at 10:07 AM on December 18, 2019


I do this by editing the Unix hosts file... But looks like you have checked that. I have seen thing I thought were blocked coming through.

I’m half way setting up a pihole experiment is it possible that you have some other dns filtering going on?
posted by sol at 10:30 AM on December 18, 2019


What does the Network tab in Chrome/Safari developer tools say when you try to visit those blocked domains?
posted by holgate at 10:56 AM on December 18, 2019


Could you post a screenshot (in both Chrome and Safari) of the message you get when you try to navigate to those domains?

Do you remember whether you did something separate for each browser, or whether it was a single action that blocked it in both browsers?
posted by mekily at 11:22 AM on December 18, 2019


I've given this more thought than I care to admit and I'm struggling to imagine a solution that fits the facts and doesn't seem 1000 times more difficult to do than the ones we already ruled out. It might also be interesting to uninstall Chrome and reinstall it (if that wouldn't lose too many customizations you need) and see if it works on a fresh install. The fact that Firefox and Lynx work more or less requires it to be something browser based, but I can't think of something that isn't an extension or using a proxy.
posted by Lame_username at 11:40 AM on December 18, 2019


Response by poster: I don't recall if it was one thing or multiple. I think it might have just been one. I seem to remember it was quite clever and was something I couldn't revert easily which was good because then I wouldn't just ignore it.

The error message for chrome reads:

"This site can't be reached.

https://twitter.com/ is unreachable.

ERR_ADDRESS_UNREACHABLE"

and for Safari reads:

'Safari Can't Connect to the Server

Safari cannot open the page "https://twitter.com" because Safari can't connect to the server "twitter.com"'

I didn't know about the Developer network tab! In Chrome it shows me that there are five requests for data:image/png followed by a bunch of base64 encoding. When I decode the base64, it is a request to page with the offline animation and some PNG images. I don't see where to try it in Safari.

I'm going to run Wireshark and see what it happening on the network.
posted by procrastination at 11:45 AM on December 18, 2019


Response by poster: Oh, uninstalling is a great idea! I uninstalled chrome and also moved the ~/Library/Application Support/Google/Chrome directory in case it was something there. It is still blocked.

It feels like a DNS thing to me, but I don't see anything in the settings or hosts files, and it is running from the same DNS server that the other working accounts are.
posted by procrastination at 11:52 AM on December 18, 2019


Response by poster: Ok, here is an oddity. I ran Chrome under dtruss to try and see if it was accessing any files. It didn't show me much. But in the process, when I accidentally ran Chrome using sudo so it had elevated privileges, it could reach the blocked domains. Maybe I changed some file permissions somewhere? I can't think where that would be.
posted by procrastination at 12:11 PM on December 18, 2019


Response by poster: Ok, I am spending more time on this than I should be. I'll block the additional domains some other way. Thanks for the help everyone! If I ever figure it out I'll drop back to say how I created this insanity.
posted by procrastination at 12:20 PM on December 18, 2019


If you open terminal and type 'nslookup twitter.com', do you get a result?
posted by Wild_Eep at 9:00 PM on December 18, 2019


Have you looked into Freedom? I believe that's essentially what they do. I've used it on Windows in the past and liked it.
posted by Vhanudux at 7:20 AM on December 19, 2019


Response by poster: Yes, nslookup works. :)
posted by procrastination at 9:09 AM on December 19, 2019


« Older Tips for producing beautifully scanned drawings?   |   Help Identifying Light Fixture Newer »
This thread is closed to new comments.