internet access

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
boishaly
Posts: 1
Joined: 04 Jul 2012 03:52

internet access

#1 Post by boishaly » 05 Jul 2012 23:29

How to limit internet access to just a few websites? I need to restrict internet access to just a few websites at ~20 locations. The locations are retail stores that need internet access to HR websites and company websites, but I don't want them surfing the internet.
__________________________
yahoo keyword tool ~ overture
Last edited by boishaly on 09 Jul 2012 01:46, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: internet access

#2 Post by foxidrive » 05 Jul 2012 23:33

You're not going to do that with a batch file.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: internet access

#3 Post by Squashman » 06 Jul 2012 06:08

Your options for something that wide spread would be to use an Internet Proxy server like Border Manager, ISA or Squid.

You could also look at using OpenDNS. Their paid version allows a WHITELIST only setting.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: internet access

#4 Post by abc0502 » 06 Jul 2012 07:13

In fact there is a very simple way i read about it long time ago,
There is a file called hosts in C:\Windows\System32\Drivers\etc
open it and to block any website just add anew line and write the line like this:

and for information i found this article you can have a look. http://askabouttech.com/how-to-block-certain-websites/

By the way if you have antivirus like my avira it will prevent you from modifing it so close it before modifing this file then re-activate it.

EDIT:
SORRY I MISS UNDERSTOOD YOUR REQUIST, :oops:
In Internet Explorer there is a whitelist option that allow some websites and deny any other websites, & in firefox
there is add-on called Easy Whitelist that do the same like IE you should try it.

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: internet access

#5 Post by Dos_Probie » 06 Jul 2012 14:04

I need to restrict internet access to just a few websites


If you are trying to restrict access to just a few websites then you can
do a batch file with the sites included and install it on the hosts, like abc said
tho you may need to disable Microsoft Essentials or AVG etc or else it will start giving you a false/postive when you attempt to changes the Hosts file. Also you can do a registry entry to add sites to "Restricted Zone" for your browser.
see examples below...
BTW if you just have the IP you want to restrict and need the URL also
you can do nslookup xx.xx.xxx.xxx from commandline and add to hosts as well.
8)

Code: Select all

Windows Registry Editor Version 5.00
;Adds Site to the "Restricted Zone."
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\adultfriendfinder.com]
"*"=dword:00000004


Code: Select all

::HOSTS FILE - BLOCK SITES::(Will Block your Browser from these sites- giving message "Unable to connect")
echo 68.178.225.162 secureserver.net >> %WinDir%\system32\drivers\etc\hosts
echo 85.17.138.60   leaseweb.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   ad.doubleclick.net >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   an.tacoda.net >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   clk.atdmt.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   rmd.atdmt.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   spe.atdmt.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   media.fastclick.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   media.fastclick.net >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   servedby.advertising.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   view.atdmt.com >> %WinDir%\system32\drivers\etc\hosts
echo 127.0.0.1   mystart.incredibar.com >> %WinDir%\system32\drivers\etc\hosts

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: internet access

#6 Post by foxidrive » 06 Jul 2012 22:19

He wants to allow 20 sites and block the rest.

Post Reply