Results 1 to 32 of 32

Thread: Preventing Users from websites

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492

    Preventing Users from websites

    I would like to know if there is a way that I can block certain websites in Windows XP, obviously with administrator power. For example, what can I do either in windows or what other program can I get / download so that I can prevent the other users from going to certain sites. Say i would like to block users from going to www.yahoo.com what do I need to do, so that when the user goes to that site it will not even load for them.

    Any solutions to this, all ideas are greatly appreciated.

    Thanks

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    I assume you are system admin, and user dont have write permission in System32 folder then you should be able to implement it easily using hostfile.

    add a entry to hostifle which will redirect the site you want to block to a local html file (e.g saying this site is blocked).

    If you are not familiar with hostfile then let me know, i will explain it.

    Hope this helps.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by Danial
    I assume you are system admin, and user dont have write permission in System32 folder then you should be able to implement it easily using hostfile.

    add a entry to hostifle which will redirect the site you want to block to a local html file (e.g saying this site is blocked).

    If you are not familiar with hostfile then let me know, i will explain it.

    Hope this helps.

    Danial
    Wouldn't that apply to all users, including the admin?

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mendhak
    Wouldn't that apply to all users, including the admin?
    Yes, thats correct mendhak. I assumed thats what he wants...
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  5. #5
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611
    But if the user knows the IP-adress of the site he wants to see, he can type that in the browser, and that *SHOULD* work
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    Danial,

    Yes, I am the one with Admin.

    I have not done anything with hosts files, so I would appreciate if you can give me exact instructions on how to do this or guide me to a site that will explain precisely how to do this.

    The thing is that I want to block all users from going to certain sites, but allow the Admin to go to any site that I wish to go to. This is only for limited user accounts. I dont want the users to go to these sites but I dont want it to stop me from going there.

    thanks

  7. #7
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    In Internet Explorer

    Not sure if this is any help, but
    in the Internet Explorer browser itself you can specify certain websites as always or never allowed.

    In I.E. go to
    Tools - Internet Options - Content tab - then Settings... button
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  8. #8
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854
    set this proxy:

    bess-proxy.esc11.tenet.edu

    Port: 7028

    This will stop people from accesing "bad" sites.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    CID, it isnt to block bad sites, its just to prevent access to a few sites, from that given computer.

    DaveBo, I am going to look into your option but I believe that I tried something like that and it didnt seem to work.

  10. #10
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mrstuff68
    Danial,

    Yes, I am the one with Admin.

    I have not done anything with hosts files, so I would appreciate if you can give me exact instructions on how to do this or guide me to a site that will explain precisely how to do this.

    The thing is that I want to block all users from going to certain sites, but allow the Admin to go to any site that I wish to go to. This is only for limited user accounts. I dont want the users to go to these sites but I dont want it to stop me from going there.

    thanks
    Hi,
    Like some one mentioned, if you go with the host file, then it would block everyone from visting the site. Though you could write application to modify the host file depending on the user stastus.

    Secondly if someone knows the IP address, i think they would be able to visit the site, like a poster mentioned. Would that be acceptable?

    I have some code somewhere which blocks sites visited using IE, havent tested it on any other browser or whether it will work with IP address.

    I will test it out if i get a chance and find the code.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    Danial,

    I can do the host file thing, but I have not idea of how to do this. If you could provide me with some info on how to take care of this host file stuff I would greatly appreciate it.

    I am really not too scared about IP address, but cant I put the IP in host file and block that also?

    I am willing to do just about anything possible, as long as I get it done ASAP.

    Thanks

  12. #12
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Ok let me go step by step.

    1. First create a HTML page saying, "This page is blocked and can not be accessed" or something like that, lets save it as blocked.htm

    2. Now open up note pad and open this file
    C:\WINDOWS\system32\drivers\etc\host

    Notice the file is called host with no extension and the path will differ depending on your operating system, though it is always in

    Windows Folder\System32\Drivers\etc folder

    3. Now you might already have some entry. By default there is only one.

    127.0.0.1 localhost

    4. The first colum is where the user will get redirectd, second column is where you specify the URL of the site you wan to block.

    I am not sure if you can have the user redirected to a local file, if you have a web server running then there should be no problem.

    5. Now add the entries and save the file
    e.g
    127.0.0.1/blocked.htm www.yahoo.com
    127.0.0.1/blocked.htm www.microsoft.com

    Now you may havet to restart to apply the changes.

    Try typing the url and see what happens.

    Try using the IP of the site instead of the url, in the host file and see if that works, it might you never know.

    Hope this helps.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  13. #13
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    sorry its called "hots" not "host"
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    Danial,

    I have tried what you told me in the instructions and I have not been able to get it working. What folder do I put the blocked.htm? Also what do you mean by hots and not hosts?

    I have not been able to get this working like it is suppose to, please let me know what else I can do.

  15. #15
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    File files path is: C:\WINDOWS\system32\drivers\etc\host

    host is the file, it has no extention

    Now you need to configure IIS(Internet Information Server)

    If you already have IIS install just copy the file to c:\inetput\wwwroot\

    Installing IIS

    Get In to the Control Panel

    Open Add or Remove Programs

    Click Add/Remove Windows Componets On the side

    Check IIS (Internet Information Services)

    Click ok and then it will install, you might need your xp disc

    s
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  16. #16
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Bah, forget about being "comprehensive"

    Just put in the URL of the bad site, and send it to http://127.0.0.1

    It doesn't matter if you have IIS installed or not, you'll just get the 404 page.

  17. #17
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Did you manage to get it to work?


    If you dont have IIS installed and dont want to install it, then try uploadign the html page somewhere on the Internet and then specify the IP that should work.

    e.g
    instead of :

    127.0.0.1/blocked.htm www.yahoo.com

    http://213.23.34/blocked.htm www.yahoo.com

    Let me know how you get on.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  18. #18
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  19. #19
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mendhak
    Or just send them to


    Yes he could, but it would be pointless, as this thread tells you how to get around the scheme
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  20. #20

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    I have tried everything and cant seem to get it to work. Let me see if I have everything right. I uploaded the blocked.htm to my webpage to make it simple, I have also put the link to my page in the host file, ex. http://........./blocked.htm www.yahoo.com and I have saved and it still doesnt work. I tried doing it through IIS and still cant get it to work, what could I possibly be doing wrong??

    Can you upload a host file, that actually works, so that I can just throw it into the etc folder and test it out to see how and if it works.

    Thanks

  21. #21
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mrstuff68
    I have tried everything and cant seem to get it to work. Let me see if I have everything right. I uploaded the blocked.htm to my webpage to make it simple, I have also put the link to my page in the host file, ex. http://........./blocked.htm www.yahoo.com and I have saved and it still doesnt work. I tried doing it through IIS and still cant get it to work, what could I possibly be doing wrong??

    Can you upload a host file, that actually works, so that I can just throw it into the etc folder and test it out to see how and if it works.

    Thanks
    What operating system are you using? Did you find the hosts file in the etc folder or you created it? Also did you restart after you changed the hosts file?

    Use IP address instead of url

    e.g
    127.0.0.1/blocked.htm www.yahoo.com
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  22. #22

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    I am using windows XP. I found the hosts file, I didnt not create it., there where a few other lines in it, so I just added my line. Restart is the only thing I didnt do. But will try that now.

  23. #23
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mrstuff68
    I am using windows XP. I found the hosts file, I didnt not create it., there where a few other lines in it, so I just added my line. Restart is the only thing I didnt do. But will try that now.
    It would not work without restart.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  24. #24

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    Ok, I restarted and still nothing. Can it be due to the version of IE that I am using, or what cause I really dont know what else I can do.

    This is where the file is
    c:\windows\system32\drivers\etc\hosts

    and this is the line that I added into it.


    http://213.23.34/blocked.html www.yahoo.com


    Are you sure that nothing else needs to be done?

    How do I know that when I go to IE and type www.yahoo.com, that IE had went and looked at the hosts file, is there any way to check, cause there really isnt anything that I can mess up.

    any other ideas

  25. #25
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mrstuff68
    Ok, I restarted and still nothing. Can it be due to the version of IE that I am using, or what cause I really dont know what else I can do.

    This is where the file is
    c:\windows\system32\drivers\etc\hosts

    and this is the line that I added into it.


    http://213.23.34/blocked.html www.yahoo.com


    Are you sure that nothing else needs to be done?

    How do I know that when I go to IE and type www.yahoo.com, that IE had went and looked at the hosts file, is there any way to check, cause there really isnt anything that I can mess up.

    any other ideas
    I dont think its the browser.

    dont use the http before the IP address. Try it without the http part(213.23.34/blocked.html). Rember you need a restart to take the effect of this change.

    For more detailed information about hosts file read this

    http://www.accs-net.com/hosts/how_to_use_hosts.html
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  26. #26

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    I have tried everything now. Http, no http. Restart, everything that you toldme about 5 fold and this still doesnt want to work.

  27. #27
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by mrstuff68
    I have tried everything now. Http, no http. Restart, everything that you toldme about 5 fold and this still doesnt want to work.
    I am really sorry but i am mystified to the reason why its not working for you. I have two machine running currently, and in both of them i am using host files to block ads.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  28. #28
    Lively Member
    Join Date
    Jun 2002
    Posts
    111

    Thumbs up ooo, ooo, I know

    Windows XP has settings and everything:

    microsoft content blah blah

    check out part 7 - you would type in the url and hit disapprove

  29. #29
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: ooo, ooo, I know

    Originally posted by Kantalope
    Windows XP has settings and everything:

    microsoft content blah blah

    check out part 7 - you would type in the url and hit disapprove
    Would it work if user is using other Web Browser then IE?
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  30. #30
    Lively Member
    Join Date
    Jun 2002
    Posts
    111
    other than IE? <--the dickens you say.

    My Mozilla is kinda old - so dunno.

    Earthlink uses some IE shell so that would work...

    AOL - you could set up kiddee accounts for everyone...

    For that matter you could get some kind of filter software - I don't have kids so I don't worry about such things - but that stuff would have to interfere with all browsers or all jr. would have to do is download and bypass all that nifty filter stuff.

  31. #31
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by Kantalope
    other than IE? <--the dickens you say.

    My Mozilla is kinda old - so dunno.

    Earthlink uses some IE shell so that would work...

    AOL - you could set up kiddee accounts for everyone...

    For that matter you could get some kind of filter software - I don't have kids so I don't worry about such things - but that stuff would have to interfere with all browsers or all jr. would have to do is download and bypass all that nifty filter stuff.
    Even AOL uses IE underneath. If it works in Mozilla/Netscape/Firefox, it would be a awsome feature. Though even for IE only is a good feature .
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  32. #32

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Posts
    492
    The Windows XP settings seem to be just what I need. That should be good enough.

    Thanks Kantalope

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