# New setup and can't get IPNAT "bimap" to work



## Festavis (Apr 11, 2012)

This is my first setup of IPNAT, for Freebsd FreeBSD.  I believe I have followed the instructions correctly, but can't seem to get IPNAT's "bimap" to work.  If someone could please tell me, where I have messed up, I would be most grateful.

I have changed my configuration file to include the line:


```
options IPFILTER
```

I have changed my /etc/rc.conf file to include the lines:


```
gateway_enable="YES"
ipnat_enable="YES"
```

I have a rules file, that I am currently loading by hand, with this:


```
bimap 10.0.252.2/32 -> 10.0.3.3/32
bimap 10.0.252.3/32 -> 10.0.3.4/32
```

The test environment I have set up for this looks like this (the addresses in parentheses are what I want computer A to see):


```
Computer A
[ 10.0.3.1 ]
     |
     |
[ 10.0.3.2 ]
 Computer B
[10.0.252.1]
     |
     +---------------+
     |               |
[10.0.252.2]    [10.0.252.3]
 Computer C      Computer D
( 10.0.3.3 )    ( 10.0.3.4 )
```
I have a telnet server running on computer C and can get to it, via computer D, with the address 10.0.252.2.  When I try to get to computer C, via computer A, with the address 10.0.3.3, I get nothing.  I have no special routing set up, so when computer A tries for address 10.0.3.3, the ARP request never gets a response (I thought computer B would have responded, because of the NAT).

Thanks,
 Festavis


----------



## RusDyr (Apr 17, 2012)

Is the*re* any reason why you use IPNAT instead of the widely-used libalias-based (natd/ipfw nat/ng_nat) or OpenBSD' ported (pf nat)? I'm afraid that IPNAT is really outdated.


----------



## Festavis (Apr 18, 2012)

It is what is in the design specifications.


----------



## RusDyr (Apr 19, 2012)

So it's wrong design, don't be afraid to change it before it would made in software.


----------



## Rudy (Apr 21, 2012)

*Documentation Bug*



			
				RusDyr said:
			
		

> Is the*re* any reason why you use IPNAT instead of the widely-used libalias-based (natd/ipfw nat/ng_nat) or OpenBSD' ported (pf nat)? I'm afraid that IPNAT is really outdated.



Many people use ipnat as ipfw_nat used to not exist and there was only the divert-to-userland-natd which doesn't scale.  Years ago (back in FreeBSD 4), ipnat was a fast alternative as it was in kernel.  At some point ipnat fell to the wayside, yet the documentation in FreeBSD stayed the same.

Really it is a documentation bug that the man page for ipnat(8) doesn't say (in big bold letters):
**** WARNING IPNAT IS DEPRECATED SOFTWARE, MIGRATE TO IFPW_NAT ****

To help you along, Festavis, here is a reference on migrating from ipnat to ipfw_nat.


----------

