NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ipnat problem with two LAN networks

On 24 January 2012 12:55, Frank Wille <> wrote:
> Hi,
> I have a problem with ipnat, when I try to make connections between two
> different networks on the LAN. The configuration is like this:
> My simple ipnat.conf for this task looks like this (where vr0 is the
> interface on the net):
> map vr0 -> 0/32 proxy port ftp ftp/tcp
> map vr0 -> 0/32 portmap tcp/udp 40000:60000
> map vr0 -> 0/32
> Now I have the problem that I can ping from, but
> no TCP connection is possible. tcpdump shows a connection to
> but the reply is coming from, which I think is normal,
> because of the NAT. But nothing happens.
Sorry if I'm missing something but can't you just do:-

map vr0 from to ! -> 0/32

I've not tried this but ipnat(5) seems to suggest it's a valid rule:

       Matching  of  packets  has now been extended to allow more complex com-
       pares.  In place of the address  which  is  to  be  translated,  an  IP
       address  and  port number comparison can be made using the same expres-
       sions available with ipf.  A simple NAT rule could be written as:

       map de0 ->

       or as

       map de0 from to any ->



Home | Main Index | Thread Index | Old Index