问答题

[说明]
某公司有一个局域网,在ISP申请了Internet接入,接入方式是以太网,ISP分配给了一个固定的IP地址为222.152.199.33、子网掩码为255.255.255.252、默认网关为222.152.199.34、DNS为202.102.192.68。该公司有两台服务器,一台PC服务器S1作为代理服务器实现整个公司上网,代理服务器的操作系统是Linux,代理软件是squid;另一台PC服务器S2安装了DHCP服务,为内部客户机动态分配IP地址,拓扑图如下图所示。


下面分别是服务器S1的代理服务配置文件/etc/squid/squid.conf和服务器S2的DHCP服务配置文件/etc/dhcpd.conf的主要内容。
[s1的/etc/squid/squid.conf文件的主要内容]
http_port 8080
cache mere 194 MB
cache dir/home/squid/cache 4000 24 33
cache access log/usr/local/squid/logs/access.log
cache log /usr/local/squid/logs/cache.log
dns nameservers (2)
acl denydomain dstdomain foo.com.tw
acl all scr 0.0.0.0/0.0.0.0
http access deny denydomain
http access allow all
cache_mgr netsnake@263.net
[S2服务器/etc/dhcpd.conf文件的主要内容]
subnet 192.168.1.0 netmask 255.255.255.0
range (3)
default-lease-time 86400;
max-lease-time 604800;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option domain-name-servers 202.102.192.68;

文件/etc/squid/squid.conf中阴影部分的作用是什么

【参考答案】

禁止内部代理用户访问域foo.com.tw内的主机
热门 试题

填空题
活动目录(AD)服务器
单项选择题
试题五认真阅读以下网页制作和网页编程的内容,回答问题1~5,将解答填入对应的解答栏内。 (1) 网页制作 [说明] 某网络资源站点用JSP实现了一个简单的验证码登录控制,网页效果如右图所示。 [login.jsp文档的内容] <%@page contentType= text html;charset=gb2312 language= java import= Java.sql.* errorPage= %> <!DOCTYPE HTML PUBLIC - W3C DTD HTML 4.01 Transitional EN http: www.w3.org TR html4 loose.dtd > <html> <head> <title>用户登录页面< title> <meta http-equiv= Content-Type content= text html;charset=gb2312 > <style type= text css > <!-- STYLE1{ font-family: 宋体 ; font-size:12px; } --> < style> < head> <body> <form method= post action= checkUser.jsp > <table align= center height= 168 > <tr> <td colspan= 3 align=left><hr size= 1 >< td> < tr> <tr> <td width= 78 align=left> < td> <td colspan= 2 > < td> < tr> <tr> <td align=left><span class= STYLE1 >用户账号:< span>< td> <td colspan= 2 > <inputname= userID type= text id= userID > < td> < tr> <tr> <td align=left><span class= STYLEl ,用户密码:< span>< td> <td colspan= 2 > <inputname= userPwd type= password id= userPwd size= 10 ,< td> < tr> <tr> <td align=left><span class= STYLE1 >系统认证码:< span>< td> <tdwidth= 114 ><inputname= rand type= text value= size= 10 maxlength=4>< td> <td width= 50 ><img border= 0 src= image.jsp >< td> < tr> <tr> <td align=left> < td> <td colspan= 2 > < td> < tr> <tr> <tdheight= 23 align=left> < td> <td colspan= 2 ><inputname= submit type=submit value= 登录 > <input type= reset name= Submit value= 重置 >< td> < tr> <tr> <tdheight= 15 align=left> < td> <td colspan= 2 > < td> < tr> <tr> <td colspan=4 align=center><hr size= 1 >< td> < tr> < table> < form> < body> < html> (2) 动态网页编程 [说明] 下图是用户登录提交以后的效果。 [] [Check.jsp文档的内容] <%@ pagecontentType= text html;charset=gb2312 language= java import= ]ava.sql.* errorPage=’ %> <!DOCTYPE HTML PUBLIC - W3C DTD HTML 4.01 Transitional EN http: www.w3.org TR html4 loose.dtd > <html> <head> <title>验证页面< title> <meta http-equiv= Content-Type content= text html;charset=gb2312 > < head> <body> <% String userID=request.getParameter( userID ); String userPwd=request.getParameter( userPwd ); String rand=(String)session.getAttribute( rand ); String input=request.getParameter( rand ); %> <br> <br> <hr size= 1 > <br> <br> <center> <% if(rand.equals(input)) { Class.forName( sun.jdbc.odbc.JdbcOdbcDriver ); Connection con=DriverManager. getConnection( jdbc:odbc=testDB , test , test ); Statement stmt=con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); String strSQL= SELECT*FROM AdminInfor + WHERE AdminID=’ +userID+ ’ + AND AdminPwd=’ +userPwd+ ’ ; ResultSet rs=stmt.executeQuery(strSQL); if(!rs.next()) { out.println( 您输入的账号或密码有误,请重试! ); %> <br> <br> <a href= login.jsp >>>返回登录页面< a> <% } else { out.println( 您已经顺利通过验证,可以进行下一步的操作! ); %> <br> <br> <a href= main.jsp >>>进入系统主界面< a> <% } } else { out.println( 您输入的验证码可能有误,请重试! ); %> <br> <br> <a href= login.jsp >>>返回登录页面< a> <% } %> < center> <br> <br> <hr size= 1 > < body> < html>
A.image.jsp
B.checkUser.jsp
C.login.jsp