Subject: gateway with IPNAT
To: None <netbsd-help@netbsd.org>
From: Vojko Kercan <vojkokercan@gmail.com>
List: netbsd-help
Date: 02/08/2006 18:31:02
After reading the manuals, forums and mailing lists...I still haven't
found what is wrong with my IPNAT configuration. Hopefully...somebody
will know what I have missed.
Objective: set up a gateway machine to share a single internet connection
Gateway: NetBSD 3.0 i386
Clients: Linux, Win
(1) Gateway settings
NIC 1 - rtk1 - connected to ISP via DHCP
NIC 2 - rtk0 - connected to internal network via switch
/etc/ifconfig.xxN
rtk1: !dhclient $int
rtk0: inet 10.0.0.1 netmask 0xffffff00
ifconfig output
rtk1: inet 213.143.79.9 netmask 0xffffff00 broadcast 213.143.79.255
rtk0: inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
/etc/ipf.conf
pass in from any to any
pass out from any to any
/etc/ipnat.conf
map rtk1 10.0.0.0/24 -> 213.143.79.9/32 proxy port ftp ftp/tcp
map rtk1 10.0.0.0/24 -> 213.143.79.9/32 portmap tcp/udp 40000:60000
map rtk1 10.0.0.0/24 -> 213.143.79.9/32
/etc/sysctl.conf
net.inet.ip.forwarding=3D1
/etc/rc.conf
ipfilter=3DYES
ipnat=3DYES
(2) Client settings
IP: 10.0.0.2
Gateway: 10.0.0.1
Of course, gateway can access the internet, and ping gateway < - >
client works OK, yet internet is still not available on client
machine.
What did I miss?
Many thanx in advance, Vojko.