README.hpux 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. For HP-UX 11i (11.11) and later, there are no known issues with
  2. promiscuous mode under HP-UX. If you are using a earlier version of
  3. HP-UX and cannot upgrade, please continue reading.
  4. HP-UX patches to fix packet capture problems
  5. Note that packet-capture programs such as tcpdump may, on HP-UX, not be
  6. able to see packets sent from the machine on which they're running.
  7. Some articles on groups.google.com discussing this are:
  8. http://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE
  9. which says:
  10. Newsgroups: comp.sys.hp.hpux
  11. Subject: Re: Did someone made tcpdump working on 10.20 ?
  12. Date: 12/08/1999
  13. From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE>
  14. In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp>
  15. wrote:
  16. >Hello,
  17. >
  18. >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use
  19. >it, but I can only see incoming data, never outgoing.
  20. >Someone (raj) explained me that a patch was missing, and that this patch
  21. >must me "patched" (poked) in order to see outbound data in promiscuous mode.
  22. >Many things to do .... So the question is : did someone has already this
  23. >"ready to use" PHNE_**** patch ?
  24. Two things:
  25. 1. You do need a late "LAN products cumulative patch" (e.g. PHNE_18173
  26. for s700/10.20).
  27. 2. You must use
  28. echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
  29. You can insert this e.g. into /sbin/init.d/lan
  30. Best regards,
  31. Lutz
  32. and
  33. http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com
  34. which says:
  35. Newsgroups: comp.sys.hp.hpux
  36. Subject: Re: tcpdump only shows incoming packets
  37. Date: 02/15/2000
  38. From: Rick Jones <foo@bar.baz.invalid>
  39. Harald Skotnes <harald@cc.uit.no> wrote:
  40. > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have
  41. > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a
  42. > closer look I only get to see the incoming packets not the
  43. > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the
  44. > same thing happens. Could someone please give me a hint on how to
  45. > get this right?
  46. Search/Read the archives ?-)
  47. What you are seeing is expected, un-patched, behaviour for an HP-UX
  48. system. On 11.00, you need to install the latest lancommon/DLPI
  49. patches, and then the latest driver patch for the interface(s) in use.
  50. At that point, a miracle happens and you should start seeing outbound
  51. traffic.
  52. [That article also mentions the patch that appears below.]
  53. and
  54. http://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no
  55. which says:
  56. Newsgroups: comp.sys.hp.hpux
  57. Subject: Re: tcpdump only shows incoming packets
  58. Date: 02/16/2000
  59. From: Harald Skotnes <harald@cc.uit.no>
  60. Rick Jones wrote:
  61. ...
  62. > What you are seeing is expected, un-patched, behaviour for an HP-UX
  63. > system. On 11.00, you need to install the latest lancommon/DLPI
  64. > patches, and then the latest driver patch for the interface(s) in
  65. > use. At that point, a miracle happens and you should start seeing
  66. > outbound traffic.
  67. Thanks a lot. I have this problem on several machines running HPUX
  68. 10.20 and 11.00. The machines where patched up before y2k so did not
  69. know what to think. Anyway I have now installed PHNE_19766,
  70. PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
  71. outbound traffic too. Thanks again.
  72. (although those patches may not be the ones to install - there may be
  73. later patches).
  74. And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
  75. Date: Mon, 29 Apr 2002 15:59:55 -0700
  76. From: Rick Jones
  77. To: tcpdump-workers@tcpdump.org
  78. Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
  79. ...
  80. http://itrc.hp.com/ would be one place to start in a search for the most
  81. up-to-date patches for DLPI and the lan driver(s) used on your system (I
  82. cannot guess because 9000/800 is too generic - one hs to use the "model"
  83. command these days and/or an ioscan command (see manpage) to guess what
  84. the drivers (btlan[3456], gelan, etc) might be involved in addition to
  85. DLPI.
  86. Another option is to upgrade to 11i as outbound promiscuous mode support
  87. is there in the base OS, no patches required.
  88. Another posting:
  89. http://groups.google.com/groups?selm=7d6gvn%24b3%241%40ocean.cup.hp.com
  90. indicates that you need to install the optional STREAMS product to do
  91. captures on HP-UX 9.x:
  92. Newsgroups: comp.sys.hp.hpux
  93. Subject: Re: tcpdump HP/UX 9.x
  94. Date: 03/22/1999
  95. From: Rick Jones <foo@bar.baz>
  96. Dave Barr (barr@cis.ohio-state.edu) wrote:
  97. : Has anyone ported tcpdump (or something similar) to HP/UX 9.x?
  98. I'm reasonably confident that any port of tcpdump to 9.X would require
  99. the (then optional) STREAMS product. This would bring DLPI, which is
  100. what one uses to access interfaces in promiscuous mode.
  101. I'm not sure that HP even sells the 9.X STREAMS product any longer,
  102. since HP-UX 9.X is off the pricelist (well, maybe 9.10 for the old 68K
  103. devices).
  104. Your best bet is to be up on 10.20 or better if that is at all
  105. possible. If your hardware is supported by it, I'd go with HP-UX 11.
  106. If you want to see the system's own outbound traffic, you'll never get
  107. that functionality on 9.X, but it might happen at some point for 10.20
  108. and 11.X.
  109. rick jones
  110. (as per other messages cited here, the ability to see the system's own
  111. outbound traffic did happen).
  112. Rick Jones reports that HP-UX 11i needs no patches for outbound
  113. promiscuous mode support.
  114. An additional note, from Jost Martin, for HP-UX 10.20:
  115. Q: How do I get ethereral on HPUX to capture the _outgoing_ packets
  116. of an interface
  117. A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
  118. newer, this is as of 4.4.00) and its dependencies. Then you can
  119. enable the feature as descibed below:
  120. Patch Name: PHNE_20892
  121. Patch Description: s700 10.20 PCI 100Base-T cumulative patch
  122. To trace the outbound packets, please do the following
  123. to turn on a global promiscuous switch before running
  124. the promiscuous applications like snoop or tcpdump:
  125. adb -w /stand/vmunix /dev/mem
  126. lanc_outbound_promisc_flag/W 1
  127. (adb will echo the result showing that the flag has
  128. been changed)
  129. $quit
  130. (Thanks for this part to HP-support, Ratingen)
  131. The attached hack does this and some security-related stuff
  132. (thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who
  133. posted the security-part some time ago)
  134. <<hack_ip_stack>>
  135. (Don't switch IP-forwarding off, if you need it !)
  136. Install the hack as /sbin/init.d/hacl_ip_stack (adjust
  137. permissions !) and make a sequencing-symlink
  138. /sbin/rc2.d/S350hack_ip_stack pointing to this script.
  139. Now all this is done on every reboot.
  140. According to Rick Jones, the global promiscuous switch also has to be
  141. turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
  142. doesn't even exist on 11i.
  143. Here's the "hack_ip_stack" script:
  144. -----------------------------------Cut Here-------------------------------------
  145. #!/sbin/sh
  146. #
  147. # nettune: hack kernel parms for safety
  148. OKAY=0
  149. ERROR=-1
  150. # /usr/contrib/bin fuer nettune auf Pfad
  151. PATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin
  152. export PATH
  153. ##########
  154. # main #
  155. ##########
  156. case $1 in
  157. start_msg)
  158. print "Tune IP-Stack for security"
  159. exit $OKAY
  160. ;;
  161. stop_msg)
  162. print "This action is not applicable"
  163. exit $OKAY
  164. ;;
  165. stop)
  166. exit $OKAY
  167. ;;
  168. start)
  169. ;; # fall through
  170. *)
  171. print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2
  172. exit $ERROR
  173. ;;
  174. esac
  175. ###########
  176. # start #
  177. ###########
  178. #
  179. # tcp-Sequence-Numbers nicht mehr inkrementieren sondern random
  180. # Syn-Flood-Protection an
  181. # ip_forwarding aus
  182. # Source-Routing aus
  183. # Ausgehende Packets an ethereal/tcpdump etc.
  184. /usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR
  185. /usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR
  186. /usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR
  187. echo 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR
  188. echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem || exit $ERROR
  189. exit $OKAY
  190. -----------------------------------Cut Here-------------------------------------