Since OctaGate Switch acts as an intermediate, the web server will not report the correct IP address of the client - it will always report the IP address of the OctaGate Switch server. However, OctaGate stores the IP address of the caller in a custom server variable called "OGCallerIP".
Note that if you're using ASP pages, you must refer to the header as "HTTP_OGCALLERIP".
OctaGate Switch adds three headers, these are;
Server Variable | Description |
OGCALLERIP | The IP of the actual client making the request. |
OGORIGURL | Since OctaGate Switch can perform URL rewriting, it can sometimes be useful to keep track of the actual URL that the user requested. |
OGHOPCOUNT | An internal header that OctaGate Switch uses to prevent users from creating circular references between domains. |
These are the results that OctaGate Switch have created for this session;
Server Variable | Value |
Request.ServerVariables("HTTP_OGCALLERIP") | 107.178.234.158 |
Request.ServerVariables("HTTP_OGORIGURL") | www.octagate.com 80 /ogcallerip.asp |
Request.ServerVariables("HTTP_OGHOPCOUNT") | 1 |
Here's a list of all server variables that have been reported to this asp session;
Server Variable | Value |
ALL_HTTP | HTTP_CONNECTION:keep-alive HTTP_VIA:1.1 OctaGate Switch:80 HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_HOST:www.octagate.com HTTP_USER_AGENT:Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 OG/2.2.51 (IP=107.178.234.158) HTTP_UPGRADE_INSECURE_REQUESTS:1 HTTP_OGCALLERIP:107.178.234.158 HTTP_OGORIGURL:www.octagate.com 80 /ogcallerip.asp HTTP_OGHOPCOUNT:1 HTTP_X_FORWARDED_FOR:107.178.234.158 HTTP_RLNCLIENTIPADDR:107.178.234.158 |
ALL_RAW | Connection: keep-alive Via: 1.1 OctaGate Switch:80 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding: gzip, deflate Host: www.octagate.com User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 OG/2.2.51 (IP=107.178.234.158) Upgrade-Insecure-Requests: 1 OGCallerIP: 107.178.234.158 OGOrigURL: www.octagate.com 80 /ogcallerip.asp OGHopCount: 1 X-Forwarded-for: 107.178.234.158 rlnclientipaddr: 107.178.234.158 |
APPL_MD_PATH | /LM/W3SVC/2/ROOT |
APPL_PHYSICAL_PATH | C:\inetpub\OctaGate\ |
AUTH_PASSWORD | |
AUTH_TYPE | |
AUTH_USER | |
CERT_COOKIE | |
CERT_FLAGS | |
CERT_ISSUER | |
CERT_KEYSIZE | |
CERT_SECRETKEYSIZE | |
CERT_SERIALNUMBER | |
CERT_SERVER_ISSUER | |
CERT_SERVER_SUBJECT | |
CERT_SUBJECT | |
CONTENT_LENGTH | 0 |
CONTENT_TYPE | |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | off |
HTTPS_KEYSIZE | |
HTTPS_SECRETKEYSIZE | |
HTTPS_SERVER_ISSUER | |
HTTPS_SERVER_SUBJECT | |
INSTANCE_ID | 2 |
INSTANCE_META_PATH | /LM/W3SVC/2 |
LOCAL_ADDR | 127.0.0.1 |
LOGON_USER | |
PATH_INFO | /ogcallerip.asp |
PATH_TRANSLATED | C:\inetpub\OctaGate\ogcallerip.asp |
QUERY_STRING | |
REMOTE_ADDR | 127.0.0.1 |
REMOTE_HOST | 127.0.0.1 |
REMOTE_USER | |
REQUEST_METHOD | GET |
SCRIPT_NAME | /ogcallerip.asp |
SERVER_NAME | www.octagate.com |
SERVER_PORT | 8001 |
SERVER_PORT_SECURE | 0 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | Microsoft-IIS/7.0 |
URL | /ogcallerip.asp |
HTTP_CONNECTION | keep-alive |
HTTP_VIA | 1.1 OctaGate Switch:80 |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 |
HTTP_ACCEPT_ENCODING | gzip, deflate |
HTTP_HOST | www.octagate.com |
HTTP_USER_AGENT | Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 OG/2.2.51 (IP=107.178.234.158) |
HTTP_UPGRADE_INSECURE_REQUESTS | 1 |
HTTP_OGCALLERIP | 107.178.234.158 |
HTTP_OGORIGURL | www.octagate.com 80 /ogcallerip.asp |
HTTP_OGHOPCOUNT | 1 |
HTTP_X_FORWARDED_FOR | 107.178.234.158 |
HTTP_RLNCLIENTIPADDR | 107.178.234.158 |
This code from http://www.4guysfromrolla.com/, specifically http://www.4guysfromrolla.com/webtech/092298-3.shtml.
<TABLE> |