Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 1999 19:11:52 +1200
From:      a.bob@xtra.co.nz
To:        questions@freebsd.org
Subject:   NATD promiscuous mode 3.1-Release
Message-ID:  <36F89038.B626350E@xtra.co.nz>

next in thread | raw e-mail | index | archive | help
Hi 
I'd appreciate any pointers on the following saga.  I figure that 
I've missed something obvious, but am cluefree as to what.

Background
I am trying to set up NATD between two private ip networks, one
 of which is then connected to an modem ADSL, thus

     Modem        Gateway 
     ____         ____
    |    |-------|    |
----|____|       |____|
                   |
           ______  |     ______
          |      |------|      |
          |______|      |______|
            PC 1 	 PC 2 
I am running a fresh installed 3.1 RELEASE fresh off the CD on a
P90 with a PCI ethernet card on ed1 and an isa card on ed0.  natd 
dhclient and the kernel is rebuilt with option IPFIRWALL and
DIVERT
and pseudodevice bpf with 4 thingies
all sotware is straigh added off CD during 3.1 novice install

Situation
The gateway connects and can see the world fine and can be seen
via NAPT on 
the modem (Pinhole network and port translation)
I am running natd -dynamic -n ed1

When I run an ipfw divert to 8668 on the gateway

# ipfw add 100 divert 8668 ip from any to any via ed1 

I am unable to see anything outside the machine, I get a 
sendto permission denied etc ipfw logs hits on the divert rule
but 
/var/log/alias.log contains nothing ( on the other hand do I have
to 
explicitly enable logging to get any log having just had another
peek
at the man page)

ed1 is connected to an ADSL modem/router on 192.168.1.254 (the
isp set this up) 
The modem is also a DHCP server and dhclient picks up the IP
address perfectly. 

Promiscuous?
On boot I get ed0 set into promiscuous mode but it isn't when if
run ifconfig -a 
My assumption is that something turns it on briefly then off
again. But what it
 is and why I have no clue to as yet - any suggetsions?

tcpdump sets ed0 to promiscuous tcpdump -i ed1 does likewise for
ed1, running
both in separate terminals does both. So both card can do
promiscuous.

I have a sneaky feeling that it may have something to do with ed1
not being
in promiscuous mode but I can't figure it out. Am I barking up
the wrong tree
or just barking?

Or do I need to set a more explict config on natd?

ps says

USER     PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME
COMMAND
root     119 25.0 13.9  4580 4204  ??  Ss   Tue08PM  24:00.34
named
root       1  0.0  0.6   496  168  ??  Is   Tue08PM   0:00.06
/sbin/init --
root       2  0.0  0.0     0    0  ??  DL   Tue08PM   0:00.94 
(pagedaemon)
root       3  0.0  0.0     0    0  ??  DL   Tue08PM   0:00.00 
(vmdaemon)
root       4  0.0  0.0     0    0  ??  DL   Tue08PM   0:14.55 
(syncer)
root     114  0.0  1.7   820  504  ??  Ss   Tue08PM   0:01.80
syslogd
daemon   125  0.0  1.1   792  320  ??  Is   Tue08PM   0:00.00
portmap
root     162  0.0  1.6   860  488  ??  Is   Tue08PM   0:00.18
inetd
root     165  0.0  1.7   980  508  ??  Is   Tue08PM   0:02.20
cron
root    1571  0.0  1.5   892  444  ??  Is   10:06AM   0:00.01
natd -dynamic -n ed1

root    2528  0.0  2.2   948  656  ??  Is    1:10AM   0:00.10
/usr/local/sbin/dhclient ed1
root       0  0.0  0.0     0    0  ??  DLs  Tue08PM   0:00.14 
(swapper)

IPFW rules when the diver is missing

00200 deny ip from any to 127.0.0.0/8
65000 allow ip from any to any
65535 deny ip from any to any

ifconfig gives me

ed1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.1.1 netmask 0xffffff00 broadcast
192.168.1.255
        ether 00:00:b4:5c:0b:e2
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.2.1 netmask 0xffffff00 broadcast
192.168.2.255
        ether 08:00:17:04:ef:1e

on the modem I get 

show ip interfaces

IP Interfaces:
ENET (lan): ( up broadcast default rip-send v1 rip-receive v1 )
  inet 192.168.1.254 netmask ffffff00 broadcast 192.168.1.255
  physical address 00.40.43.02.04.66 mtu 1500

PPP (vcc1): ( up point-to-point address-mapping )
  inet x.x.x.x netmask 0 peer address y.y.y.y
  physical address 00.00.00.00.00.00 mtu 1500

from the gateway DHCP client /var/db/dhclient.leases I get 

lease {
  interface "ed1";
  fixed-address 192.168.1.1;
  server-name "(null)";
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.254;
  option domain-name-servers 192.168.1.254;
  option domain-name "";
  option dhcp-lease-time 3600;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.1.254;
  option dhcp-renewal-time 1800;
  option dhcp-rebinding-time 3150;
  renew 3 1999/3/24 19:10:37;
  rebind 3 1999/3/24 19:33:07;
  expire 3 1999/3/24 19:40:37;
}

TIA 
regards

kit


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36F89038.B626350E>