IIS + domain group policy + hosts: forbid access to the specified website, iishosts
I. Introduction
Website access prohibited can be achieved in multiple ways, and the best performance can be achieved on network devices. This function is implemented on the Domain Server. The advantage is that the configuration is simple and the page can be customized. The disadvantage is also obvious. If you are familiar with the operating system, you can easily modify the hosts file to crack it.
IIS: A Web server that displays a page that is not accessible.
Domain group policy: when a user logs in, the script is automatically executed to copy the shared hosts file to the local device.
Hosts: the list of prohibited websites. The principle is to redirect the website domain name to an IP address, which is redirected to the Web server.
Ii. Configuration
IIS configuration process
Index.html Page code
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head> <meta http-equiv =" Content-Type "content =" text/html; charset = big5 "/> <title> reject keywords </title> <style type =" text/css "> <! -- Body {margin: 0; font-size :. 7em; font-family: Verdana, Arial, Helvetica, sans-serif; background: # EEEEEE;} fieldset {padding: 0 15px 10px 15px;} h1 {font-size: 2.4em; margin: 0; color: # FFF;} h2 {font-size: 1.7em; margin: 0; color: # CC0000;} h3 {font-size: 1.2em; margin: 10px 0 0 0; color: #000000 ;}# header {width: 96%; margin: 0 0 0 0; padding: 6px 2% 6px 2%; font-family: "trebuchet MS", Verdana, sans-serif; color: # FFF; background-co Lor: #555555; }# content {margin: 0 0 0 2%; position: relative ;}. content-container {background: # FFF; width: 96%; margin-top: 9px; padding: 10px; position: relative ;} --> </style>
Script specified by the domain group policy
Script 1.bat
xcopy /u /y \\192.168.1.100\Public\bat\hosts %windir%\system32\drivers\etc\
Hosts file, prohibit web QQ,
192.168.1.100 wx.qq.com192.168.1.100 web.wechat.com192.168.1.100 web2.qq.com
Iii. Test
This article is from the "O & M cainiao. log" blog and will not be reposted!