Results 1 to 28 of 28

Thread: Prevent Internet Explorer access to specified site

  1. #1

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    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?
    This world is not my home. I'm just passing through.

  2. #2
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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
    Zeegnahtuer?

  3. #3
    Hyperactive Member nothingofvalue's Avatar
    Join Date
    Jul 2005
    Location
    Arizona
    Posts
    489

    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.
    "Imagination is more important than knowledge..."

    Albert Einstein
    -----------------------------------------------
    If my reply helped you then you really were lost, but I still took the time to help, please rate it anyway

  4. #4
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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
    Zeegnahtuer?

  5. #5
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    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.
    TPM

    Add yourself to the VBForums Frappr Map!!

  6. #6
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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.
    Zeegnahtuer?

  7. #7
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    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...
    TPM

    Add yourself to the VBForums Frappr Map!!

  8. #8
    Hyperactive Member nothingofvalue's Avatar
    Join Date
    Jul 2005
    Location
    Arizona
    Posts
    489

    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
    "Imagination is more important than knowledge..."

    Albert Einstein
    -----------------------------------------------
    If my reply helped you then you really were lost, but I still took the time to help, please rate it anyway

  9. #9
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    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.
    TPM

    Add yourself to the VBForums Frappr Map!!

  10. #10
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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.
    Zeegnahtuer?

  11. #11
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Prevent Internet Explorer access to specified site

    Yes, you will! (and yes I did try it)
    TPM

    Add yourself to the VBForums Frappr Map!!

  12. #12

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    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?
    This world is not my home. I'm just passing through.

  13. #13
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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.
    Zeegnahtuer?

  14. #14

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    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/
    This world is not my home. I'm just passing through.

  15. #15
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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 !
    Zeegnahtuer?

  16. #16
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    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.
    TPM

    Add yourself to the VBForums Frappr Map!!

  17. #17
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    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.
    TPM

    Add yourself to the VBForums Frappr Map!!

  18. #18

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    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.
    This world is not my home. I'm just passing through.

  19. #19
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048

    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.

  20. #20
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  21. #21
    Fanatic Member Valleysboy1978's Avatar
    Join Date
    Nov 2004
    Location
    Planet Xeoroaniar CC Posts:1,928,453,459,361
    Posts
    770

    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
    Life is one big rock tune

  22. #22
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  23. #23
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    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
    Show Appreciation. Rate Posts.

  24. #24

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    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
    This world is not my home. I'm just passing through.

  25. #25
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    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.
    Zeegnahtuer?

  26. #26
    Fanatic Member Valleysboy1978's Avatar
    Join Date
    Nov 2004
    Location
    Planet Xeoroaniar CC Posts:1,928,453,459,361
    Posts
    770

    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
    Life is one big rock tune

  27. #27
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: Prevent Internet Explorer access to specified site

    Zeegnahtuer?

  28. #28
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width