Blame doc/README.hpux

Packit 209cc3
For HP-UX 11i (11.11) and later, there are no known issues with
Packit 209cc3
promiscuous mode under HP-UX.  If you are using a earlier version of
Packit 209cc3
HP-UX and cannot upgrade, please continue reading.
Packit 209cc3
Packit 209cc3
HP-UX patches to fix packet capture problems
Packit 209cc3
Packit 209cc3
Note that packet-capture programs such as tcpdump may, on HP-UX, not be
Packit 209cc3
able to see packets sent from the machine on which they're running.
Packit 209cc3
Some articles on groups.google.com discussing this are:
Packit 209cc3
Packit 209cc3
	http://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE
Packit 209cc3
Packit 209cc3
which says:
Packit 209cc3
Packit 209cc3
  Newsgroups: comp.sys.hp.hpux
Packit 209cc3
  Subject:  Re: Did someone made tcpdump working on 10.20 ?
Packit 209cc3
  Date: 12/08/1999
Packit 209cc3
  From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE>
Packit 209cc3
Packit 209cc3
  In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp>
Packit 209cc3
  wrote:
Packit 209cc3
   >Hello,
Packit 209cc3
   >
Packit 209cc3
   >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use
Packit 209cc3
   >it, but I can only see incoming data, never outgoing.
Packit 209cc3
   >Someone (raj) explained me that a patch was missing, and that this patch
Packit 209cc3
   >must me "patched" (poked) in order to see outbound data in promiscuous mode.
Packit 209cc3
   >Many things to do .... So the question is : did someone has already this
Packit 209cc3
   >"ready to use" PHNE_**** patch ?
Packit 209cc3
Packit 209cc3
   Two things:
Packit 209cc3
   1. You do need a late "LAN products cumulative patch" (e.g.  PHNE_18173
Packit 209cc3
  for   s700/10.20).
Packit 209cc3
   2. You must use
Packit 209cc3
echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
Packit 209cc3
     You can insert this e.g. into /sbin/init.d/lan
Packit 209cc3
Packit 209cc3
   Best regards,
Packit 209cc3
   Lutz
Packit 209cc3
Packit 209cc3
and
Packit 209cc3
Packit 209cc3
	http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com
Packit 209cc3
Packit 209cc3
which says:
Packit 209cc3
Packit 209cc3
  Newsgroups: comp.sys.hp.hpux
Packit 209cc3
  Subject: Re: tcpdump only shows incoming packets
Packit 209cc3
  Date: 02/15/2000
Packit 209cc3
  From: Rick Jones <foo@bar.baz.invalid>
Packit 209cc3
Packit 209cc3
  Harald Skotnes <harald@cc.uit.no> wrote:
Packit 209cc3
  > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have
Packit 209cc3
  > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a
Packit 209cc3
  > closer look I only get to see the incoming packets not the
Packit 209cc3
  > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the
Packit 209cc3
  > same thing happens.  Could someone please give me a hint on how to
Packit 209cc3
  > get this right?
Packit 209cc3
Packit 209cc3
  Search/Read the archives ?-)
Packit 209cc3
Packit 209cc3
  What you are seeing is expected, un-patched, behaviour for an HP-UX
Packit 209cc3
  system.  On 11.00, you need to install the latest lancommon/DLPI
Packit 209cc3
  patches, and then the latest driver patch for the interface(s) in use.
Packit 209cc3
  At that point, a miracle happens and you should start seeing outbound
Packit 209cc3
  traffic.
Packit 209cc3
Packit 209cc3
[That article also mentions the patch that appears below.]
Packit 209cc3
Packit 209cc3
and
Packit 209cc3
Packit 209cc3
	http://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no
Packit 209cc3
Packit 209cc3
which says:
Packit 209cc3
Packit 209cc3
  Newsgroups: comp.sys.hp.hpux
Packit 209cc3
  Subject: Re: tcpdump only shows incoming packets
Packit 209cc3
  Date: 02/16/2000
Packit 209cc3
  From: Harald Skotnes <harald@cc.uit.no>
Packit 209cc3
Packit 209cc3
  Rick Jones wrote:
Packit 209cc3
Packit 209cc3
	...
Packit 209cc3
Packit 209cc3
  > What you are seeing is expected, un-patched, behaviour for an HP-UX
