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 > Enthusiast Zone > Networking > How to block a specific IP?

How to block a specific IP?
Thread Tools
Professional Poster
Join Date: Feb 2002
Location: adequate, thanks.
Status: Offline
Reply With Quote
Nov 12, 2005, 09:42 AM
 
I need to block the eBay IPs on my computer. Where/how can I do that? The goal is not to be able to access eBay.de from my Mac.
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Nov 12, 2005, 12:40 PM
 
Just use a hosts file to resolve ebay.de to 0.0.0.0.

eBay is huge, as you may have noticed. They probably have thousands of IPs you'd have to block.

Also, if this is to keep others from accessing eBay, just use Tiger's parental controls to restrict access.

tooki
     
Professional Poster
Join Date: Feb 2002
Location: adequate, thanks.
Status: Offline
Reply With Quote
Nov 12, 2005, 01:43 PM
 
Meh, parental controls don't work in this case, 'cause I need to block it for me = admin acct.

I did some searches on google regarding the host file solution, but I could not find any useful info. Can you halp me out? I figure this isn't too much word to do, is it?
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Nov 12, 2005, 01:54 PM
 
The hosts file resides at /etc/hosts

Just type "man hosts" in the terminal to get the help on it, and then use your preferred text editor to edit the hosts file appropriately.

I think the entry you want is:

"0.0.0.0 ebay.de"

but it's been a while since I messed with hosts files, so check before you act!

tooki
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Nov 12, 2005, 02:11 PM
 
Come to think of it, I don't think that'll work. I think OS X still looks at NetInfo first, so you have to juggle around the DNS resolver first, or just use NI to set the entry you need.

Perhaps someone else with more experience with this can chime in with the exact commands?

tooki
     
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Nov 12, 2005, 04:36 PM
 
I'd reroute the blocked site(s) to 127.0.0.1 rather than 0.0.0.0, if only to avoid getting an error message about an invalid IP.

Otherwise, I don't know which direction the OS goes first in resolving a URL, so I can't be helpful.
Glenn -----
OTR/L, MOT, Tx
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Nov 12, 2005, 05:33 PM
 
I used /etc/hosts to block forums.macnn.com for a while last year when I really was wasting too much time on here. Redirecting it to 127.0.0.1 worked. However, I think that was on Panther. Not sure if anything's changed since then, but it's certainly worth a try.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Grizzled Veteran
Join Date: Oct 2001
Location: Australia
Status: Offline
Reply With Quote
Nov 12, 2005, 07:17 PM
 
Originally Posted by andreas_g4
I need to block the eBay IPs on my computer. Where/how can I do that? The goal is not to be able to access eBay.de from my Mac.

are u looking for something similar to this.It's open source but can only find a windows version
http://phoenixlabs.org/pg2/
Apple an innovator in a world of Immitators.
And thats the bottom line!!!!!!!!!
     
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status: Offline
Reply With Quote
Nov 12, 2005, 08:28 PM
 
/etc/hosts will override NetInfo will override DNS, IIRC. (This is in 10.4.x.)

pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
     
Senior User
Join Date: Aug 2000
Location: Ancaster, Ontario, Canada
Status: Offline
Reply With Quote
Nov 12, 2005, 09:07 PM
 
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:06 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2