Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Blocking Hosts

Blocking Hosts
Thread Tools
NobleMatt
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 17, 2008, 02:33 PM
 
im trying to block access to a domain on my mac, lets say for this thread its blockme.com, i read this tutorial: http://osxdaily.com/2007/03/19/block...ying-etchosts/ and followed it but when i open /ect/host im met with a blank window like the file doesnt exist? im been a bit retarded here but where would i find the file on my HDD if i did have it? any advice?
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Dec 17, 2008, 02:54 PM
 
You could use Little Snitch, if you want to limit network access for individual apps.

I recommend LS for every user, it's one of the best tools on the Mac.

-t
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Dec 17, 2008, 03:12 PM
 
Could you have made the same typo in the command line that you did in your post? It's /etc/hosts.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Atheist
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Dec 17, 2008, 03:12 PM
 
Originally Posted by crazyreaper View Post
im trying to block access to a domain on my mac, lets say for this thread its blockme.com, i read this tutorial: http://osxdaily.com/2007/03/19/block...ying-etchosts/ and followed it but when i open /ect/host im met with a blank window like the file doesnt exist? im been a bit retarded here but where would i find the file on my HDD if i did have it? any advice?
It's /etc/hosts ... not /ect/host
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 17, 2008, 03:50 PM
 
Originally Posted by Chuckit View Post
Could you have made the same typo in the command line that you did in your post? It's /etc/hosts.
our making a good point, i tried both, host which is reads in the copy and hosts which it showing in the screen shot, neither worked
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Dec 17, 2008, 04:15 PM
 
Are you getting the nano editor's screen?

Glenn -----OTR/L, MOT, Tx
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Dec 17, 2008, 04:22 PM
 
What happens if you open /etc in the Finder?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Maflynn
Professional Poster
Join Date: Mar 2002
Location: Boston
Status: Offline
Reply With Quote
Dec 17, 2008, 04:51 PM
 
I'm with turtle, I use LS and found it a handy app for managing access.

To Chuckit's question, you cannot easily see /etc in the Finder because its hidden by default.
~Mike
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Dec 17, 2008, 04:58 PM
 
Go -> Go To Folder works even with hidden folders.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 17, 2008, 05:02 PM
 


is what i get on both host and hosts

i shall see if i can find this LS, basically i need to restrict an applications access to a certain site (not safari)
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
Maflynn
Professional Poster
Join Date: Mar 2002
Location: Boston
Status: Offline
Reply With Quote
Dec 17, 2008, 05:06 PM
 
Originally Posted by Chuckit View Post
Go -> Go To Folder works even with hidden folders.
I did not know that, thanks
~Mike
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Dec 17, 2008, 05:12 PM
 
Originally Posted by crazyreaper View Post
i shall see if i can find this LS, basically i need to restrict an applications access to a certain site (not safari)
Yes, you want LS.

Everything else is just going to be very cumbersome, and will break down on a regular basis.

LS is basically a personal Firewall that is very highly customizable on an application level.
All other solutions (like tinkering with etc/hosts/) will block ALL applications, not only specific ones.

-t
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 17, 2008, 05:35 PM
 
Originally Posted by turtle777 View Post
Yes, you want LS.

Everything else is just going to be very cumbersome, and will break down on a regular basis.

LS is basically a personal Firewall that is very highly customizable on an application level.
All other solutions (like tinkering with etc/hosts/) will block ALL applications, not only specific ones.

-t
well tbh the only time that address we be accessed is from the one program i dont want it to be accessed from, ive got LS anyway, any tips on using it, seems a bit confusing to me, how do i restrict access?

edit: just sound the deny button
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
Atheist
Mac Elite
Join Date: Sep 2006
Location: Back in the Good Ole US of A
Status: Offline
Reply With Quote
Dec 17, 2008, 05:58 PM
 
Originally Posted by crazyreaper View Post


is what i get on both host and hosts

i shall see if i can find this LS, basically i need to restrict an applications access to a certain site (not safari)
Dude... you're still spelling it wrong.. it's ETC not ECT
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 17, 2008, 06:09 PM
 
oh yer, my bad habit, i always use ect not etc in english, bad habit ive had from being a kid, sorry guys
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Dec 17, 2008, 06:53 PM
 
I just copied the command line from the linked article...

Glenn -----OTR/L, MOT, Tx
     
tooki
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Dec 18, 2008, 01:59 AM
 
Originally Posted by crazyreaper View Post
oh yer, my bad habit, i always use ect not etc in english, bad habit ive had from being a kid, sorry guys
"etc" is short for Latin et cetera ("and so on"). It's not "ect" in any language.
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 18, 2008, 04:49 AM
 
i know, i struggle with spelling, english, gramma ect, par of my dyslexia is that i tent to read things wrong, etc as ect for example
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
red rocket
Mac Elite
Join Date: Mar 2002
Status: Offline
Reply With Quote
Dec 18, 2008, 08:02 AM
 
We understand.

The reason what you’re doing isn’t working, is that there normally is no ‘ect’ folder in OS X. The screenshot you posted tells us that you have created this folder, along with the ‘hosts’ file (which is something that always happens when you edit files with command line text editors: if the file or the parent folder doesn’t already exist, the editor creates it), but that file is never, ever, going to get read by OS X, because the system actually only looks in the ‘etc’ folder. In an ideal world, OS X would notice your dyslexia and compensate, but we’re not quite there yet, unfortunately.

Just paste this, meanwhile:

sudo nano /etc/hosts

This will start up the nano editor, and open the correct hosts file for editing.
     
NobleMatt  (op)
formerly crazyreaper
Senior User
Join Date: Jul 2007
Location: York, UK
Status: Offline
Reply With Quote
Dec 18, 2008, 10:20 AM
 
Originally Posted by red rocket View Post
In an ideal world, OS X would notice your dyslexia and compensate, but we’re not quite there yet, unfortunately.
lol

im giving LS ago atm anyway, am i correct in thinking with LS that if i dont want to restrict an applications access i can just click ok with the settings it has provided? it seems to have done the job for what i want atm
The Spammer Formally Known As Crazyreaper
Mac Book Pro 15", 2.66 Ghz C2D, 4GB DDR3 / iPhone 4 16GB
     
davidbk1
Junior Member
Join Date: Aug 2005
Status: Offline
Reply With Quote
Dec 18, 2008, 02:30 PM
 
When the little snitch dialog comes up asking about a new application, if you want it to be unrestricted, click forever at the top, select any connection from the list, and finally press the allow button.
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Dec 18, 2008, 06:41 PM
 
Sorry, but I recommend to RTFM for LS, FTW.

-t
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:48 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,