Sambar Server Documentation

Bridge Proxy Debugging


Bridge Proxy Overview
The Bridge Proxy included with the Sambar Server is a relatively simple mechanism to map TCP traffic from one network to another. See the Proxy Functionality for an overview of the Bridge Proxy functionality.

Trace Bridge
The Bridge proxy listens to traffic destined for a specified TCP port (i.e. 23) and then forward all requests to the same TCP port of the Bridge Server specified in the config.ini file. For example, to telnet from a machine on one side of the Sambar Server to a remote machine on the other side of the "firewall", you could use the Bridge Proxy to connect the session:

Trace Bridge = true
Bridge Port = 23
Act As Bridge Proxy = true
Bridge Server = dev2

With the above configuration, you would telnet to the machine on which your Sambar Server is running and it would automatically forward your request to the machine dev2. By setting the flag Trace Bridge to true the log file bridge.log will contain a trace of the bridge session. This functionality is designed to assist in debugging client/server applications.

The following is a bridge.log transcript from a bridge proxy telnet session. The session consists of logging in, listing all files on the Unix machine and then exiting the telnet session. Note: The byte count numbering along the right-hand side restarts at 000000 for each TCP/IP packet received.



[26/May/1998:13:42:13 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  FF FD 18 FF FD 1F FF FD : 23 FF FD 27 FF FD 24      .ý..ý..ý#.ý'.ý$.

[26/May/1998:13:42:13 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  FF FB 18                :                           .û..............
000000:  FF FC 1F FF FC 23 FF FC : 27 FF FC 24               .ü..ü#.ü'.ü$....

[26/May/1998:13:42:13 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  FF FE 1F FF FE 23 FF FE : 27 FF FE 24 FF FA 18 01   .þ..þ#.þ'.þ$....
000010:  FF F0                   :                           ................

[26/May/1998:13:42:13 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  FF FC 1F                :                           .ü..............
000000:  FF FC 23 FF FC 27 FF FC : 24 FF FA 18 00 41 4E 53   .ü#.ü'.ü$....ANS
000010:  49 FF F0                :                           I...............

[26/May/1998:13:42:13 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  0D 0A 0D 0A 55 4E 49 58 : 28 72 29 20 53 79 73 74   ....UNIX(r) Syst
000010:  65 6D 20 56 20 52 65 6C : 65 61 73 65 20 34 2E 30   em V Release 4.0
000020:  20 28 64 65 76 32 29 0D : 0A 0D 00 0D 0A 0D 00       (dev2).........
000000:  FF FB 01 FF FB 03 FF FD : 01 6C 6F 67 69 6E 3A 20   .û..û..ý.login: 

[26/May/1998:13:42:13 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  FF FD 01                :                           .ý..............
000000:  FF FD 03 FF FB 01       :                           .ý..û...........

[26/May/1998:13:42:14 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  FF FB 01 FF FE 01       :                           .û..þ...........

[26/May/1998:13:42:14 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  FF FC 01                :                           .ü..............
000000:  6F                      :                           o...............

[26/May/1998:13:42:15 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  6F                      :                           o...............

[26/May/1998:13:42:15 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  72                      :                           r...............

[26/May/1998:13:42:15 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  72                      :                           r...............

[26/May/1998:13:42:15 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  61                      :                           a...............

[26/May/1998:13:42:16 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  61                      :                           a...............

[26/May/1998:13:42:16 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  63                      :                           c...............

[26/May/1998:13:42:16 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  63                      :                           c...............

[26/May/1998:13:42:16 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  6C                      :                           l...............

[26/May/1998:13:42:16 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  6C                      :                           l...............

[26/May/1998:13:42:16 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  65                      :                           e...............

[26/May/1998:13:42:16 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  65                      :                           e...............

[26/May/1998:13:42:16 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  37                      :                           7...............

[26/May/1998:13:42:17 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  37                      :                           7...............

[26/May/1998:13:42:18 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  0D 0A                   :                           ................

[26/May/1998:13:42:18 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  0D 0A                   :                           ................
000000:  50 61 73 73 77 6F 72 64 : 3A 20                     Password: ......

[26/May/1998:13:42:20 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  61                      :                           a...............
000000:  0D 0A                   :                           ................

[26/May/1998:13:42:21 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  0D 0A                   :                           ................
000000:  4C 61 73 74 20 6C 6F 67 : 69 6E 3A 20 54 75 65 20   Last login: Tue 
000010:  4D 61 79 20 32 36 20 31 : 33 3A 33 34 3A 35 38 20   May 26 13:34:58 
000020:  66 72 6F 6D 20 41 4C 4C : 41 4E 2E 69 63 61 72 69   from ALLAN.icari
000030:  61 6E 2E 63 6F 0D 0A    :                           an.co...........
000000:  53 75 6E 20 4D 69 63 72 : 6F 73 79 73 74 65 6D 73   Sun Microsystems
000010:  20 49 6E 63 2E 20 20 20 : 53 75 6E 4F 53 20 35 2E    Inc.   SunOS 5.
000020:  35 2E 31 20 20 20 20 20 : 47 65 6E 65 72 69 63 20   5.1     Generic 
000030:  4D 61 79 20 31 39 39 36 : 0D 0A                     May 1996........
000000:  25 20                   :                           % ..............

[26/May/1998:13:42:23 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  6C                      :                           l...............

[26/May/1998:13:42:23 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  6C                      :                           l...............

[26/May/1998:13:42:23 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  73                      :                           s...............

[26/May/1998:13:42:23 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  73                      :                           s...............

[26/May/1998:13:42:24 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  0D 0A                   :                           ................

[26/May/1998:13:42:24 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  0D 00 0D 0A             :                           ................
000000:  74 6F 74 61 6C 20 35 38 : 20 20 20 20 20 20 20 20   total 58        
000010:  20 20 20 20 20 20 20 20 : 32 20 62 61 63 6B 75 70           2 backup
000020:  2F 20 20 20 20 20 20 20 : 20 20 20 20 20 34 20 62   /            4 b
000030:  69 6E 2F 0D 0A 20 20 20 : 32 20 64 62 73 2F 20 20   in/..   2 dbs/  
000040:  20 20 20 20 20 20 20 20 : 20 20 20 20 20 32 20 65                2 e
000050:  78 70 6F 72 74 2F 20 20 : 20 20 20 20 20 20 20 20   xport/          
000060:  20 20 32 20 6C 69 62 2F : 0D 0A 20 20 20 32 20 6C     2 lib/..   2 l
000070:  6F 63 61 6C 2E 63 73 68 : 72 63 20 20 20 20 20 20   ocal.cshrc      
000080:  20 20 32 20 6C 6F 63 61 : 6C 2E 6C 6F 67 69 6E 20     2 local.login 
000090:  20 20 20 20 20 20 20 32 : 20 6C 6F 63 61 6C 2E 70          2 local.p
0000A0:  72 6F 66 69 6C 65 0D 0A : 20 20 20 32 20 6E 65 74   rofile..   2 net
0000B0:  77 6F 72 6B 2F 20 20 20 : 20 20 20 20 20 20 20 20   work/           
0000C0:  32 20 6F 63 6F 6D 6D 6F : 6E 2F 20 20 20 20 20 20   2 ocommon/      
0000D0:  20 20 20 20 20 38 20 6F : 72 61 69 6E 73 74 2F 0D        8 orainst/.
0000E0:  0A 20 20 20 32 20 6F 74 : 72 61 63 65 2F 20 20 20   .   2 otrace/   
0000F0:  20 20 20 20 20 20 20 20 : 20 32 20 6F 77 73 2F 20            2 ows/ 
000100:  20 20 20 20 20 20 20 20 : 20 20 20 20 20 20 32 20                 2 
000110:  70 6C 73 71 6C 2F 0D 0A : 20 20 20 32 20 70 72 65   plsql/..   2 pre
000120:  63 6F 6D 70 2F 20 20 20 : 20 20 20 20 20 20 20 20   comp/           
000130:  32 20 72 64 62 6D 73 2F : 20 20 20 20 20 20 20 20   2 rdbms/        
000140:  20 20 20 20 20 32 20 73 : 6C 61 78 2F 0D 0A 20 20        2 slax/..  
000150:  20 32 20 73 71 6C 6C 69 : 62 2F 20 20 20 20 20 20    2 sqllib/      
000160:  20 20 20 20 20 20 32 20 : 73 71 6C 70 6C 75 73 2F         2 sqlplus/
000170:  20 20 20 20 20 20 20 20 : 20 20 20 32 20 73 74 61              2 sta
000180:  72 74 2E 73 71 6C 0D 0A : 20 20 20 32 20 73 74 61   rt.sql..   2 sta
000190:  72 74 5F 6F 72 61 63 6C : 65 2A 20 20 20 20 20 20   rt_oracle*      
0001A0:  32 20 73 74 6F 70 2E 73 : 71 6C 20 20 20 20 20 20   2 stop.sql      
0001B0:  20 20 20 20 20 32 20 73 : 74 6F 70 5F 6F 72 61 63        2 stop_orac
0001C0:  6C 65 2A 0D 0A 20 20 20 : 32 20 73 76 72 6D 67 72   le*..   2 svrmgr
0001D0:  2F 20 20 20 20 20 20 20 : 20 20 20 20 20 32 20 77   /            2 w
0001E0:  67 2F 0D 0A 25 20       :                           g/..% ..........

[26/May/1998:13:42:25 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  65                      :                           e...............

[26/May/1998:13:42:25 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  65                      :                           e...............

[26/May/1998:13:42:25 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  78                      :                           x...............

[26/May/1998:13:42:25 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  78                      :                           x...............

[26/May/1998:13:42:25 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  69                      :                           i...............

[26/May/1998:13:42:25 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  69                      :                           i...............

[26/May/1998:13:42:25 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  74                      :                           t...............

[26/May/1998:13:42:26 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  74                      :                           t...............

[26/May/1998:13:42:26 -0700] REQUEST 127.0.0.1 -> 10.1.2.65
000000:  0D 0A                   :                           ................

[26/May/1998:13:42:26 -0700] RESPONSE  10.1.2.65 -> 127.0.0.1
000000:  0D 00 0D 0A             :                           ................
000000:  6C 6F 67 6F 75 74 0D 0A :                           logout..........

Tracing WWW Traffic
A handy use of the Bridge Proxy is to trace HTTP traffic to debug the output of server-side scripts. By default, the port used to connect to the Bridge Server is the Bridge Port. This is inconvenient if you are attempting to trace traffic to an HTTP server running on port 80. To side-step this issue, the Bridge Server can specify both the hostname and port in the form:

Bridge Port = 80
Bridge Server = www.microsoft.com:80
Trace Bridge = true

With the above configuration, you can set your Browser to connect via proxy and configure the proxy manually to localhost:8080. Then request the page http://www.microsoft.com/ and the requests be serviced by the Bridge Proxy and logged.

© 1998-1999 Sambar Technologies. All rights reserved. Terms of Use.