Can I Create a URL Whitelist Using Windows 7?


  1. Posts : 42
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #1

    Can I Create a URL Whitelist Using Windows 7?


    I know I can:

    1. Create a URL blacklist by editing the hosts file.
    2. Use 3rd-party software to create a URL blacklist or whitelist (ie. internet filters).

    But...

    What I'm wondering is can I either use the hosts file or some other OS-level (or whatever level) hack to create a whitelist (ie. "block everything but..."), without resorting to flaky, error-prone 3rd-party software?

    Thanks!
    Michael33
      My Computer


  2. Posts : 2,468
    Windows 7 Ultimate x64
       #2

    Without resorting to anything external, I doubt it can be done effectively. I can think of two alternatives:

    Use Windows Firewall to block everything but a few selected IP addresses corresponding to the target websites. You need to get the addresses of each URL, then allow it explicitly, while blocking everything by default. This has the drawback of allowing all the sites hosted on a particular IP, not just a specific domain. Also, if the site changes its hosting, the firewall rule breaks and the site becomes unavailable to you. While it works, it's not extraordinarily good, as the firewall don't supports rules by host name, just by IP.

    Another option would be to use Windows Firewall to block outgoing DNS requests, so that no domain name can be ever resolved, then use the hosts file to add the right IP to each allowed site. This, like the "blacklist" approach, has the drawback of not actually blocking sites at all, just avoid its name resolution. This however can block shared hostings correctly.

    For both options you need the IP addresses of each affected site, then you depend on that not changing. Also that are system-wide and require administrator access to enact or change, so be sure not to give admin permissions to the intended users.
      My Computer


  3. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #3

    Are you still trying to work on the problem you had way back?

    Is it possible to self-regulate using OpenDNS?

    Jack
      My Computer


  4. Posts : 42
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #4

    Alejandro85:

    Is your Win.Firewall solution basically the same as the solution presented here? whitelist - Allow only white-listed sites on Windows 10 - Super User
      My Computer


  5. Posts : 2,468
    Windows 7 Ultimate x64
       #5

    Almost the same idea! Wasn't aware of that post, but yes, pretty much the same. I didn't knew of blocking all the top level domains in hosts, but the rest is the same.
    Is that trick a good option to you?
      My Computer


  6. Posts : 42
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #6

    Alejandro85:

    Apparently the guy who posted that over at superuser didn't know what he was talking about, because I tried pasting all those null-route TLDs in the hosts file, without adding any whitelisted domains, and it didn't block anything (theoretically it should have blocked everything) - unless I'm missing something?

    Jack:

    Yes, the end goal is the same, and I have had much success at self-regulating using OpenDNS, along with blacklisting other sites it misses using the hosts file, but...

    All:

    I guess, in thinking more about what I'm after, I'd like to be able to blacklist all Youtube channels except the ones I whitelist (using the hosts file). But I can't get any YT channels to block using the hosts file (and therefore certainly can't block all except...). I can only block the main website URL, Youtube.com. Anybody know why that is?
      My Computer


  7. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #7

    I'm glad your self control is getting better.

    Take a read through this tutorial and see if it will help.

    Parental Controls - Setup and Use

    I have never used it but it's the only thing I can think of.

    Jack
      My Computer


  8. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #8

    Not sure if the secondary YT URL's could be blocked using your browsers/AV re-direct options setting
    Tell me if the page requested redirection

    Roy
      My Computer


  9. Posts : 42
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #9

    Jack:

    Yes, I have considered the parental controls, but they are not what I'm looking for; they do not allow blocking of specific websites. But thanks for the suggestion.

    Roy:

    I did a little searching for browser redirect settings and I didn't find anything. Not sure what those are. Maybe you can clarify?

    Note: I discovered that the hosts file only deals with domains and not subdomains. It will not recognize anything that comes after the "/" symbol, which is why it ignored attempts to block specific Youtube channels (ie. "Youtube.com/user/videos").

    There just has to be a way to get every url entered to be processed in the desired way. Guess I'll just keep looking.
      My Computer


  10. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #10



    The following add-on might be of use

    https://www.google.co.uk/url?sa=t&rc...GP6aWX8yQtr1rw


    Bit more info, obviously FF, assume google has the same kinda thing

    Roy
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:07.
Find Us