Advanced WinGate Configuration contents.gifprev1.gifnext1.gif

Advanced WinGate Configuration

This section is reference for advanced configuration of WinGate 2. Most of this is done in the registry, with regedit.exe or regedt32.exe. Care must be taken with any registry operations as they are not readily reversible. Qbik recommend backing up the WinGate key before making any changes to the registry.

Registry Keys:

WinGate 2 saves all its settings under the key

HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\

The self explanatory Sub keys currently used are

Cache

DefaultRights

DHCP

Dialer

ErrorStrings

Licensing

Locations

MimeTypes

Scheduler

Services

Settings

System Rights

User Database

Most require little explanation, however we will discuss the details of a few.

Cache Contained here are the settings for the WinGate cache.

Default rights This section contains the defaults rights that are normally accessed via the Default rights section in GateKeeper. If you accidentally lock out all access to any of the Access, Edit or Start Stop rights, then deleting the appropriate sub key will cause defaults to be used, and Administrators will have access as normal.

DHCP (DO NOT TOUCH) Stored here are the current leases allocated by the WinGate DHCP server. Also stored is the Assumptions key, which stores details of assumptions based on Machine name.

ErrorStrings The keys contained within each section contained here are the error messages strings that WinGate uses in the event of an error. You can customise the values held in these strings (dont change the names themselves). You may wish to use more descriptive error messages, messages that tell a user who to contact, or translate then to another language. These strings can be HTML files, the source its self, WinGate supplies the header so the body content is all that is required See below for more on this section.

Locations This key holds sub keys relating to each IP based user assumption that you set in GateKeeper. Filter is the IP number Internal filter is the IP expanded to contain all the 0s and ? placeholders for wildcards.

MimeTypes The values stored are in the format

Name <extension-name> Value <mimetype>.

For example the mime type gif would be stored with the name gif and the value image/gif. You can create new mime types so that the FTP in WWW can show more file types. Simply add the name of the extension with its mime type, and add an icon to the resources directory. This directory contains gif files with the filename format <extension>.gif .These gifs are used as icons for FTP in the WWW proxy. You will notice common extensions such as gif, jpg, htm and doc.

WinGate will look in that directory for <ext>.gif, and use it if it exists. If it does not exist, the default.gif file will be used, a blank page icon. Directories are shown with the directory.gif image. You can customise your WWW FTP proxy by adding new icons such as bat.gif, an icon that could be used to represent batch files. You will notice that jpg.gif and gif.gif are identical. If you use another image type, you could introduce a new icon for that type, or make a copy of gif.gif to say img.gif. Netscapes mime types are listed in the Options - general - helpers menu.

To add mime types for the WWW Proxy (used where WinGate is used as a WWW

server, and also used for FTP in the WWW proxy), add values to the key

HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\MimeTypes

The name of the value should be the file extension for the relevant Mime

Type. The string value should be the actual mime type.

e.g

html="text/html"

exe="application/binary"

there are a number of MimeTypes built into WinGate already.

Services All the WinGate Services are listed in this section with self explanatory titles.

Settings The directories used for Audits, Logging and Caching are configurable in registry. All changes to the registry settings for WinGate require the WinGate service

to be restarted.

Audit Files:

To change the directory of the audit files:

HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\Settings\

create a value called AuditDirectory

and set it to the path you want.

HTTPSearchOrder

This list of keys named FormatX contains the list of Site names that will be searched upon an HTTP requests.

WinGate will:

1. Search for the site %s, (eg cnn)

2. If it cant find it, it will read the Format0 value and substitute the %s, eg cnn.com (This example will succeed)

3. This process continues till a site is found that matches or there are no more formats.

The requested site is represented as %s.

Normally the HTTPSearchOrder key will have the following entries:

"Format0"="www.%s.com"

"Format1"="%s.com"

"Format2"="www.%s"

Dont specify a key for %s as WinGate always checks this first. You can add more sites. This would be a comprehensive search:

"Format0"="www.%s.com"

"Format1"="%s.com"

"Format2"="www.%s"

"Format3"="www.%s.net"

"Format4"="%s.net"

"Format5"=" www.infoseek.com/Titles?qt=%s"

The last entry will direct the client to the search site if there is no site with any of the matching formats, and start a search with that keyword.

Log Files:

To change the directory of the service log files:

HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\Settings\

create a value called LogFileDirectory

and set it to the path you want.

Cache directory:

