Subject: Ipnat
To: None <netbsd-help@NetBSD.ORG>
From: Amergin <amergin@wwa.com>
List: netbsd-help
Date: 11/02/2001 22:01:52
I am working on trying to get ipnat running correctly and I'm running into
problems. This is the first time I've tried using this on "odd" subnets.

In this case it's x.x.x.224/27

On the inside I setup a rfc 1918 subnet of 192.168.1.224/27

The internal nic is 192.168.1.226 the outside nic is x.x.x.226
The outside gateway is x.x.x.225

Here is my current ipnat rule base.

map ed3 192.168.1.224/27  -> x.x.x.224/27 


Now the problem I am having is that when addressing an internal machine it
responds to x.x.x.225 and not to 192.168.1.226 

For instance in response to telnet session on port 5555 from the firewall 
itself on 192.168.1.226:


tcpdump: listening on ed3 [ed3 is internal nic]

22:50:44.075318 x.x.x.225.1027 > 192.168.1.229.5555: S
2796691401:2796691401(0) win 16384 <mss 1460> (DF) [tos 0x10] 

22:50:44.076088 192.168.1.229.5555 > x.x.x.225.1027: R 0:0(0) ack
2796691402 win 0

22:50:47.072592 x.x.x.225.1027 > 192.168.1.229.5555: S
2796691401:2796691401(0) win 16384 <mss 1460> (DF) [tos 0x10] 

22:50:47.073484 192.168.1.229.5555 > x.x.x.225.1027: R 0:0(0) ack 1
win 0


Here is the output of 'ipnat -l' immediately after:


List of active MAP/Redirect filters:
map ed3 192.168.1.224/27  -> x.x.x.224/27 

List of active sessions:
MAP 192.168.1.226   1027  <- -> x.x.x.225   1027  [192.168.1.229 5555]
MAP 192.168.1.226   1026  <- -> x.x.x.225   1026  [192.168.1.229 5555]


Any suggestions are extremely welcome. Am I missing something blaringly
obvious?

Thanks,
Ken