[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem getting the right IP (NAT & Linux vservers)
From: |
Chris Edillon |
Subject: |
Re: Problem getting the right IP (NAT & Linux vservers) |
Date: |
Sat, 27 Nov 2004 08:08:27 -0500 |
On Fri, 2004-11-26 at 08:22, Henrik Christian Grove wrote:
> I can imagine three ways of doing it:
> 1. Doing some regexp substitution on public IP, transforming it to the
> internal.
> 2. Querying interfaces until an IP is found (try eth0, then
> eth0:<hostname>).
> 3. Querying the first existing interface from a list
> (place eyth0:hostname before eth0).
>
> Unfortunately I can't figure out how to do either.
>
since there is a 1-to-1 mapping, you could write a module
which determines the external interface address, and returns
a macro whose value is the respective internal address.
chris