Packit 209cc3
  > system. On 11.00, you need to install the latest lancommon/DLPI
Packit 209cc3
  > patches, and then the latest driver patch for the interface(s) in
Packit 209cc3
  > use. At that point, a miracle happens and you should start seeing
Packit 209cc3
  > outbound traffic.
Packit 209cc3
Packit 209cc3
  Thanks a lot.  I have this problem on several machines running HPUX
Packit 209cc3
  10.20 and 11.00.  The machines where patched up before y2k so did not
Packit 209cc3
  know what to think.  Anyway I have now installed PHNE_19766,
Packit 209cc3
  PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
Packit 209cc3
  outbound traffic too.  Thanks again.
Packit 209cc3
Packit 209cc3
(although those patches may not be the ones to install - there may be
Packit 209cc3
later patches).
Packit 209cc3
Packit 209cc3
And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
Packit 209cc3
Packit 209cc3
  Date: Mon, 29 Apr 2002 15:59:55 -0700
Packit 209cc3
  From: Rick Jones
Packit 209cc3
  To: tcpdump-workers@tcpdump.org
Packit 209cc3
  Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
Packit 209cc3
Packit 209cc3
	...
Packit 209cc3
Packit 209cc3
  http://itrc.hp.com/ would be one place to start in a search for the most
Packit 209cc3
  up-to-date patches for DLPI and the lan driver(s) used on your system (I
Packit 209cc3
  cannot guess because 9000/800 is too generic - one hs to use the "model"
Packit 209cc3
  command these days and/or an ioscan command (see manpage) to guess what
Packit 209cc3
  the drivers (btlan[3456], gelan, etc) might be involved in addition to
Packit 209cc3
  DLPI.
Packit 209cc3
Packit 209cc3
  Another option is to upgrade to 11i as outbound promiscuous mode support
Packit 209cc3
  is there in the base OS, no patches required.
Packit 209cc3
Packit 209cc3
Another posting:
Packit 209cc3
Packit 209cc3
	http://groups.google.com/groups?selm=7d6gvn%24b3%241%40ocean.cup.hp.com
Packit 209cc3
Packit 209cc3
indicates that you need to install the optional STREAMS product to do
Packit 209cc3
captures on HP-UX 9.x:
Packit 209cc3
Packit 209cc3
  Newsgroups: comp.sys.hp.hpux
Packit 209cc3
  Subject:  Re: tcpdump HP/UX 9.x
Packit 209cc3
  Date: 03/22/1999
Packit 209cc3
  From: Rick Jones <foo@bar.baz>
Packit 209cc3
Packit 209cc3
  Dave Barr (barr@cis.ohio-state.edu) wrote:
Packit 209cc3
  : Has anyone ported tcpdump (or something similar) to HP/UX 9.x?
Packit 209cc3
Packit 209cc3
  I'm reasonably confident that any port of tcpdump to 9.X would require
Packit 209cc3
  the (then optional) STREAMS product.  This would bring DLPI, which is
Packit 209cc3
  what one uses to access interfaces in promiscuous mode.
Packit 209cc3
Packit 209cc3
  I'm not sure that HP even sells the 9.X STREAMS product any longer,
Packit 209cc3
  since HP-UX 9.X is off the pricelist (well, maybe 9.10 for the old 68K
Packit 209cc3
  devices).
Packit 209cc3
Packit 209cc3
  Your best bet is to be up on 10.20 or better if that is at all
Packit 209cc3
  possible.  If your hardware is supported by it, I'd go with HP-UX 11.
Packit 209cc3
  If you want to see the system's own outbound traffic, you'll never get
Packit 209cc3
  that functionality on 9.X, but it might happen at some point for 10.20
Packit 209cc3
  and 11.X.
Packit 209cc3
Packit 209cc3
  rick jones
Packit 209cc3
Packit 209cc3
(as per other messages cited here, the ability to see the system's own
Packit 209cc3
outbound traffic did happen).
Packit 209cc3
Packit 209cc3
Rick Jones reports that HP-UX 11i needs no patches for outbound
Packit 209cc3
promiscuous mode support.
Packit 209cc3
Packit 209cc3
An additional note, from Jost Martin, for HP-UX 10.20:
Packit 209cc3
Packit 209cc3
	Q: How do I get ethereral on HPUX to capture the _outgoing_ packets
Packit 209cc3
	   of an interface
Packit 209cc3
	A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
Packit 209cc3
	   newer, this is as of 4.4.00) and its dependencies.  Then you can
