utisip.wbb - Verify if the remote client address is in a list of valid addresses

Syntax

CALL "utisip.wbb",env$,iplist$,valid

Description

One method of implementing security in an Internet application is to verify that the client request appears to be coming from a valid IP address or domain. This low-level routine checks the validity and includes support for wildcards and multiple addresses.

Parameter

Description

env$

String template returned by utcgi.wbb.

iplist$

Semi-colon delimited list of valid IP addresses and/or domain names. The list may contain wildcards. For example, "192.0.0.*" would return as valid any IP address that starts with "192.0.0." Another example: "localhost; *.acme.com" would allow any "localhost" access, plus any systems in the "acme.com" domain.

valid

Returns 1 if the client address is in iplist$, or 0 if not.

Not all Web servers return a domain name, and those that can are often configured not to. However, most servers provide the client IP address.