Jail with public IP alias

Alejandro Imass aimass at yabarana.com
Tue Aug 27 21:21:57 UTC 2013


On Tue, Aug 27, 2013 at 4:59 PM, Alejandro Imass <aimass at yabarana.com> wrote:
> Hi,
>
> I have a machine with several public IPs on the same NIC and I bound
> one of those IPs to a jail created with EzJail. Suppose the scenario
> is something like this:
>
> em0
> 190.100.100.1
> 190.100.100.2
> 190.100.100.3
> 190.100.100.4
>
> In the jail we are bound only to 190.100.100.4
>
> The default router is correctly set on the jail, etc.
>
> But when we ssh out of that jail, or send an email, the receiving end
> always sees 190.100.100.1 not 190.100.100.4 which is the IP the jail
> is bound to.


I think my problem is actually more basic than this. The problem
actually occurs on the base system as well and I think it's because
all the IPs are on the same subnet, then the kernel assumes to use the
primary IP as the source address. For the sake and usefulness of the
mail archives I will end this thread here and start another one with a
more appropriate title, not before researching to see if this can be
done with the routing table or if I need to use ipfw to re-write the
source address.

Thanks,

-- 
Alejandro Imass


More information about the freebsd-questions mailing list