home *** CD-ROM | disk | FTP | other *** search
Wrap
<% Message = "" action = Request.ReqParam("action") if (action = "Apply") then Message = "The following settings have been configured:<br>" if (Request.ReqParam("secureLAN") <> "") then ' configure secured LAN 'step1 - removing trusted IPs IPString = Accounts.MaskList ' get the trusted IP list i = Instr(IPString,"<a>")+3 ' find the first IP while (i > 3) if (i>3) then IPString = Mid(IPString,i) ' IPString = 192.168.</a>.... i = Instr(IPString,"</a") tempstring = Left(IPString,i-1) ' tempstring = 192.168. Accounts.DeleteMask(tempstring) ' delete it end if i = Instr(IPString,"<a>")+3 ' get next IP wend 'step2 - get local IPs 'simulate adding a proxy Set proxy = Proxies.NewProxy proxy.FileName = "GKHttp.dll" ' get default input address -> all IP addresses available on the server. IPString = proxy.GetDefaultStringProperty("Input_Address") 'now parse the string while (IPString <> "") i = Instr(1,IPString,vbCr) ' find the end-of-line tempstring = Left(IPString,i+1) ' the first line - 192.168.1.1 (LAN) if (i>0) then IPString = Mid(IPString,i+1) ' if not the last line then get to the next else IPString = "" ' no more line - force end of parsing end if i = Instr(1,tempstring,"LAN") ' check if it is a LAN IP or not if (i > 0) then ' it is a LAN IP i = Instr(tempstring,".") +1 ' find the dot (.) tempstring2 = Mid(tempstring, i+1) ' tempstring2 = 168.1.1 tempstring2 = Left(tempstring2,Instr(1,tempstring2,".")) 'tempstring2 = 168. tempstring = Left(tempstring,Instr(1,tempstring,".")+1) 'tempstring = 192. tempstring = tempstring + tempstring2 'tempstring = 192.168. On Error Resume Next Accounts.AddFilterMask tempstring ' Add Trusted IP Mask If Not Err.Number = 0 Then ErrLine = Err.Description 'Error occured else 'no error - notify user Message = Message + " - ALLOWED trusted IP address(range) : "+ tempstring+ "<br>" End If end if wend Accounts.AccessType = True ' set to DENY from all IPs except the LAN 'step3 DISABLE Guest Access ' removing all guest ips IPString = Accounts.GuestMaskList i = Instr(IPString,"<a>")+3 while (i > 3) if (i>3) then IPString = Mid(IPString,i) i = Instr(IPString,"</a") tempstring = Left(IPString,i-1) Accounts.DeleteGuestMask(tempstring) end if i = Instr(IPString,"<a>")+3 wend Message = Message + " - Guest Access Disabled - please use the GKAccess.exe on the workstations to login to the service<br>" Accounts.GuestAccessType = True end if if (Request.ReqParam("dns") <> "") then ' configure the DNS server Message = Message + " - DNS server started. DNS forwarded to 10.24.145.38<br>" DNS.Enabled = True DNS.Logging = True DNS.KicksDialer = True DNS.RemoteDNS = "10.24.145.38" end if if (Request.ReqParam("dhcp") <> "") then ' configure DHCP for a LAN if (Message = "") then Message = Message + "- <br>" end if ComDhcp.Enabled = True ComDhcp.Commit index=0 while (ComDhcp.Subnet(index)<>"") Response.Write ComDhcp.Subnet(index) ComDhcp.DeleteSubNet ComDhcp.Subnet(index) index=index+1 wend ' add subnet name start_ip end_ip no-exc. time ComDhcp.AddNewSubNet "255.255.255.0","192.168.1.1","192.168.1.255","", 259200, "LAN",1 ComDhcp.DHCPOption(comDhcp.Subnet(0),3) = "192.168.1.1" ComDhcp.DHCPOption(comDhcp.Subnet(0),5) = "192.168.1.1" ComDhcp.DHCPOption(comDhcp.Subnet(0),6) = "192.168.1.1" ComDhcp.DHCPOption(comDhcp.Subnet(0),15) = "local.lan" ComDhcp.DHCPOption(comDhcp.Subnet(0),44) = "192.168.1.1" ComDhcp.DHCPOption(comDhcp.Subnet(0),46) = "8" end if end if %> <html> <head> <title>Family GateKeeper Configuration Pages - Infopulse</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <script language="JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body bgcolor="#FFFFFF" text="#3060A0" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/about_on.jpg')"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="5%"></td> <td width="95%"> <center><br><big> <font size="3" face="MS Sans Serif"><Strong> Quick network configuration</strong> </font></big> </center> <Br> Please check the options you want to configure. Checked options are recommended. <br> Also note, that all current settings will be overridden! <br><br> <form name="network" method="POST" action="network.agp"> <input type="checkbox" name="secureLAN" value="check" checked> Secure your network - the proxy will serve only users from within your local network; everyone has to login to the service in order to access the Internet. <br> <input type="checkbox" name="dns" value="check" checked> Start DNS service - the proxy will resolve the hostnames to IP addresses, instead of using the Windows' DNS service. <br> <input type="checkbox" name="dhcp" value="check" checked> DHCP server - assign automatically IP addresses to the workstations. <br><br> <input type="image" name="Apply" src="../images/apply.gif" OnClick="javascript:document.network.action.value='Apply';document.network.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Apply','','../images/apply01.gif',1)" border="0"> <input type="hidden" name="action" value=""><br> </form> <br> <font size="1" face="MS Sans Serif"><%Response.Write(GateKeeper.Version)%></font> </td></tr></table> </body></html>