home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / sockd.zip / install.doc < prev    next >
Text File  |  1998-02-21  |  38KB  |  1,017 lines

  1.  
  2.               TCP/IP SockD server for OS/2
  3.               ____________________________
  4.  
  5.  
  6. SOCKD DESCRIPTION
  7. _________________
  8.  
  9.  The multi-threaded socks server for OS/2 enables to build a
  10. firewall  gateway on an OS/2 (Warp) system. The objective is
  11. just to interconnect small TCP/IP PC  Lan  with  the  public
  12. network (through a "Service Provider").
  13.  
  14.   Like  in  all  "standard"  sockd server, the protection is
  15. build in a configuration file (sockd.cfg in the  ETC  direc-
  16. tory).
  17.  
  18.   Access  is  controlled with two statements "deny" or "per-
  19. mit".  Origin address and subnet mask  and  destination  ad-
  20. dress  and  mask  can  be  checked  for  a  destination port
  21. number...
  22.  
  23. For applications using socks version 4 protocol the support
  24.  is only for TCP application due to the protocol stack.
  25.  
  26.  The current version has  support  for  three  LAN  adapters
  27. (LAN0,  LAN1  and  LAN2), and two SLIP or PPP adapters (sl0,
  28. sl1, ppp0 and ppp1).  One of the "serial"  adapters  can  be
  29. configured  in  "auto-dial"  to  give access to the Internet
  30. through a "network" provider.
  31.  
  32.  The current version supports SOCKS Version 4  and  5.    In
  33. SOCKS   version  5,  only  NO  AUTHENTICATION  REQUIRED  and
  34. USERNAME/PASSWORD authentication methods are supported.  The
  35. GSSAPI support is NOT implemented.
  36.  
  37.  In V5 only support for IP V4 addresses is provided not V6.
  38.  DNS names are evidendly supported.
  39.  
  40.   To  be used, a correct support of the TCP/IP names must be
  41. implemented in
  42.  the way the "client" stations can convert external names in
  43. IP addresses.
  44.  This restriction can be modified with SOCKS Version 5 where
  45. DNS names have
  46.  to be resolved only on the SOCKD station.
  47.  
  48.  To provide the correct "names" support in Socks V4, we  use
  49. the DNS kit of TCP/IP V2.0
  50.  on  the  same  workstation  as  "sockD".  In  this way this
  51. "nameD" server can provide
  52.  caching mechanism to the external (and internal) name serv-
  53. ers.
  54.  We used also the DDNS kit of Warp Server in a similar  con-
  55. figuration.
  56.  
  57.  In Socks V5, only a resolv file pointing to a "public" name
  58. server  and  an "hosts" file to traduce "internal" names are
  59. required. The usage of a real "caching" name server  is  NOT
  60. mandatory.  The  customization of the "SockD" server is eas-
  61. ier.
  62.  
  63. The support of UDP associated of V5 is a little bit modified
  64. to add support for a "remote" ping command when the destina-
  65. tion  port  is "1".  In this case sockd opens a "raw" socket
  66. with protocol "icmp" to ping the external host and  communi-
  67. cates with the standard UDP Associated protocol to the "cli-
  68. ent" host.
  69.  
  70.  
  71.  
  72. AUTO-DIAL FACILITY.
  73. ___________________
  74.  
  75. You  need to customize first the access to your network pro-
  76. vider.
  77.  
  78. SockD was only tested with IBM Global Network. When the  ac-
  79. cess is working with the "dialer.exe", you have to customize
  80. two  "cmd" files one to get the access and the second one to
  81. close it.
  82.  
  83. This facility is only supported on  one  adapter  sl0,  sl1,
  84. ppp0 or ppp1.  It was only tested on sl0.
  85.  
  86. To  check if the connection is OK, sockd uses the "flags" of
  87. the   adapter   status.   When   the    sl0    adapter    is
  88. "<UP,POINTTOPOINT>",     the     flags    are    "811"    or
  89. "<UP,POINTTOPOINT,RUNNING>" ("851")...
  90.  
  91. Sockd reads normally a sockd.cfg and sockd.rte files in  the
  92. ETC  directory.  These files are the socks configuration. In
  93. auto-dial mode, sockd tries to build an "automatic"  config.
  94. It should be OK for the first tests.  If you want to look at
  95. this  default  config,  you  have just to read the sockd.log
  96. file (in the sockd directory) after stopping sockd.
  97.  
  98. By  sample  I  used  this  sockdial.cmd  whith   a   correct
  99. userid/password and account to start the connection.
  100.  
  101.   /************************************************/
  102.   /*                                              */
  103.   /* sockdial.cmd :  to start the slip connection */
  104.   /*                                              */
  105.   /************************************************/
  106.   'start dialer account userid password -d'
  107.  
  108. And  this sockclos.cmd to stop the connection after the "de-
  109. lay" without session is expired.
  110.  
  111.   /***********************************************/
  112.   /*                                             */
  113.   /* sockclos.cmd :  to stop the slip connection */
  114.   /*                                             */
  115.   /***********************************************/
  116.   'dialer -c'
  117.  
  118. These two cmd MUST be put in  a  subdirectory  in  the  PATH
  119. statement (I used \TCPIP\BIN).
  120.  
  121. Evidendly  you  have  to  enable  the  "auto-dial"  function
  122. through the "dial-up" option of the "config" menu (and setup
  123. your command names and the "delay" time). Then you  have  to
  124. stop/start sockd.
  125.  
  126. An  other  method consists in starting directly sockd with a
  127. parameter:
  128.  
  129.     start sockd -dsl0
  130.  
  131.     where:  sl0  is the auto-dial adapter
  132.  
  133. In  this case you have to keep the default for other parame-
  134. ters:  "sockdial.cmd", "sockclos.cmd" and 5 minutes  of  de-
  135. lay.
  136.  
  137. The delay time should be shorter than the "delay" set in the
  138. "dialer" configuration to keep the control of the connection
  139. in "sockd".
  140.  
  141.  
  142. SOCKD.CFG
  143. _________
  144.  
  145.  The configuration files are saved in the ETC directory.
  146.  
  147.   deny   0.0.0.0 0.0.0.0 9.0.0.0 255.0.0.0 gt 0
  148.   permit 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 ge 1024
  149.   permit 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 eq 21
  150.   permit 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 eq 20
  151.   permit *=PhilG,Test 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 eq 23
  152.   permit 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 eq 70
  153.   permit 9.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 eq 80
  154.  
  155.   A  list of userids can be used in addition of IP addresses
  156. on the "permit" statement.  They  are  case  sensitive.  The
  157. value  sent  from  the OS/2 Warp station comes from the USER
  158. variable set in the "config.sys" in SOCKS V4.
  159.  
  160.  On the time being no checking of  "password"  is  performed
  161. (through identd).
  162.  
  163. In   SOCKS   V5,   the   userid   used   in  userid/password
  164. authentication is checked with the userid list in the permit
  165. statement if *= field is set.
  166.  
  167.  Good practice specifies a first statement to denies all ex-
  168. ternal accesses to your "private" network (all ports) with:
  169.  
  170.  "deny 0.0.0.0 0.0.0.0 nnn.nnn.nnn.nnn mmm.mmm.mmm.mmm gt 0"
  171.  where nnn is your network number and mmm the mask.
  172.  
  173.  then you can permit all stations from your network  to  ac-
  174. cess all TCP applications through the socks gateway with:
  175.  
  176. "permit  nnn.nnn.nnn.nnn  mmm.mmm.mmm.mmm 0.0.0.0 0.0.0.0 gt
  177. 0"
  178.  
  179. "proxy" statements can be added if you require to  intercon-
  180. nect sockd servers. The syntax is like :
  181.  
  182. "proxy   IP_addr   port_nb  subnet_nb  subnet_mask auth comp
  183. encr name [site_certificate] "
  184. Where :
  185.   IP_addr is the IP address of next proxy server
  186.   port_nb is the port number (1080 by default) of this proxy
  187. server
  188.   subnet_nb is the destination subnet number we  can  access
  189. through this proxyu
  190.   subnet_mask the destination subnet mask
  191.   auth     Y_or_N     use    local_node_name/node_name    as
  192. userid/password authentication
  193.   comp Y_or_N compress data frames on this proxy connection
  194.   encr Y_or_N encrypt data frames on this proxy connection
  195.   name remote node name (used  as  password  in  userid/pswd
  196. authentication)
  197.   site_certificate  a  pgp  public key ring where we can get
  198. the key for node name
  199.  
  200.  
  201.  
  202. SOCKD.PRO
  203. _________
  204.  
  205.   SOCKD  uses also a profile file (sockd.pro) in the ETC di-
  206. rectory to save the number of sessions set, server port  nb,
  207. the window position, the level of logging used ("Full", "all
  208. Sessions",  "only  errors and sessions refused (Minimum)" or
  209. "No logging") and the font used on main window.
  210.  
  211.  In the second line of this file, we have  the  "auto  dial"
  212. parameters:
  213.  is  this  facility  enabled (Y or N), the dial command, the
  214. hangup command,
  215.  and the "short hold mode" delay.
  216.  
  217.  In addition a "TCP" time-out and a "UDP" time-out (in  sec-
  218. onds) are
  219.  also set. These permit to "tune" the delay sockd is waiting
  220. for the next
  221.  transaction before considering the session is lost.
  222.  If these parameters are too short sockd is cutting the ses-
  223. sion during a
  224.  normal  "wait"  time.  If  they are too long, some "client"
  225. threads can be
  226.  blocked and are not available for "new" sessions.
  227.  
  228.  The defaults are respectively 20 minutes  for  TCP  and  50
  229. seconds for UDP
  230.  applications. TCP is really using a "session". In UDP there
  231. is no real
  232.  session.  The communication is never really closed. The UDP
  233. time-out is used
  234.  to standardly close this communication.  SockD  was  tested
  235. with Real-Audio
  236.  UDP  application  and archie as UDP associate applications.
  237. The default of
  238.  50 seconds was enough  to  use  both  applications  with  a
  239. dial-up connection.
  240.  The default of 20 minutes for TCP applications was set big-
  241. ger than the
  242.  standard  FTP  time-out  (15 minutes). It is NOT enough for
  243. "permanent"
  244.  telnet sessions.
  245.  
  246. A third line contains info on log archiving : yes or no, de-
  247. lay in hours or days, delay value, maximum number  of  files
  248. to  archive.  The fifth parm in this line permits to support
  249. only socks V5 userid/password authentication if a userid  is
  250. set  on a permit statement. In Socks V4 there is no password
  251. checking.  Normally sockd is giving the same process  to  V4
  252. as V5. Enabling this option obliges to use a password in ad-
  253. dition to the userid.
  254.  
  255. A fourth line can be added with the local node name. If this
  256. parameter   exists   it   can   be   used   for  a  sort  of
  257. userid/password checking on proxy connections. The  name  is
  258. case  sensitive  with a maximal length of 128 characters. No
  259. space,  new  line  or  carriage return can be used in it.  A
  260. second parameter can be set as a PGP certificate file  name.
  261. When  encryption should be supported we 'll find the private
  262. key in it corresponding to the local node name as userid.
  263.  
  264.  This file is created automatically by sockd.exe but you can
  265. complete it through the "profile" menu option.
  266.  
  267.  
  268.  
  269.  
  270. SOCKD.RTE
  271. _________
  272.  
  273.   Another  configuration  file  (sockd.rte)  is required for
  274. SOCKS_BIND in  the  ETC  directory  describing  the  gateway
  275. adapters  and  IP addresses.   Most of the applications (Web
  276. Explorer, Rtelnet, ...) use only SOCKS_CONNECT.  That's  the
  277. reason  why  I  put "sockd.rte" as optional....   But if you
  278. want to use Rftp you need the SOCKS_BIND  support  and  then
  279. sockd.rte.
  280.  
  281.  It is a list of the local adapter addresses and the neworks
  282. you can reach through these... These definitions are used in
  283. sequence  for  testing an address.   Thus it seems better to
  284. put the more restrictive definitions first (describing  pri-
  285. vate  network  access)  and  the  "public  network"  adapter
  286. finally (giving access to world).
  287.  
  288.  By sample :
  289.  
  290.   9.36.69.41    9.36.69.32 255.255.255.224
  291.   9.132.89.238  0.0.0.0    0.0.0.0
  292.  
  293. If you plan to use the auto-dial facility avoid to set rout-
  294. ing for the dial-up adapter. If  no  route  file  is  found,
  295. sockd  builds  one  with  your LAN adapters giving access to
  296. their local subnets and put a last  dynamic  entry  for  the
  297. switched adapter giving access to world (0.0.0.0).
  298.  
  299. You  can want to have other subnets accessible through fixed
  300. (LAN) adapters.  For that you must define a sockd.rte with a
  301. line per subnet and setting in first parameter the local  IP
  302. address  giving  access  to  it. Sockd 'll add dynamically a
  303. last entry for the switched adapter giving access to 0.0.0.0
  304.  
  305.  By sample :
  306.  
  307.   9.36.71.9     9.36.71.0   255.255.255.0
  308.   9.132.89.238  9.0.0.0     255.0.0.0
  309.   9.132.89.238  198.74.69.0 255.255.255.0
  310.  
  311.  
  312. SOCKD.USR
  313. _________
  314.  
  315. This  file  is  in  the  ETC directory   for Socks version 5
  316. userid/password authentication.  On the time being,  no  en-
  317. cryption  technic  is  used on this confidential dataset.  A
  318. userid as a password can theoretically use 256 characters. I
  319. think in our test implementation it is limited to  255  (due
  320. to the end of string character).
  321.  
  322.  By sample :
  323.  
  324.   userid01 password01
  325.   userid02 password02
  326.  
  327.  
  328. UTILISATION:
  329. ____________
  330.  
  331.   Start  sockd  without  any parameter or with some of these
  332. options:
  333.  
  334. ⌐   "-c" option: The number of concurrent clients is  32  by
  335.     default.    It can be changed at startup with the -c pa-
  336.     rameter or by modifying the sockd.pro profile file  with
  337.     the  menu option.  By sample :"sockd -c64" to support 64
  338.     simultaneous clients. Note there is NO space between  -c
  339.     and  the value. This number should be between 8 and 255.
  340.     Each client uses one thread (in  addition  to  the  base
  341.     sockd thread).
  342.  
  343. ⌐   "-l"  option: to suppress logging (sockd.log file in the
  344.     current directory)
  345.  
  346. ⌐   "-i" option: to start iconized .
  347.  
  348. ⌐   "-d" option: to setup an auto-dial  adapter,  by  sample
  349.     "-dsl0".
  350.  
  351. ⌐   "-p"  option:  by  default sockd uses the port 1080. You
  352.     can change it starting "sockd -p2080" by sample.
  353.  
  354.  If you want to use more than one option, specify  different
  355. parameters:  "start sockd -c48 -p2080 -i".
  356.  
  357.   The  frame  forwarding  MUST be disabled (with the "ipgate
  358. off" command or through MPTS customization) to  protect  the
  359. access to your "internal" network.
  360.  
  361.   The  "socks" support is required to run (and use) applica-
  362. tions through gateway.  (see SOCKS FORUM) or a  Web  Browser
  363. with "socks" support (like Web Explorer for
  364.  OS/2).
  365.  
  366. SOCKD MENU
  367. __________
  368.  
  369. ⌐   "Config": create, modify or simply check your configura-
  370.     tion
  371.  
  372.  
  373.     ₧   "edit":  to  create  or  modify  "line  by line" the
  374.         sockd.cfg in ETC directory
  375.  
  376.     ₧   "proxy": to define proxy  servers  and  the  subnets
  377.         they are giving access.
  378.  
  379.     ₧   "view":  to  review  the configuration in memory and
  380.         eventualy change it
  381.               with the standard  MLE  (Multiple  Line  Entry
  382.         field) keyboard manipulation.
  383.               (select  text with mouse button 1 or Shift key
  384.         and move the cursor,
  385.               then   cut,   copy   and   paste   text   with
  386.         Ctrl+Delete, Shift+Delete and Shift+Insert)
  387.  
  388.     ₧   "profile":  to  change the maximum number of concur-
  389.         rent sessions,
  390.               the server port number or the logging level.
  391.  
  392.     ₧   "route": to configure the sockd.rte file in ETC  di-
  393.         rectory.
  394.  
  395.     ₧   "save  conf":  to  save the sockd.cfg from memory to
  396.         ETC directory
  397.  
  398.     ₧   "userid":    for    Socks     V5     Userid/Password
  399.         authentication method
  400.  
  401.     ₧   "dial-up": to customize auto-dial facility
  402.  
  403.     ₧   "font": to select the font used in the main window.
  404.  
  405. ⌐   "reset": If you want to activate a change, a new profile
  406.     or config
  407.  
  408.     ₧   "server": to stop/restart the server
  409.  
  410.     ₧   "log  file":  to clean the log file when reports are
  411.         too long.
  412.  
  413. ⌐   "Report":
  414.  
  415.  
  416.     ₧   "accepted":  to  check  all  sessions  through  this
  417.         server
  418.  
  419.     ₧   "denied":  to  check  all  demands  rejected  by the
  420.         server.
  421.  
  422.     ₧   "connect": to read the dial-up  connection  time  in
  423.         auto-dial mode.
  424.  
  425. ⌐   "Help": to read this help file.
  426.  
  427. ⌐   "Exit": to save the "profile" file and exit.
  428.  
  429.  
  430.  
  431. DNS SUPPORT
  432. ___________
  433.  
  434. HOW TO SETUP A NAME SERVER
  435. __________________________
  436.  
  437.   To  solve the V4 "name" problem, I put the DNS kit (at CSD
  438. UN60004 level) on the PS/VP. This name server should be cus-
  439. tomized with caching to the external name server(s)  and  to
  440. internal  domain  name server.   On the "client" station the
  441. resolv2 file points to the socks gateway address as the name
  442. server (the DNS running on the sockd station can be the only
  443. name server on this small subnet).
  444.  
  445.  Here after the configuration files used during  our  tests,
  446. where:
  447.  
  448. ⌐    Where test.benelux.ibm.com (9.36.71.0) is the 'private'
  449.     domain
  450.  
  451. ⌐     ztmaixn1.benelux.ibm.com  (9.132.56.2) is the external
  452.     name server for the
  453.       ibm.com domain and ns01.ny.us.ibm.net (165.87.194.244)
  454.     is the external
  455.       DNS server.
  456.  
  457. ⌐     The  socks  gateway  is  using  9.132.89.238  on   the
  458.     "ibm.com" adapter and
  459.      9.36.71.9 on the "secure" side (philg.benelux.ibm.com).
  460.  
  461. ⌐    Tests were performed from testuser.test.benelux.ibm.com
  462.     (9.36.71.10).
  463.  
  464. ⌐   All  "external"  sessions were performed through the sl0
  465.     adapter and a connection to IBM Global Network as  "Ser-
  466.     vice" provider.
  467.  
  468. In  fact,  on  a  small  LAN with just a few PCs connected a
  469. "hosts" file must be enough to succeed with  DNS  conversion
  470. in Socks V5.
  471.  
  472.   hosts file in ETC directory
  473.  
  474.   9.132.89.238      bedb238.benelux.ibm.com
  475.   9.36.71.9         bedb238.philg.benelux.ibm.com
  476.   9.36.71.10        testuser.philg.benelux.ibm.com
  477.   165.87.194.244    ns01.ny.us.ibm.net
  478.   128.123.35.151    hobbes.nmsu.edu
  479.   206.101.97.101    www.lycos.com
  480.   205.216.146.70    www.yahoo.com
  481.  
  482. In Socks V4, you can perform the first sockd tests just with
  483. a similar hosts file. But quickly, you should be blocked and
  484. due  to  the  protocol you need to start a "named" server on
  485. your sockd gateway. You need then a "resolv2" file  on  your
  486. LAN attached PC pointing to your named server.
  487.  
  488. In  any case keep also an "hosts" file on your sockd PC, be-
  489. cause the code uses a "gethostbyaddr()"  macro  to  get  the
  490. "hostname"  of  the workstation.  Sometimes the named server
  491. doesn't answer and you have to start sockd before named. You
  492. need then the "hosts" file to get a name.
  493.  
  494.  
  495. DNS KIT OF TCP/IP V2
  496. ____________________
  497.  
  498. named.bt
  499. ________
  500.  
  501.   ;
  502.   ; NAMED.BT file for name server configuration.
  503.   ;
  504.   ; type       domain                      source file or host
  505.   ;
  506.   domain   philg.benelux.ibm.com
  507.   cache    .                          d&colon.\\tcpip\\etc\\namedb\\named.ca
  508.   primary  philg.benelux.ibm.com      d&colon.\\tcpip\\etc\\namedb\\named.dom
  509.   primary  71.36.9.in-addr.arpa       d&colon.\\tcpip\\etc\\namedb\\named.rev
  510.   ;
  511.   ;
  512.   domain   benelux.ibm.com
  513.   primary  ztmaixn1.benelux.ibm.com  9.132.56.2
  514.   primary  9.in-addr.arpa            9.132.56.2
  515.   ;
  516.   domain   ibm.net
  517.   primary  ns01.ny.us.ibm.net        165.87.194.244
  518.   primary  .in-addr.arpa             165.87.194.244
  519.   ;
  520.  
  521. named.ca
  522. ________
  523.   ;
  524.   ; define parent(root) domain nameserver (Note trailing dot)
  525.   ;
  526.   philg.benelux.ibm.com.        99999999  IN  NS  bedb238.benelux.ibm.com.
  527.   71.36.9.in-addr.arpa.         99999999  IN  NS  bedb238.benelux.ibm.com.
  528.   benelux.ibm.com.              99999999  IN  NS  ztmaixn1.benelux.ibm.com.
  529.   ibm.com.                      99999999  IN  NS  ztmaixn1.benelux.ibm.com.
  530.   9.                            99999999  IN  NS  ztmaixn1.benelux.ibm.com.
  531.   9.in-addr.arpa.               99999999  IN  NS  ztmaixn1.benelux.ibm.com.
  532.   in-addr.arpa.                 99999999  IN  NS  ns01.ny.us.net.com.
  533.   ;
  534.   ; address of domain nameservers
  535.   ;
  536.   bedb238.philg.benelux.ibm.com.  99999999  IN  A   9.36.71.9
  537.   bedb238.benelux.ibm.com.        99999999  IN  A   9.132.89.238
  538.   ztmaixn1.benelux.ibm.com.       99999999  IN  A   9.132.56.2
  539.   beda002.benelux.ibm.com.        99999999  IN  A   9.132.88.2
  540.   ns01.ny.us.net.com.             99999999  IN  A   165.87.194.244
  541.   ;
  542.  
  543. Where  ns01.ny.us.net.com is the name server of the Internet
  544. provider...
  545.  
  546.  
  547. named.dom
  548. _________
  549.  
  550.   ;
  551.   ;********************************
  552.   ;*  Start of Authority Records  *
  553.   ;********************************
  554.   ;
  555.   @ IN SOA  bedb238.philg.benelux.ibm.com.   (
  556.           93052601 ; Serial number for this data (yymmdd##)
  557.           86400    ; Refresh value for secondary name servers
  558.           300      ; Retry value for secondary name servers
  559.           864000   ; Expire value for secondary name servers
  560.           3600 )   ; Minimum TTL value
  561.   ;
  562.   @      IN  NS   bedb238.philg.benelux.ibm.com.
  563.   ibm.com.   IN  NS   bedb238.philg.benelux.ibm.com.
  564.   ibm.com.   IN  NS   ztmaixn1.benelux.ibm.com.
  565.   com.   IN  NS   bedb238.philg.benelux.ibm.com.
  566.   com.   IN  NS   ns01.ny.us.ibm.net
  567.   edu.   IN  NS   ns01.ny.us.ibm.net
  568.   be.    IN  NS   ns01.ny.us.ibm.net
  569.   ;
  570.   ;********************************
  571.   ;*  Domain Address Information  *
  572.   ;********************************
  573.   ;
  574.   bedb238                    86400  IN  A      9.36.71.9
  575.                                     IN  HINFO  IBM-PS/2 OS/2 3.0
  576.   ;
  577.   testuser                   86400  IN  A      9.36.71.10
  578.                                     IN  HINFO  IBM-PS/2 OS/2 3.0
  579.   ;
  580.   bedb238.benelux.ibm.com.   86400  IN  A      9.132.89.238
  581.   bedb237.benelux.ibm.com.   86400  IN  A      9.132.89.237
  582.   ns01.ny.us.ibm.net         86400  IN  A      165.87.194.244
  583.   ztmaixn1.benelux.ibm.com   86400  IN  A      9.132.56.2
  584.   w3.almaden.ibm.com.        86400  IN  A      129.33.24.62
  585.   w3.pe.au.ibm.com.          86400  IN  A      9.8.32.2
  586.   w3.austin.ibm.com.         86400  IN  A      9.3.246.8
  587.   w3.bocaraton.ibm.com.      86400  IN  A      9.83.4.179
  588.   w3.portsmouth.uk.ibm.com.  86400  IN  A      9.180.145.185
  589.   w3.hursley.ibm.com.        86400  IN  A      9.20.2.34
  590.   w3.issc.ibm.com.           86400  IN  A      9.242.89.217
  591.   isscw3.raleigh.ibm.com.    86400  IN  A      9.67.1.114
  592.   w3nhd.raleigh.ibm.com.     86400  IN  A      9.67.195.102
  593.   netstd.raleigh.ibm.com.    86400  IN  A      9.67.1.114
  594.   w3.raleigh.ibm.com.        86400  IN  A      9.67.4.22
  595.   www.tcp.raleigh.ibm.com.   86400  IN  A      9.67.106.6
  596.   www.lycos.com.             86400  IN  A      206.101.97.101
  597.   www.yahoo.com.             86400  IN  A      205.216.146.70
  598.  
  599. The  translation  of  www.lycos.com,  www.yahoo.com, ... Are
  600. there to have a method to start a dial-up connection without
  601. the external DNS server.   These name translations  are  re-
  602. quired for Socks V4 auto-dial process...
  603.  
  604. You must setup there the addresses of the WWW servers set in
  605. the  quicklist  of  the end-users connected on the local LAN
  606. while Web explorer is not supporting V5.
  607.  
  608.  
  609. named.rev
  610. _________
  611.  
  612.   ;
  613.   ;********************************
  614.   ;*  Start of Authority Records  *
  615.   ;********************************
  616.   ;
  617.   71.36.9.in-addr.arpa. IN  SOA   bedb238.philg.benelux.ibm.com. (
  618.           93052601 ; Serial number for this data (yymmdd##)
  619.           86400    ; Refresh value for secondary name servers
  620.           300      ; Retry value for secondary name servers
  621.           864000   ; Expire value for secondary name servers
  622.           3600 )   ; Minimum TTL value
  623.  
  624.   71.36.9.in-addr.arpa.  IN  NS   bedb238.philg.benelux.ibm.com.
  625.   ;
  626.   9              IN  PTR   bedb238.philg.benelux.ibm.com.
  627.   10             IN  PTR   testuser.philg.benelux.ibm.com.
  628.   237.89.132.9.in-addr.arpa.  IN  PTR   bedb237.benelux.ibm.com.
  629.   238.89.132.9.in-addr.arpa.  IN  PTR   bedb238.benelux.ibm.com.
  630.   101.97.101.206.in-addr.arpa.  IN  PTR  www.lycos.com.
  631.   70.146.216.205.in-addr.arpa.  IN  PTR  www.yahoo.com.
  632.  
  633. The  translation  of  bedb238.benelux.ibm.com is required to
  634. start  sockd  when  the  name  server  is  running,  because
  635. 9.132.89.238 is the IP address of the "lan0" adapter.
  636. SockD uses a "gethostbyaddr()" macro to get the host-name of
  637. the  system  where it is running. If the name server can not
  638. give it, sockd is blocked during start-up...
  639.  
  640.  
  641. DDNS KIT OF WARP SERVER
  642. _______________________
  643.  
  644. In the \MPTN\ETC\NAMEDB  directory  we  used  the  following
  645. config files.
  646.  
  647.  
  648. named.bt
  649. ________
  650.  
  651.   ;
  652.   ; NAMED.BT file for name server configuration.
  653.   ;
  654.   ; type       domain                  source file or host
  655.   ;
  656.   domain   philg.benelux.ibm.com
  657.   primary  philg.benelux.ibm.com c&colon.\\mptn\\etc\\namedb\\named.dom presecured nokeytosec
  658.   primary  71.36.9.in-addr.arpa  c&colon.\\mptn\\etc\\namedb\\named.rev presecured nokeytosec
  659.   ;
  660.   ;
  661.   cache    .              c&colon.\\mptn\\etc\\namedb\\named.ca  presecured nokeytosec
  662.   ;
  663.  
  664. named.dom
  665. _________
  666.  
  667.   ;
  668.   ;********************************
  669.   ;*  Start of Authority Records  *
  670.   ;********************************
  671.   ;
  672.   @   IN  SOA        bedb238.philg.benelux.ibm.com. (
  673.           96090101 ; Serial number for this data (yymmdd##)
  674.           86400    ; Refresh value for secondary name servers
  675.           300      ; Retry value for secondary name servers
  676.           864000   ; Expire value for secondary name servers
  677.           3600 )   ; Minimum TTL value
  678.   ;
  679.   @      IN  NS   bedb238.philg.benelux.ibm.com.
  680.   ;
  681.   ;********************************
  682.   ;*  Domain Address Information  *
  683.   ;********************************
  684.   ;
  685.   bedb238                    86400  IN  A      9.36.71.9
  686.                                     IN  HINFO  IBM-PS/2 OS/2 3.0
  687.   ;
  688.   testuser                   86400  IN  A      9.36.71.10
  689.                                     IN  HINFO  IBM-PS/2 OS/2 3.0
  690.   ;
  691.   ns01.ny.us.ibm.net         86400  IN  A      165.87.194.244
  692.   www.lycos.com.             86400  IN  A      206.101.97.101
  693.   www.yahoo.com.             86400  IN  A      205.216.146.70
  694.  
  695. named.rev
  696. _________
  697.   ;
  698.   ;********************************
  699.   ;*  Start of Authority Records  *
  700.   ;********************************
  701.   ;
  702.   71.36.9.in-addr.arpa. IN  SOA  bedb238.philg.benelux.ibm.com. (
  703.           93052601 ; Serial number for this data (yymmdd##)
  704.           86400    ; Refresh value for secondary name servers
  705.           300      ; Retry value for secondary name servers
  706.           864000   ; Expire value for secondary name servers
  707.           3600 )   ; Minimum TTL value
  708.  
  709.   71.36.9.in-addr.arpa.  IN  NS   bedb238.philg.benelux.ibm.com.
  710.   ;
  711.   9.71.36.9.in-addr.arpa.       IN  PTR   bedb238.philg.benelux.ibm.com.
  712.   10.71.36.9.in-addr.arpa.      IN  PTR   testuser.philg.benelux.ibm.com.
  713.   101.97.101.206.in-addr.arpa.  IN  PTR   www.lycos.com.
  714.   70.146.216.205.in-addr.arpa.  IN  PTR   www.yahoo.com.
  715.  
  716. named.ca
  717. ________
  718.  
  719.   ;
  720.   ; define parent(root) domain nameserver (Note trailing dot)
  721.   ;
  722.   in-addr.arpa.           99999999  IN  NS  ns01.ny.us.net.com.
  723.   ;
  724.   ; address of domain nameservers
  725.   ;
  726.   ns01.ny.us.net.com.     99999999  IN  A   165.87.194.244
  727.   ;
  728.  
  729. RESOLV2 ON SOCKD SERVER
  730. _______________________
  731.  
  732.   domain philg.benelux.ibm.com
  733.   nameserver 9.36.71.9
  734.  
  735. RESOLV ON SOCKD SERVER
  736. ______________________
  737.  
  738.   domain philg.benelux.ibm.com
  739.   nameserver 9.36.71.9
  740.  
  741.  
  742. RESOLV2 ON END-USER WORKSTATION
  743. _______________________________
  744.  
  745.   domain philg.benelux.ibm.com
  746.   nameserver 9.36.71.9
  747.  
  748. TEST CONFIGURATION
  749. __________________
  750.  
  751.                    ----
  752.               ----     ---
  753.           ----            ----
  754.       ----    Internet        --
  755.          ----                    -
  756.              ------ IBM IGN   --
  757.                   ---*-------
  758.                      *
  759.                      *
  760.                   *******                     testuser
  761.                    *   *  Modem              ----------
  762.                     * *   Dial-up            *Thinkpad*
  763.                      *                       ----*-----
  764.         * *          *                           *
  765.       *     *  ------*------    Ethernet         *9.36.71.10
  766.      * T-R   *** PS/VP     *---------------------*---
  767.       *     *  * bebd238   *9.36.71.9
  768.         * *    -------------
  769.            9.132.89.238
  770.    ibm.com                          philg.benelux.ibm.com
  771.    9.0.0.0                             9.36.71.0
  772.  
  773. With a correct setup, it is possible to use Internal servers
  774. (ibm.com)  without  dialing  from "testuser". If an external
  775. server is used (by sample www.yahoo.com)  the  auto-dial  is
  776. automaticcally used.
  777.  
  778. The choice is done through "sockd.rte" configuration. By de-
  779. fault  sockd  gives only access to the "local" subnet on the
  780. LAN adapter (9.132.88.0).
  781.  
  782.  
  783. PROXY  SUPPORT
  784. ______________
  785.  
  786.   A  "proxy" socks suppot is implemented. To use it you need
  787. to know the IP address of the next sockd for OS/2 server and
  788. the subnets you can access through this remote node.
  789.  
  790.  From a LAN connected to Internet in "auto-dial" mode it  is
  791. possible  to access servers located on an other LAN attached
  792. to Internet through a sockd using a fixed IP address (mainly
  793. with a leased line).
  794.  
  795.  You must "permit" the access on both  sockd  servers.  Only
  796. the  dial-up  sockd has to define the "leased line attached"
  797. sockd with a "proxy" statement.
  798.  
  799. To setup proxy connections you must configure the connection
  800. on the remote site (the site where the user's  sessions  are
  801. started  pointing  to  "central"  servers). This site can
  802. use an auto-dial sockd.  You must define a "fixed"  IP
  803. address  for  the "central" site, but on the "central" sockd
  804. no definition is required (except the permit statements)  to
  805. accept remote proxies.
  806.  
  807. In  this  way the Internet can be used to transport data be-
  808. tween distributed offices. You need a  different  subnet  in
  809. each  location (it  can be a "reusable" nework address) and
  810. then you have to build the "routing" with proxy statements.
  811.  
  812. If you want a light  authentication  to  validate  the  con-
  813. nection,  you can setup a local node name in each sockd pro-
  814. file, then you must give the correct name in the proxy setup
  815. on the remote site.   The connection  between  proxies  uses
  816. socks  V5  protocols and  then  we can use the node names as
  817. userid/password for authentication.
  818.  
  819.  The use of PGP certificates is required to support encryption.
  820. An "authentication" frame is sent before a socks command and connection
  821. initialization. This packet is set with local and remote node names
  822. (found as userids in PGP certificates) and a 128 bits key. If the
  823. signature is accepted all TCP data packets are encrypted. A 128 bits
  824. key is calculated and changed for each socket connection... Encryption
  825. is required for all sessions if you enable this support in the profile.
  826. Only TCP sessions are encrypted. The UDP Associate sessions are NOT encrypted
  827. or compressed.
  828.  
  829. In the current version of SockD the node names are limited to 128 characters.
  830. The node names can contain spaces or any special characters. They are case
  831. sensitive. No hexa 0 value can be used. It can be a small sentence.
  832. For encryption support sockd uses the PGP userids exactly as written in the
  833. PGP certificates. That's why I set a button to read these userids from
  834. the PGP certificate given by its file name in the proxy or profile setup window.
  835.  
  836.  To succeed with proxy encryption you must specify the corresponding PGP
  837. certificate in the proxy statement of the remote sockd and in the profile
  838. of the local sockd, thus the private certificate on one site and the public
  839. on the other site. You must distribute the "public" certificates to the
  840. remote sites...
  841.  
  842.  A first step consists in generating the pair of private and public
  843. certificates with PGP and to rename secring.pgp and pubring.pgp to (by sample)
  844. thinkpad.sec and thinkpad.pub or gateway.sec and gateway.pub.
  845. After you can copy these files in the sockd directory locally(.sec) and
  846. remotely (.pub).
  847.  
  848.  Only "Connect" and "Bind" sessions are encrypted.
  849. The UDP Associate sessions are NOT encrypted or compressed.
  850. An option exists to define the proxy support only for encrypted sessions
  851. requiring always the encrypted authentication ("encrypted sessions only").
  852. This method permits a more secure socks server.
  853.  
  854. To  test the proxy support I used my travelling thinkpad and
  855. defined as proxy a fixed desktop PC giving access to  Inter-
  856. net through a dial-up connection. Both PCs were connected to
  857. our  intranet  LAN.    I defined locally in the socks config
  858. file the address 127.0.0.1 (the  loopback  adapter)  as  the
  859. socks gateway. When sockd was started on the thinkpad it re-
  860. routed all sessions to the proxy giving access to 0.0.0.0...
  861.  
  862. The configuration files used :
  863.  
  864. sockd.pro
  865. _________
  866.  
  867.   32 1080 380 270 400 300 win F Tms Rmn
  868.   N sl0 sockdial.cmd sockclos.cmd 300 1200 50
  869.   N D 1 7 N
  870.   My_travelling_Thinkpad pubring.pgp
  871.  
  872. sockd.cfg
  873. sockd.cfg
  874. sockd.cfg
  875. sockd.cfg
  876. _________
  877.  
  878.   deny 0.0.0.0 0.0.0.0 9.0.0.0 255.0.0.0 gt 0
  879.   deny 0.0.0.0 0.0.0.0 127.0.0.0 255.0.0.0 gt 0
  880.   permit 9.132.0.0 255.255.0.0 0.0.0.0 0.0.0.0 gt 0
  881.   permit 127.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 gt 0
  882.   proxy 9.132.89.237 1080 0.0.0.0 0.0.0.0 Y Y N  Gateway_to_the_Internet  pubring.pgp
  883.  
  884. sockd.rte
  885. _________
  886.  
  887.   9.132.89.142 0.0.0.0 0.0.0.0
  888.   127.0.0.1  127.0.0.0 255.0.0.0
  889.  
  890. socks.cfg
  891. _________
  892.  
  893.   direct 9.0.0.0 255.0.0.0
  894.   sockd @=127.0.0.1 0.0.0.0 0.0.0.0
  895.  
  896.  
  897. All comments, remarks or critics are welcome on this subject
  898. (and others).
  899.  
  900.  
  901. ARCHIVING SOCKD LOG FILES AND REPORTING
  902. _______________________________________
  903.  
  904.   Sockd  can  now  archive  its log files. The setup is done
  905. through the "profile" option of the main window  menu.  Four
  906. parameters are saved in the third line of the sockd.pro file
  907. in  the ETC directory.  The first parameter indicates if Yes
  908. or No the option is selected.  The second parameter  is  "H"
  909. for hours or "D" for days. The third gives the delay used to
  910. close  the  sockd.log  file  and rename it to "sockdlog.XXX"
  911. where XXX is a three digits number. The fourth indicates the
  912. maximum number of archived files (+ the current sockd.log).
  913.  
  914.  The default is to keep seven files and to archive every  24
  915. hours.   With this setup you can build a weekly report using
  916. the sample REXX reporting program "sockdrep.cmd" (just  type
  917. "sockdrep"  without  parm  in  the  directory  sockd is run-
  918. ning)...
  919.  
  920.  
  921. How to manage sockd from batch command files
  922. ____________________________________________
  923.  
  924. An os/2 command called "sockdmsg" permits to reset the socks server configuration
  925. from the sockd.cfg file in the ETC directory or from the sockd.pro profile..
  926. It is a method to get support for variable config depending by sample of the
  927. time of the day.
  928.  
  929. The sockdmsg module supports three types of requests:
  930.  
  931.  - "sockdmsg -c [sockd.cfg]" to change the socks server configuration.
  932.  It uses sockd.cfg from the ETC directory if no file name is given as second
  933.  parameter. If a name is present, sockd looks for this file in the ETC directory
  934.  except if the file name includes some real path information (a backslash or
  935.  a colon).
  936.  - "sockdmsg -p [sockd.pro]" to restart sockd from a profile file.
  937.  - "sockdmsg -l" to reset the sockd.log logging file.
  938.  
  939. This command works only when sockd is running because it uses the \QUEUES\SOCKD
  940. system queue to communicate with the sockd process. A parameter is MANDATORY.
  941.  
  942.  
  943.  IF PROBLEMS
  944.  ___________
  945.  
  946.  
  947.  ⌐   The  DNS  kit  nameD  server  can block if the system is
  948.      fully  "socksified".    Don't  hesitate  to  rename  the
  949.      "socks.cfg"  file in the ETC directory when you are run-
  950.      ning sockD.
  951.  
  952.  ⌐   If your configuration is limited to one LAN adapter  and
  953.      one  dial  adapter,  it  is better to test sockd without
  954.      configuring it...  Use the view menu option to  see  the
  955.      config. After tests, check sockd.log ...
  956.  
  957.  ⌐   If  you  have really a problem to setup a name server on
  958.      the gateway station, define a "hosts"  file.  For  that,
  959.      when  you are testing your "sockdial.cmd" after the con-
  960.      nection and authentication are  successfully  completed,
  961.      use :
  962.        host www.yahoo.com
  963.      in  an OS/2 Window. You are able to get the IP addresses
  964.      of your favorite servers.  If you install a  "completed"
  965.      hosts  file  in the ETC directory of the end-user PC you
  966.      can test sockd with WebEx (socks V4) without  setting  a
  967.      name  server.   With a name server and its caching mech-
  968.      anism, you have access to any  server,  with  the  hosts
  969.      file access is limited...
  970.  
  971.  ⌐   To  support  socks  V5  DNS,  the  dial-up connection is
  972.      started automatically if the name  can  NOT  be  locally
  973.      traduced...  A  better  solution  is perhaps to define a
  974.      list of the "internal" domain names, and  to  start  the
  975.      connection  only  if  the  request is for another domain
  976.      name.  On the time being, sockd start the  dial-up  con-
  977.      nection  for  V5,  before  checking if the connection is
  978.      "permitted" except  if  the  DNS  name  can  be  locally
  979.      traduced.   With the current implementation:  - in socks
  980.      V4 the first session (to start the  dial-up  connection)
  981.      MUST be
  982.        to  a  "locally" defined DNS name (then sockd check if
  983.      the client has access
  984.        to this address before starting the connection).  - in
  985.      V5 DNS support, the first session  can  be  to  any  DNS
  986.      name, but if this
  987.        name  can  NOT  be  locally translatted, there is a delay
  988.      (nearly 1 min. in my tests)
  989.        then the dial-up connection is  started  and  the  DNS
  990.      name translation request
  991.        is sent to the "external" name server.
  992.        The  "permission"  can be checked only after sockd re-
  993.      ceived the destination
  994.        IP address.
  995.  
  996.  ⌐   In    this    version    ,    only   the   flags   "811"
  997.      (<UP,POINTTOPOINT>) or "851" (<..,RUNNING>) are  consid-
  998.      ered  as  "good"  status (connection established) on the
  999.      dial-up adapter.   If the "auto-dial"  facility  doesn't
  1000.      work for you, please check these flags with:
  1001.      "ifconfig ppp0" (by sample)
  1002.      Send a note to me and I'll add the required support...
  1003.  
  1004.  ⌐   With  current V4 applications like WebEx, the first ses-
  1005.      sion must be done to a DNS name converted locally (named
  1006.      or hosts file).  After the dial-up connection is  estab-
  1007.      lished,  names  can  be translatted by the Internet pro-
  1008.      vider name server, and cached in the local nameD.
  1009.  
  1010.  ⌐   Using WebEx through sockd, some  ".gif"  files  are  not
  1011.      correctly received I am investigating why and how to im-
  1012.      prove it.
  1013.  
  1014.    Any suggestion or question to Philippe Gillain (GILLAIN at
  1015.  BRUVMIS1 or Philippe_Gillain@be.ibm.com)...
  1016.  
  1017.