Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2007 12:57:13 -0500
From:      "Michael R. Wayne" <wayne@staff.msen.com>
To:        freebsd-questions@freebsd.org
Subject:   natd and jails for multipel IP addresses
Message-ID:  <20070312175713.GF16373@manor.msen.com>

next in thread | raw e-mail | index | archive | help
I'm trying to add a second IP address to an existing jail
using natd and I must be missing something.  

Setup:
   HOST_IP	The host, attached to fxp0
   JAIL_IP	The existing, working jail
   2ND_IP	The IP address I'm trying to natd to the jail

I've got ipfw rules to catch traffic to/from the new IP and nothing
blocking them:
   00300 divert 8668 ip from any to 2ND_IP via fxp0
   00310 divert 8668 ip from 2ND_IP to any via fxp0

natd is running with:
   /sbin/natd -log -verbose -redirect_address JAIL_IP 2ND_IP -alias_address JAIL_IP

But, natd seems to be translating the source, not the dest IP:
   % ping 2ND_IP
yields:
   Out {default}[ICMP] [ICMP] HOST_IP -> 2ND_IP 8(0) aliased to
	      [ICMP] JAIL_IP -> 2ND_IP 8(0)

Whereas, I would expect this to do:
   HOST_IP -> 2ND_IP
translated to
   HOST_IP -> JAIL_IP
and the reverse.

WTH am I missing here?

/\/\ \/\/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070312175713.GF16373>