Subject: Re: NAT problem:((
To: None <netbsd-help@netbsd.org>
From: BASTIEN Nicolas Bruno <lakomok@free.fr>
List: netbsd-help
Date: 02/10/2002 14:23:38
Y a nesti (nestlikos@wp.pl) qui m'disait que ...
> hi, 
> my NAT doesn't work:(((
> could anyone tell me why?

> i try to ping 194.204.159.1 from 192.168.1.2 and it doesn't work, 
> but ping from 192.168.1.2 to 192.168.1.1 works.
> so what's wrong with my ipnat configuraion? :


> ifconfig  ne2 & ppp0 :

> ne2: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>     address: 00:c0:26:b6:23:ae
>     media: Ethernet autoselect (10baseT)
>     inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
>     inet6 fe80::2c0:26ff:feb6:23ae%ne2 prefixlen 64 scopeid 0x1

> ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1656
>     inet 217.96.203.150 -> 217.96.203.150 netmask 0xffffff00
>     inet6 fe80::2c0:26ff:feb6:23ae%ppp0 -> :: prefixlen 64 scopeid 0x3



> cat /etc/ipf.rules:

> pass in from any to any
> pass out from any to any



> I run ipnat :

> ipf -Fa -f /etc/ipf.rules -E
> ipnat -CF -f /etc/ipnat.rules


> then ipnat -l:

> List of active MAP/Redirect filters:
> map ppp0 192.168.1.2/32  -> 217.96.203.150/32  portmap tcp/udp 40000:60000
> map ppp0 192.168.1.2/32  -> 217.96.203.150/32 
> map ppp0 192.168.1.2/32  -> 217.96.203.150/32  proxy port ftp ftp/tcp



> HELP ME PLEASE!!

> Thanks;>

Have set the netbsd machine as default gateway for the other
machines in your local network ?

because it seams good, I do the same and it works

PS: if you want to NAT any machine in your local network

map ppp0 192.168.1.0/24 -> 217.96.203.150/32

map a network instead of a machine
-- 
Nicolas Bruno BASTIEN
 May NetBSD be with you