Subject: Re: a couple questions
To: tcjam <tcjam@voicenet.com>
From: SamMaEl <rimsky@teleport.com>
List: port-mac68k
Date: 12/28/1997 16:23:07
On Sun, 28 Dec 1997, tcjam wrote:

> First for the serial link (netbsd to macos) I put the ppp "server" in a
> getty line for the modem port (tty01) 

	Well, I was actually wondering about a netbsd to netbsd serial
link. I've got ethernet for NetBSD to MacOS, it's just that my Q630's CS
ethernet card isn't working yet under NetBSD.... so if I use it to run
NetBSD it gets cut off from the network.

> Now about my little subnet and dns. Here is what I did. I set the
> nameserver to be authoritative for my subnet and just cache for the rest
> of the internet. I put the nameserver on my gateway and pointed the
> internal machines to the gateway. 

	Hmmm... how about an example? ;-) Well, here's my named.boot file
and my other files from /etc/namedb. It works for my network, and I use my
ISP's name server as my gateway's name server, but I don't know if it will
let my other machines take advantage of my external name server through my
gateway... if that made sense ;-)


	Also, when I startup ipf at boottime, setting it to YES in
rc.conf, when I use my /etc/ppp/nat-up script I get this:

hobbes# ./nat-up
Current IP address is 206.163.57.84
Cleaning out IPNAT
0 entries flushed from NAT table
0 entries flushed from NAT list
SIOCFRENB: Device busy
Setting up IPNAT for IP address 206.163.57.84
hobbes#

	So, I'm thinking that with a dynamic IP, I should NOT start it up
at boottime, correct? Since, I have not yet been assigned an IP at
boottup. 

	Right now, my ipnat.conf file is:

map ppp0 10.0.0.0/24  -> 206.163.57.84/32  portmap tcp/udp 10000:20000

	And as suggested by Bob Nestor my ipf.conf files reads:

pass in proto tcp/udp all
pass out proto tcp/udp all

	The above is my current IP address. Now, here is what I enter to
try to bring ipnat up... please someone correct me if I'm doing it wrong!
Because right now it is NOT working!

hobbes# ipf -D
hobbes# ipnat -F
1 entries flushed from NAT list
hobbes# ipnat -C
0 entries flushed from NAT list
hobbes# ipf -E
hobbes# ipnat -f /etc/ipnat.conf
hobbes# ipnat -l
List of active MAP/Redirect filters:
map ppp0 10.0.0.0/24  -> 206.163.57.84/32  portmap tcp/udp 10000:20000

List of active sessions:
hobbes# ipftest
no rule file present
hobbes# ipfstat
ioctl(SIOCGETFS): Invalid argument

	I noticed this in the ipfstat(8) man page:

DESCRIPTION
       ipfstat examines /dev/kmem using  the  symbols  _fr_flags,
       _frstats,  _filterin, and _filterout.  To run and work, it
       needs to be able to read both  /dev/kmem  and  the  kernel
       itself.  The kernel name defaults to /vmunix.

       The  default  behaviour of ipfstat is to retrieve and dis-
       play the accumulated statistics which  have  been  accumu-
       lated  over time as the kernel has put packets through the
       filter.

---
	Is this still true?? Because for NetBSD nowadays, I KNOW the
kernel's name isn't /vmunix ;-) If it IS, I'm thinking that there needs to
be something updated ;-)

	Thanks for any help in advance... 

	Ryan



------- start named.boot ------

sortlist 10.0.0.0

options forward-only fake-iquery

directory       /etc/namedb

; type    domain                source host/file                backup
file

cache     .							hobbes.cache
primary   0.0.127.IN-ADDR.ARPA  localhost.rev
primary   woo.net               woonet
;secondary 0.0.10.IN-ADDR.ARPA   0.0.10.in-addr.arpa
; I kept getting errors when I used this secondary entry


-------- start woonet -------

; woo.net test domain stuff

@       IN      SOA     woo.net. hobbes.woo.net. (
                                1997112402      ; Serial (YYYYMMDDHH)
                                3600            ; Refresh
                                1000            ; Retry
                                3600000         ; Expire
                                3600 )          ; Minimum
                NS      hobbes.woo.net.

localhost       A       127.0.0.1
woo.net.        A       10.0.0.3
www             A       10.0.0.3
mail            A       10.0.0.3
news            A       10.0.0.3
hobbes          A       10.0.0.3
yoda            A       10.0.0.2
brahms          A       10.0.0.1
newton          A       10.0.0.4


-------- start localhost.rev ------

@       IN      SOA     hobbes.woo.net. hobbes.woo.net.  (
                                1.4     ; Serial
                                3600    ; Refresh
                                300     ; Retry
                                3600000 ; Expire
                                3600 )  ; Minimum
        IN      NS      hobbes.woo.net.
1       IN      PTR     localhost.woo.net.


--------- start hobbes.cache --------
; btw, I replaced the root.cache file with this file since at first this
; was just an internal name server.... should I replace hobbes.cache with
; root.cache again?

; LAN-only cache file for name resolver
;
;
.                        3600000  IN  NS    hobbes.woo.net.
hobbes.woo.net.      3600000      A     10.0.0.3

;
; End of File


----- start 0.0.in-addr.arpa ------

@               IN      SOA     woo.net. hobbes.woo.net. (
                                1997121219       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                172800) ; Minimum TTL
                        NS      hobbes.woo.net.
1                IN     PTR     brahms.woo.net.
2                IN     PTR     yoda.woo.net.
3                IN     PTR     hobbes.woo.net.
4                IN     PTR     newton.woo.net.


------- end files ------

-----
HELO... my name is rewt... you have SIGKILLed my father... prepare to vi!