-
Prevent Internet Explorer access to specified site
I'm sure this is a question with an obvious answer, but it's eluding me so far...
I want to set up my XP Pro PC's IE6 so that it prevents access to a specified website. I'd thought that I could do this through Internet Options / Security / Restricted Sites, but it doesn't seem to be working (even after logging off and back on again).
Any ideas?
-
Re: Prevent Internet Explorer access to specified site
This is an easy question, you can restrict access to any site through the hosts file in Windows.
In Win XP it if found at - C:\WINDOWS\system32\drivers\etc
Open it up in notepad and then add an entry at the bottom like so -
127.0.0.1 http://www.sitetoblock.com
Hope this helps you :thumb:
-
Re: Prevent Internet Explorer access to specified site
Also, when doing so, you must use both variants of the ip address like this:
127.0.0.1 yahoo.com
127.0.0.1 www.yahoo.com
If you only specify one, then the other will still work.
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by nothingofvalue
Also, when doing so, you must use both variants of the ip address like this:
127.0.0.1 yahoo.com
127.0.0.1
www.yahoo.com
If you only specify one, then the other will still work.
Or, you could do a ping request ang use the IP to block it.
for example - Ping yahoo.com
Pinging yahoo.com [216.109.112.135] with 32 bytes of data:
Request timed out.
Reply from 216.109.112.135: bytes=32 time=283ms TTL=46
Reply from 216.109.112.135: bytes=32 time=359ms TTL=47
Reply from 216.109.112.135: bytes=32 time=320ms TTL=47
Ping statistics for 216.109.112.135:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 283ms, Maximum = 359ms, Average = 320ms
then your entry would be -
Code:
127.0.0.1 216.109.112.135
-
Re: Prevent Internet Explorer access to specified site
I don't believe editing the hosts file is ever going to stop ip connections as your machine won't need to look the address...
I'd say the best way would be (if you have one) at your router.
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by -TPM-
I don't believe editing the hosts file is ever going to stop ip connections as your machine won't need to look the address...
I'd say the best way would be (if you have one) at your router.
No, your machine obeys these rules with IE no matter what. I'm sad tpo say i've had bad experiences with sites being blocked (automatically) like this that i wanted to access, for example www.outwar.com
Eaither way it will block that site.
-
Re: Prevent Internet Explorer access to specified site
What 'rules' are you refering too? The hosts file is just for name resolution much like WINS or DNS; if you already have the address there's nothing to resolve.
Of course even if editing the hosts file worked for blocking sites, I'd still not recomend using it. It would be far too easy for a user to change back to the original...
-
Re: Prevent Internet Explorer access to specified site
I don't know what the "rules" are, but what I do know is if you perform the edits that thegreatone and I suggested your computer will not connect to the address specified....try it
-
Re: Prevent Internet Explorer access to specified site
It won't resolve a domain name correctly, but if the name doesn't need resolving (i.e. you use an IP) you'll still get the correct site.
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by -TPM-
It won't resolve a domain name correctly, but if the name doesn't need resolving (i.e. you use an IP) you'll still get the correct site.
No, you won't, add the IP address to the hosts file, then try accessing the site, you shouldn't be able to. Trust me, i've managed to block myself out of far too many sites by accident. :thumb:
-
Re: Prevent Internet Explorer access to specified site
Yes, you will! (and yes I did try it)
-
Re: Prevent Internet Explorer access to specified site
I'm not finding that it's working for me. I assume I'm editing the correct file? It says in the comments at the top that it's a sample file, so I'm thinking maybe its the wrong one?
What I was really looking for was a way to block certain sites for a particular user, although the approach that's been suggested would be fine if it worked.
Any more comments?
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by trisuglow
I'm not finding that it's working for me. I assume I'm editing the correct file? It says in the comments at the top that it's a sample file, so I'm thinking maybe its the wrong one?
What I was really looking for was a way to block certain sites for a particular user, although the approach that's been suggested would be fine if it worked.
Any more comments?
Post the conyents of the file, i find it works fine for me.
-
Re: Prevent Internet Explorer access to specified site
Code:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 66.218.71.230
127.0.0.1 http://uk.games.yahoo.com/
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by trisuglow
Code:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 66.218.71.230
127.0.0.1 http://uk.games.yahoo.com/
Gotcha, restart your PC, see if it takes effect then, i forgot to mention that part, sorry !
-
Re: Prevent Internet Explorer access to specified site
Ok so I checked into this some more. The reson it's not working at all is because of the name resolution order. The order is:
1. NetBIOS Cache
2. WINS
3. NetBIOS Broadcast
4. LMhosts
5. hosts
6. DNS
Thus http://uk.games.yahoo.com/ resolves correctly if either WINS or NetBIOS are working.
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by trisuglow
I'm not finding that it's working for me. I assume I'm editing the correct file? It says in the comments at the top that it's a sample file, so I'm thinking maybe its the wrong one?
What I was really looking for was a way to block certain sites for a particular user, although the approach that's been suggested would be fine if it worked.
Any more comments?
If it's a home computer and you don't have a router you can block with, I'd suggest using something like netnanny.
-
Re: Prevent Internet Explorer access to specified site
thegreatone; thanks, I already tried that.
-TPM-; it's my PC at work. Sometimes I just get too bored to resist Yahoo Games and I'd like to find a way to disable access to the site. I know whatever I do to block I can undo again, but if it involves editing files or rebooting then it becomes too much effort.
I'm still hoping that there is some way of setting up IE's options so that the site is blocked. If not, can you suggest how I can edit NETBIOS or WINs on my PC? I have Admin priveliges so it should be possible.
-
Re: Prevent Internet Explorer access to specified site
adding yahoo.com to the 'restricted' zone in IE should keep you from being able to login into yahoo, because cookies are blocked. also, the game shouldn't run because java / activex are disabled.
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by trisuglow
Code:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 66.218.71.230
127.0.0.1 http://uk.games.yahoo.com/
The line needs to be:
127.0.0.1 uk.games.yahoo.com
Also, like mentioned above, this doesn't stop people from connecting directly by using the IP address. If you want to block the IP address then you need to use a router, proxy server or firewall software installed on the PC.
You can also use the content advisor to block both individual domains and IP addresses. Again though, this is easy to circumnavigate, just use another browser.
-
Re: Prevent Internet Explorer access to specified site
Use willpower, it's much easier and much more satisfying.
Also VisualAd is correct, you mus use a space and not a tab :thumb:
-
Re: Prevent Internet Explorer access to specified site
Actually the use of a space or tab makes no difference. Its the http:// which should not be there. The hosts file is a list of hosts, not URL's.
-
Re: Prevent Internet Explorer access to specified site
why do we use 127.0.0.1 for this purpose?? plz tell!!
also can neone suggest a way to block sites on Win 98??
thnx
-
Re: Prevent Internet Explorer access to specified site
I'm still having no success with this using either the hosts file or the options in Content Advisor.
The only progress I seem to have made is that I get a "no entry" icon at the bottom right of Internet Explorer when I go to a site I've attempted to block. It still lets me go to the site though.
Any more thoughts on why this could be? Like I said before, this is my PC at work so it connects to the Internet through a LAN and firewall.
The previous suggestion about using willpower instead of technology is a good one - I'm also working on this approach :)
-
Re: Prevent Internet Explorer access to specified site
Quote:
Originally Posted by Harsh Gupta
why do we use 127.0.0.1 for this purpose?? plz tell!!
also can neone suggest a way to block sites on Win 98??
thnx
127.0.0.1 is your Local PC's loopback address.
If you had an Apache server running from your machine on Localhost, then 127.0.0.1 would link you back to your own server.
Win 98 has similar files i think, not too sure. I'll have to get back to you on that.
-
Re: Prevent Internet Explorer access to specified site
Hence the geek joke:
"There's no place like 127.0.0.1" (There's no place like home)
Cheers Vis, I stand corrected
-
Re: Prevent Internet Explorer access to specified site
-
Re: Prevent Internet Explorer access to specified site
If you are using a firewall then it would be a lot easier to block the site from there.