Subject: RE: gateway setup [1.6.2 / i386]
To: , <netbsd-help@netbsd.org>
From: Conrad T. Pino <NetBSD-Current@Pino.com>
List: netbsd-help
Date: 06/03/2004 18:17:45
> From: mark@theswamp.org
>  
> my setup looks like this  
> --inet-->gateway(netbsd)-->switch-->PC's 
>  
> I have a static IP also. 
>  
> __ hosts (files) 
> 24.xx.208.46 fred.theswamp.org 
> ::1          localhost 
> 127.0.0.1    localhost 
>  
> __ mygate 
> 24.xx.208.45 

Take note this IP address *not* available for NAT mapping!!!

> __ myname 
> fred.theswamp.org 
>  
> __ resolv.conf 
> domain      fred.theswamp.org 
> nameserver  65.xx.1.65 
> nameserver  65.xx.1.70 
>  
> __ ifconfig.rtk0 
> inet 24.xx.208.46 netmask 255.255.255.252 
>  
> __ ifconfig.tlp0 
> inet 192.168.131.5 netmask 255.255.255.255 

This netmask doesn't agree with "ipnat.conf" netmask:

	255.255.255.255 != /24
	255.255.255.255 == /32

I think you want:

	/24 == 255.255.255.0

> __ ipnat.conf 
> map rtk0 192.168.131.0/24 -> 24.xx.208.46/30 proxy port ftp ftp/tcp 
> map rtk0 192.168.131.0/24 -> 24.xx.208.46/30 portmap tcp/udp auto 
> map rtk0 192.168.131.0/24 -> 24.xx.208.46/30  

I don't think the above will work since this maps to these addresses:

	24.xx.208.45
	24.xx.208.46

and top one is the public default gateway.  Try:

	map rtk0 192.168.131.0/24 -> 24.xx.208.46/32 proxy port ftp ftp/tcp 
	map rtk0 192.168.131.0/24 -> 24.xx.208.46/32 portmap tcp/udp auto 
	map rtk0 192.168.131.0/24 -> 24.xx.208.46/32

> __ ipf.conf 
> pass in quick on rtk0 
> pass out quick on rtk0 
> pass out quick on tlp0 
> pass in quick on tlp0 
> pass out quick on lo0 
> pass in quick on lo0 
> ## also tried 
> ## block in all 
> ## pass  in all 

This is good for now until the above are worked out.