Packit 209cc3
	   enable the feature as descibed below:
Packit 209cc3
Packit 209cc3
	Patch Name: PHNE_20892
Packit 209cc3
	Patch Description: s700 10.20 PCI 100Base-T cumulative patch
Packit 209cc3
		To trace the outbound packets, please do the following
Packit 209cc3
		to turn on a global promiscuous switch before running
Packit 209cc3
		the promiscuous applications like snoop or tcpdump:
Packit 209cc3
Packit 209cc3
		adb -w /stand/vmunix /dev/mem
Packit 209cc3
		lanc_outbound_promisc_flag/W 1
Packit 209cc3
		(adb will echo the result showing that the flag has
Packit 209cc3
		been changed)
Packit 209cc3
		$quit
Packit 209cc3
	(Thanks for this part to HP-support, Ratingen)
Packit 209cc3
Packit 209cc3
		The attached hack does this and some security-related stuff
Packit 209cc3
	(thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who
Packit 209cc3
	posted the security-part some time ago)
Packit 209cc3
Packit 209cc3
		 <<hack_ip_stack>>
Packit 209cc3
Packit 209cc3
		(Don't switch IP-forwarding off, if you need it !)
Packit 209cc3
		Install the hack as /sbin/init.d/hacl_ip_stack (adjust
Packit 209cc3
	permissions !) and make a sequencing-symlink
Packit 209cc3
	/sbin/rc2.d/S350hack_ip_stack pointing to this script.
Packit 209cc3
		Now all this is done on every reboot.
Packit 209cc3
Packit 209cc3
According to Rick Jones, the global promiscuous switch also has to be
Packit 209cc3
turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
Packit 209cc3
doesn't even exist on 11i.
Packit 209cc3
Packit 209cc3
Here's the "hack_ip_stack" script:
Packit 209cc3
Packit 209cc3
-----------------------------------Cut Here-------------------------------------
Packit 209cc3
#!/sbin/sh
Packit 209cc3
#
Packit 209cc3
# nettune:  hack kernel parms for safety
Packit 209cc3
Packit 209cc3
OKAY=0
Packit 209cc3
ERROR=-1
Packit 209cc3
Packit 209cc3
# /usr/contrib/bin fuer nettune auf Pfad
Packit 209cc3
PATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin
Packit 209cc3
export PATH
Packit 209cc3
Packit 209cc3
Packit 209cc3
##########
Packit 209cc3
#  main  #
Packit 209cc3
##########
Packit 209cc3
Packit 209cc3
case $1 in
Packit 209cc3
   start_msg)
Packit 209cc3
      print "Tune IP-Stack for security"
Packit 209cc3
      exit $OKAY
Packit 209cc3
      ;;
Packit 209cc3
Packit 209cc3
   stop_msg)
Packit 209cc3
      print "This action is not applicable"
Packit 209cc3
      exit $OKAY
Packit 209cc3
      ;;
Packit 209cc3
Packit 209cc3
   stop)
Packit 209cc3
      exit $OKAY
Packit 209cc3
      ;;
Packit 209cc3
Packit 209cc3
   start)
Packit 209cc3
      ;;  # fall through
Packit 209cc3
Packit 209cc3
   *)
Packit 209cc3
      print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2
Packit 209cc3
      exit $ERROR
Packit 209cc3
      ;;
Packit 209cc3
   esac
Packit 209cc3
Packit 209cc3
###########
Packit 209cc3
#  start  #
Packit 209cc3
###########
Packit 209cc3
Packit 209cc3
#
Packit 209cc3
# tcp-Sequence-Numbers nicht mehr inkrementieren sondern random
Packit 209cc3
# Syn-Flood-Protection an
Packit 209cc3
# ip_forwarding aus
Packit 209cc3
# Source-Routing aus
Packit 209cc3
# Ausgehende Packets an ethereal/tcpdump etc.
Packit 209cc3
Packit 209cc3
/usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR
Packit 209cc3
/usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR
Packit 209cc3
/usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR
Packit 209cc3
echo 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR
Packit 209cc3
echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem  || exit $ERROR
Packit 209cc3
Packit 209cc3
exit $OKAY
Packit 209cc3
-----------------------------------Cut Here-------------------------------------