Can I Create a URL Whitelist Using Windows 7?

Michael33

New member
Local time
12:31 AM
Messages
42
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 My Computer

Computer type
Laptop
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU T4400 @ 2.20GHz
Motherboard
eMachines eMachines E725
Memory
4.00 GB
Graphics Card(s)
(1) Mobile Intel(R) 4 Series Express Chipset Family (2) Mo
Sound Card
Realtek High Definition Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
(1) WDC WD2500BEVT-22A23T0 (2) Msft Virtual Disk SCSI Disk Device (3) Seagate BUP Slim BK USB Device
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 My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home made Desktop
OS
Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
CPU
Intel i7-6800K @ 4.3
Motherboard
ASUS X-99 Deluxe II
Memory
Corsair Platinum 16 gig @2400
Graphics Card(s)
EVGA GTX 1070 OC
Monitor(s) Displays
Asus 27" LED LCD/VE278Q
Screen Resolution
1920-1080 or 1280-720 HDMI
Hard Drives
INTEL SSD 730-240 Gb Sata 3.0/
PSU
EVGA Platium 1200W
Case
Phanteks Luxe Tempered Glass 8 fans/ one radiator
Cooling
XSPC/ Water Cooled CPU
Keyboard
Das 4 Professional
Mouse
Logitech M705/MX Anywhere 2-S
Internet Speed
100 mbits
Antivirus
Microsoft Security Essentials/ Malwarebytes Premium 3.0/ SAS
Browser
I.E. 11 default/Firefox/ ISP Time Warner Cable/Spectrum
Other Info
LG BluRay Burner/
Sound system-KLipsch-THX/
Icy Dock ssd Hot Swap bays.

My Computer My Computer

Computer type
Laptop
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU T4400 @ 2.20GHz
Motherboard
eMachines eMachines E725
Memory
4.00 GB
Graphics Card(s)
(1) Mobile Intel(R) 4 Series Express Chipset Family (2) Mo
Sound Card
Realtek High Definition Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
(1) WDC WD2500BEVT-22A23T0 (2) Msft Virtual Disk SCSI Disk Device (3) Seagate BUP Slim BK USB Device
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 My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
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 My Computer

Computer type
Laptop
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU T4400 @ 2.20GHz
Motherboard
eMachines eMachines E725
Memory
4.00 GB
Graphics Card(s)
(1) Mobile Intel(R) 4 Series Express Chipset Family (2) Mo
Sound Card
Realtek High Definition Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
(1) WDC WD2500BEVT-22A23T0 (2) Msft Virtual Disk SCSI Disk Device (3) Seagate BUP Slim BK USB Device
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 My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home made Desktop
OS
Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
CPU
Intel i7-6800K @ 4.3
Motherboard
ASUS X-99 Deluxe II
Memory
Corsair Platinum 16 gig @2400
Graphics Card(s)
EVGA GTX 1070 OC
Monitor(s) Displays
Asus 27" LED LCD/VE278Q
Screen Resolution
1920-1080 or 1280-720 HDMI
Hard Drives
INTEL SSD 730-240 Gb Sata 3.0/
PSU
EVGA Platium 1200W
Case
Phanteks Luxe Tempered Glass 8 fans/ one radiator
Cooling
XSPC/ Water Cooled CPU
Keyboard
Das 4 Professional
Mouse
Logitech M705/MX Anywhere 2-S
Internet Speed
100 mbits
Antivirus
Microsoft Security Essentials/ Malwarebytes Premium 3.0/ SAS
Browser
I.E. 11 default/Firefox/ ISP Time Warner Cable/Spectrum
Other Info
LG BluRay Burner/
Sound system-KLipsch-THX/
Icy Dock ssd Hot Swap bays.
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 My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
medionl/Aspire 6930G/acer x55a
OS
W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
CPU
E5300 dual core
Motherboard
medion MS7366
Memory
3gb
Graphics Card(s)
Nvidia Geforce 7100 Nforce 630i
Monitor(s) Displays
avixc
Internet Speed
n (isp resticted to 72)
Antivirus
mse/pands
Browser
palemoon
Other Info
Belkin Fd7050 n USB using Railink RT2870 drivers, more upto date
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 My Computer

Computer type
Laptop
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU T4400 @ 2.20GHz
Motherboard
eMachines eMachines E725
Memory
4.00 GB
Graphics Card(s)
(1) Mobile Intel(R) 4 Series Express Chipset Family (2) Mo
Sound Card
Realtek High Definition Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
(1) WDC WD2500BEVT-22A23T0 (2) Msft Virtual Disk SCSI Disk Device (3) Seagate BUP Slim BK USB Device

The following add-on might be of use

https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=9&cad=rja&uact=8&ved=0ahUKEwidw56Sv7fRAhXJCsAKHYhyAqcQFghLMAg&url=https%3A%2F%2Faddons.mozilla.org%2Fen-GB%2Ffirefox%2Faddon%2Fnoredirect%2F&usg=AFQjCNFaD_voKP9bj88mGP6aWX8yQtr1rw


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

Roy
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
medionl/Aspire 6930G/acer x55a
OS
W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
CPU
E5300 dual core
Motherboard
medion MS7366
Memory
3gb
Graphics Card(s)
Nvidia Geforce 7100 Nforce 630i
Monitor(s) Displays
avixc
Internet Speed
n (isp resticted to 72)
Antivirus
mse/pands
Browser
palemoon
Other Info
Belkin Fd7050 n USB using Railink RT2870 drivers, more upto date
Back
Top