To change the directory of the cache files:

HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\Cache\

edit a value called CacheDirectory

and set it to the path you want.

NOTES ON PATHS

If you want to use a network drive, you must use the UNC name, rather than

any mapped drive letter, as these are only valid once a user is logged on.

\\servername\sharename\path

e.g

CacheDirectory="\\BEAST\C\Cache"

Error Messages

Below are listed the individual available error messages that are configurable. You most likely will not need to change these.

[HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\ErrorStrings\HTTP]

"AccessDeniedTitle"="Access Denied"

"AccessDeniedDescription"="You do not have sufficient rights for access to this resource"

"AnonymousAccessDeniedTitle"="Access Denied"

"AnonymousAccessDeniedDescription"="Anonymous Access Denied"

"FileAccessDeniedTitle"="Access Denied"

"FileAccessDeniedDescription"="File not found or access denied"

"GatewayTimeoutTitle"="FTP Error"

"GatewayTimeoutDescription"="FTP Session has timed out"

"LicenseViolationTitle"="Access Denied"

"LicenseViolationDescription"="Too many connected users - try again later"

"MalformedRequestTitle"="Browser Error"

"MalformedRequestDescription"="Your Browser sent a malformed request"

"ProtocolErrorTitle"="Protocol Error"

"ProtocolErrorDescription"="Only HTTP, FTP and SSL are currently supported"

"SocketErrorTitle"="Socket Error"

[HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\ErrorStrings\SocketErrors]

"HostnameLookupFailed"="Host name lookup for '%s' failed"

"RecvLineTimeout"="Timeout in recvline function"

"RecvFixedTimeout"="Timeout in RecvFixedAmount function"

"10022"="Could not connect to remote host"

"10050"="Remote Network Down"

"10051"="Remote Network Unreachable"

"10054"="Connection Reset by Remote Host"

"10055"="Out of buffers"

"10060"="Connection to Remote Host timed out"

"10061"="Connection refused by Remote Host"

"10065"="Host unreachable"

[HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\ErrorStrings\SOCKS]

"AccessDenied"="SOCKS4 connect to %s:%u failed - denied by SOCKS server"

"NoResponse"="SOCKS4 connect to %s:%u failed - no response from SOCKS server"

[HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate 2\ErrorStrings\SSL]

"BadResponse"="SSLTunnelling connect to %s:%u failed - bad response from HTTP server"

Other keys:

Warning: Changing the following keys is not recommended. Windows likes to deal with these services itself. The preferred method for removing the service is in Uninstalling WinGate.

95

In the Windows 95 version the following key is used to run WinGate as a service.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current version\Run Services\WinGate 2

Removing this key will prevent WinGate loading at startup. If you can not access WinGate with GateKeeper to shut it down, removing or renaming this key and restarting will have the same effect.

NT

In NT service information for WinGate is stored in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinGateEngine

Both:

HKEY_ LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\gatekeeper.exe

is used to store the path of Gatekeeper.

HKEY_CURRENT_USER\Software\Qbik Software\GateKeeper is used to Gatekeeper settings.

Other info:

wingate200090000.gif If you accidentally delete WinGate configuration information that prevents you from accessing WinGate with Gatekeeper, do not reinstall WinGate. There are two likely possibilities. You may have damaged your user account. If this is the case, log on as Administrator and rectify the information, or delete the user key in the registry. If you have damaged the Admin user, delete the Admin user in the registry. The other option is that you may have denied access to yourself. Either log on as an Administrator and reinstate your access, or edit the registry and look at the rules that may have prevented access to Gatekeeper. Check the Remote control service rules, and System policies.

wingate200090000.gif InfoWorld 10/20/97, page 31, in "The Bug Report" article, it mentions a registry fix for those using Novell Netware Client 32 software and Internet Explorer 4. It mentions that IE 4 will work with proxy servers after making this change.

The change is to add the registry key

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\InternetSettings\DontUseDNSLoadBalancing = (REG_DWORD) 1.

wingate200090000.gif Various command line options are available with the WinGate EXE file.

For a list of these options:

In NT type

wingateengine -?

Or in 95 type

wgeng95 /?

wingate200090000.gif One of the available command line options is clean. This option will stop and uninstall the service, and delete all registry keys. Only use this option if you are sure you want to loose all your settings. If you have a faulty installation you can use this option, but you will need to manually reconfigure all settings upon reinstallation.