Block URLs

Joined
Apr 17, 2013
Messages
2
Reaction score
0
Points
1
Does anyone have a suggestion for a good way to block access to certain URLs from a Mac? I don't care about blocking content, just certain sites. I'm a UNIX guy, so I'm confortable working at the shell/terminal level if that is what's needed.

I'd be OK blocking at the router level if I can control it by MAC address (blocking by time would also be nice). I currently have an Airport that handles internal wireless and connects to a Cisco RV042 for access to the Internet. The Airport lets me block access by MAC address and time, but it's all or nothing. I need to let some URLs through.

Does anyone have any suggestions / experience with a similar setup?
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Are you familiar with the "hosts" file? You can block URLs from there. However, this site lists ways that it can be done other than from the hosts file:

LINK
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
Many routers allow a blacklist to be created too. But it depends on your make/model/firmware version of your router
 
OP
J
Joined
Apr 17, 2013
Messages
2
Reaction score
0
Points
1
Thanks, chscag. I am familiar with hosts files. That should work to block access. I may write a script that edits the hosts file so I can enable/disable URL blocking on demand or from a crontab entry.

mrplow, unfortunately my router doesn't allow a blacklist by MAC or IP address. Do you know of any that do? I'd consider upgrading if the cost was reasonable.

Ultimately I may need to set up a proxy that will give me this kind of control, but going the hosts route should work for now. Thanks for your replies!
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
I've had Netgear, DLink and Sagem routers that all allow blocking by domain and keyword.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top