19185e895SchristosFor HP-UX 11i (11.11) and later, there are no known issues with 29185e895Schristospromiscuous mode under HP-UX. If you are using a earlier version of 39185e895SchristosHP-UX and cannot upgrade, please continue reading. 49185e895Schristos 59185e895SchristosHP-UX patches to fix packet capture problems 69185e895Schristos 79185e895SchristosNote that packet-capture programs such as tcpdump may, on HP-UX, not be 89185e895Schristosable to see packets sent from the machine on which they're running. 99185e895SchristosSome articles on groups.google.com discussing this are: 109185e895Schristos 11748408edSchristos https://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE 129185e895Schristos 139185e895Schristoswhich says: 149185e895Schristos 159185e895Schristos Newsgroups: comp.sys.hp.hpux 169185e895Schristos Subject: Re: Did someone made tcpdump working on 10.20 ? 179185e895Schristos Date: 12/08/1999 189185e895Schristos From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE> 199185e895Schristos 209185e895Schristos In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp> 219185e895Schristos wrote: 229185e895Schristos >Hello, 239185e895Schristos > 249185e895Schristos >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use 259185e895Schristos >it, but I can only see incoming data, never outgoing. 269185e895Schristos >Someone (raj) explained me that a patch was missing, and that this patch 279185e895Schristos >must me "patched" (poked) in order to see outbound data in promiscuous mode. 289185e895Schristos >Many things to do .... So the question is : did someone has already this 299185e895Schristos >"ready to use" PHNE_**** patch ? 309185e895Schristos 319185e895Schristos Two things: 329185e895Schristos 1. You do need a late "LAN products cumulative patch" (e.g. PHNE_18173 339185e895Schristos for s700/10.20). 349185e895Schristos 2. You must use 359185e895Schristosecho 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem 369185e895Schristos You can insert this e.g. into /sbin/init.d/lan 379185e895Schristos 389185e895Schristos Best regards, 399185e895Schristos Lutz 409185e895Schristos 419185e895Schristosand 429185e895Schristos 439185e895Schristos http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com 449185e895Schristos 459185e895Schristoswhich says: 469185e895Schristos 479185e895Schristos Newsgroups: comp.sys.hp.hpux 489185e895Schristos Subject: Re: tcpdump only shows incoming packets 499185e895Schristos Date: 02/15/2000 509185e895Schristos From: Rick Jones <foo@bar.baz.invalid> 519185e895Schristos 529185e895Schristos Harald Skotnes <harald@cc.uit.no> wrote: 539185e895Schristos > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have 549185e895Schristos > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a 559185e895Schristos > closer look I only get to see the incoming packets not the 569185e895Schristos > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the 579185e895Schristos > same thing happens. Could someone please give me a hint on how to 589185e895Schristos > get this right? 599185e895Schristos 609185e895Schristos Search/Read the archives ?-) 619185e895Schristos 629185e895Schristos What you are seeing is expected, un-patched, behaviour for an HP-UX 639185e895Schristos system. On 11.00, you need to install the latest lancommon/DLPI 649185e895Schristos patches, and then the latest driver patch for the interface(s) in use. 659185e895Schristos At that point, a miracle happens and you should start seeing outbound 669185e895Schristos traffic. 679185e895Schristos 689185e895Schristos[That article also mentions the patch that appears below.] 699185e895Schristos 709185e895Schristosand 719185e895Schristos 72748408edSchristos https://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no 739185e895Schristos 749185e895Schristoswhich says: 759185e895Schristos 769185e895Schristos Newsgroups: comp.sys.hp.hpux 779185e895Schristos Subject: Re: tcpdump only shows incoming packets 789185e895Schristos Date: 02/16/2000 799185e895Schristos From: Harald Skotnes <harald@cc.uit.no> 809185e895Schristos 819185e895Schristos Rick Jones wrote: 829185e895Schristos 839185e895Schristos ... 849185e895Schristos 859185e895Schristos > What you are seeing is expected, un-patched, behaviour for an HP-UX 869185e895Schristos > system. On 11.00, you need to install the latest lancommon/DLPI 879185e895Schristos > patches, and then the latest driver patch for the interface(s) in 889185e895Schristos > use. At that point, a miracle happens and you should start seeing 899185e895Schristos > outbound traffic. 909185e895Schristos 919185e895Schristos Thanks a lot. I have this problem on several machines running HPUX 929185e895Schristos 10.20 and 11.00. The machines where patched up before y2k so did not 939185e895Schristos know what to think. Anyway I have now installed PHNE_19766, 949185e895Schristos PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the 959185e895Schristos outbound traffic too. Thanks again. 969185e895Schristos 979185e895Schristos(although those patches may not be the ones to install - there may be 989185e895Schristoslater patches). 999185e895Schristos 1009185e895SchristosAnd another message to tcpdump-workers@tcpdump.org, from Rick Jones: 1019185e895Schristos 1029185e895Schristos Date: Mon, 29 Apr 2002 15:59:55 -0700 1039185e895Schristos From: Rick Jones 1049185e895Schristos To: tcpdump-workers@tcpdump.org 1059185e895Schristos Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic 1069185e895Schristos 1079185e895Schristos ... 1089185e895Schristos 1099185e895Schristos http://itrc.hp.com/ would be one place to start in a search for the most 1109185e895Schristos up-to-date patches for DLPI and the lan driver(s) used on your system (I 1119185e895Schristos cannot guess because 9000/800 is too generic - one hs to use the "model" 1129185e895Schristos command these days and/or an ioscan command (see manpage) to guess what 1139185e895Schristos the drivers (btlan[3456], gelan, etc) might be involved in addition to 1149185e895Schristos DLPI. 1159185e895Schristos 1169185e895Schristos Another option is to upgrade to 11i as outbound promiscuous mode support 1179185e895Schristos is there in the base OS, no patches required. 1189185e895Schristos 1199185e895SchristosAnother posting: 1209185e895Schristos 121748408edSchristos https://groups.google.com/groups?selm=7d6gvn%24b3%241%40ocean.cup.hp.com 1229185e895Schristos 1239185e895Schristosindicates that you need to install the optional STREAMS product to do 1249185e895Schristoscaptures on HP-UX 9.x: 1259185e895Schristos 1269185e895Schristos Newsgroups: comp.sys.hp.hpux 1279185e895Schristos Subject: Re: tcpdump HP/UX 9.x 1289185e895Schristos Date: 03/22/1999 1299185e895Schristos From: Rick Jones <foo@bar.baz> 1309185e895Schristos 1319185e895Schristos Dave Barr (barr@cis.ohio-state.edu) wrote: 1329185e895Schristos : Has anyone ported tcpdump (or something similar) to HP/UX 9.x? 1339185e895Schristos 1349185e895Schristos I'm reasonably confident that any port of tcpdump to 9.X would require 1359185e895Schristos the (then optional) STREAMS product. This would bring DLPI, which is 1369185e895Schristos what one uses to access interfaces in promiscuous mode. 1379185e895Schristos 1389185e895Schristos I'm not sure that HP even sells the 9.X STREAMS product any longer, 1399185e895Schristos since HP-UX 9.X is off the pricelist (well, maybe 9.10 for the old 68K 1409185e895Schristos devices). 1419185e895Schristos 1429185e895Schristos Your best bet is to be up on 10.20 or better if that is at all 1439185e895Schristos possible. If your hardware is supported by it, I'd go with HP-UX 11. 1449185e895Schristos If you want to see the system's own outbound traffic, you'll never get 1459185e895Schristos that functionality on 9.X, but it might happen at some point for 10.20 1469185e895Schristos and 11.X. 1479185e895Schristos 1489185e895Schristos rick jones 1499185e895Schristos 1509185e895Schristos(as per other messages cited here, the ability to see the system's own 1519185e895Schristosoutbound traffic did happen). 1529185e895Schristos 1539185e895SchristosRick Jones reports that HP-UX 11i needs no patches for outbound 1549185e895Schristospromiscuous mode support. 1559185e895Schristos 1569185e895SchristosAn additional note, from Jost Martin, for HP-UX 10.20: 1579185e895Schristos 158*f73a5f05Schristos Q: How do I get [Wireshark] on HPUX to capture the _outgoing_ packets 1599185e895Schristos of an interface 1609185e895Schristos A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or 1619185e895Schristos newer, this is as of 4.4.00) and its dependencies. Then you can 162748408edSchristos enable the feature as described below: 1639185e895Schristos 1649185e895Schristos Patch Name: PHNE_20892 1659185e895Schristos Patch Description: s700 10.20 PCI 100Base-T cumulative patch 1669185e895Schristos To trace the outbound packets, please do the following 1679185e895Schristos to turn on a global promiscuous switch before running 1689185e895Schristos the promiscuous applications like snoop or tcpdump: 1699185e895Schristos 1709185e895Schristos adb -w /stand/vmunix /dev/mem 1719185e895Schristos lanc_outbound_promisc_flag/W 1 1729185e895Schristos (adb will echo the result showing that the flag has 1739185e895Schristos been changed) 1749185e895Schristos $quit 1759185e895Schristos (Thanks for this part to HP-support, Ratingen) 1769185e895Schristos 1779185e895Schristos The attached hack does this and some security-related stuff 1789185e895Schristos (thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who 1799185e895Schristos posted the security-part some time ago) 1809185e895Schristos 1819185e895Schristos <<hack_ip_stack>> 1829185e895Schristos 1839185e895Schristos (Don't switch IP-forwarding off, if you need it !) 1849185e895Schristos Install the hack as /sbin/init.d/hacl_ip_stack (adjust 1859185e895Schristos permissions !) and make a sequencing-symlink 1869185e895Schristos /sbin/rc2.d/S350hack_ip_stack pointing to this script. 1879185e895Schristos Now all this is done on every reboot. 1889185e895Schristos 1899185e895SchristosAccording to Rick Jones, the global promiscuous switch also has to be 1909185e895Schristosturned on for HP-UX 11.00, but not for 11i - and, in fact, the switch 1919185e895Schristosdoesn't even exist on 11i. 1929185e895Schristos 1939185e895SchristosHere's the "hack_ip_stack" script: 1949185e895Schristos 1959185e895Schristos-----------------------------------Cut Here------------------------------------- 1969185e895Schristos#!/sbin/sh 1979185e895Schristos# 198748408edSchristos# nettune: hack kernel params for safety 1999185e895Schristos 2009185e895SchristosOKAY=0 2019185e895SchristosERROR=-1 2029185e895Schristos 2039185e895Schristos# /usr/contrib/bin fuer nettune auf Pfad 2049185e895SchristosPATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin 2059185e895Schristosexport PATH 2069185e895Schristos 2079185e895Schristos 2089185e895Schristos########## 2099185e895Schristos# main # 2109185e895Schristos########## 2119185e895Schristos 2129185e895Schristoscase $1 in 2139185e895Schristos start_msg) 2149185e895Schristos print "Tune IP-Stack for security" 2159185e895Schristos exit $OKAY 2169185e895Schristos ;; 2179185e895Schristos 2189185e895Schristos stop_msg) 2199185e895Schristos print "This action is not applicable" 2209185e895Schristos exit $OKAY 2219185e895Schristos ;; 2229185e895Schristos 2239185e895Schristos stop) 2249185e895Schristos exit $OKAY 2259185e895Schristos ;; 2269185e895Schristos 2279185e895Schristos start) 2289185e895Schristos ;; # fall through 2299185e895Schristos 2309185e895Schristos *) 2319185e895Schristos print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2 2329185e895Schristos exit $ERROR 2339185e895Schristos ;; 2349185e895Schristos esac 2359185e895Schristos 2369185e895Schristos########### 2379185e895Schristos# start # 2389185e895Schristos########### 2399185e895Schristos 2409185e895Schristos# 2419185e895Schristos# tcp-Sequence-Numbers nicht mehr inkrementieren sondern random 2429185e895Schristos# Syn-Flood-Protection an 2439185e895Schristos# ip_forwarding aus 2449185e895Schristos# Source-Routing aus 2459185e895Schristos# Ausgehende Packets an ethereal/tcpdump etc. 2469185e895Schristos 2479185e895Schristos/usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR 2489185e895Schristos/usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR 2499185e895Schristos/usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR 2509185e895Schristosecho 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR 2519185e895Schristosecho 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem || exit $ERROR 2529185e895Schristos 2539185e895Schristosexit $OKAY 2549185e895Schristos-----------------------------------Cut Here------------------------------------- 255