Subject: No in bound tcp on ethernet
To: None <netbsd-help@netbsd.org>
From: James l Vodanovich <jim@arrakis.com.au>
List: netbsd-help
Date: 06/23/1999 16:48:39
One of my machines a i386 1.3.3 and will not accept any inbound tcp connections
on its ethernet interface, this is not limited to services run from inetd,
however it will initiate any outbound tcp connection across the ethernet and
succeed.

The machine initiating the connections is a i386 1.4 custom kernal from 
virgin 1.4 source.

The 1.3.3 machine has 2 lines added to if_ne_pcmcia.c
see below

 All udp services operate perfectly and the problem is only limited to the
ethernet interface, both inetd initiated and stanealone servers respond to
requests via ppp0. 

I have no hosts.allow or hosts.deny  besides it affects standalone servers

I have tried  a GENERIC kernel  (compiled with the following addition to
if_ne_pcmcia.c)

I have tried no ipfilter and no ipnat

I've reinstalled the 1.3.3 base binary set (windows knee jerk reaction)    

 tcpdump on the machine in question  displays the packets and
shows no response from the machine


  I think the following is my problem 

From /sys/arch/dev/pcmcia/if_ne_pcmcia.c

struct ne2000dev {
    char *name;
    int32_t manufacturer;
    int32_t product;
    char *cis1_info0;
    char *cis1_info1;
    int function;
    int enet_maddr;
    unsigned char enet_vendor[3];
} ne2000devs[] = {

    { "Mine",
      0x149, 0x21b, "X   ", "X", 0,
      0x0000, { 0x01, 0x03, 0xd1 } },
    
	"
	"
	"


I got it right once but in an upgrade trashed it.
 
I never understood exactly what the last two fields in the structure 
are, in the past I must have guessed correctly which existing
card to copy. 
I did this several months ago and never used the machine to serve
until now. On the prior incarnation I did.


Could  someone explains what those fields are and how to set them correctly?

The card in question is a no name Tawianse thing
the relvant lines from dmesg

pcmcia1 at pcic0 controller 0 socket 1
pcmcia1: CIS version 2.0 or 2.01
pcmcia1: CIS info: IC-CARD+, IC-CARD+, 118B6603
pcmcia1: Manufacturer code 0x149, product 0x21b
pcmcia1: function 0: network adapter, ccr addr 400 mask b
pcmcia1: function 0, config table entry 32: I/O card; irq mask befc; iomask 5, iospace 0-1f; mwait_requir
ed rdybsy_active wp_active bvd_active io16 irqlevel
ne2 at pcmcia1 function 0 port 0x340-0x34f port 0x350-0x35f
ne2: Mine Ethernet
ne2: Ethernet address 01:03:d1:0a:ff:1c
biomask 4040 netmask 4040 ttymask 50ca


Apologies to those I confused when I blamed IP-NAT
and yet I may still be way off track.

--
---
Humor can deliver the truth in a more palatable form. 
----
James L Vodanovich			jim@arrakis.com.au 
Sydney Australia			ph 0412106903


Online resume at http://www.arrakis.com.au/vodan