[CentOS] Addressing outgoing connections to a specific interface

Dotan Cohen dotancohen at gmail.com
Sat Nov 6 20:05:07 UTC 2010

On Sat, Nov 6, 2010 at 20:51, Lamar Owen <lowen at pari.edu> wrote:
> On Nov 6, 2010, at 9:04 AM, Dotan Cohen wrote:
>> Both connections have router on  the
>> address.
>> Although I need to stay connected to the wireless router, can I still
>> access the address on the wired interface?
> What you want is a NAT to take, say, and translate it
> to the eth0 network, where the translation occurs at
> the egress of eth0 (that is, the route is set to go out
> eth0, and the egress (and by extension the ingress) traffic gets
> translated.
> How you would do this in iptables I'm not sure; I've done it with
> Cisco hardware, as this is a common issue when joining two RFC 1918
> networks together that have overlapping address space.
> But at the end you would access and it would get
> translated to at the eth0 point and wouldn't interfere
> with the wlan0 version of the address.  I'm not exactly
> 100% sure it can be done without an external NAT box, but a small
> external router that can do NAT would make it much easier.

That is not what I am trying to do, I will try to rephrase:
I have a laptop connected to two network interfaces: eth0 and wlan0.
Each interface connects to a different LAN. Both LANs have machines on
the address that I must access via port 80 in a web

I don't need to access each one at the same time, but I do need to
leave both interfaces up for other software running on this machine.
CentOS 5.5, Dell Inspiron laptop.

I suppose that I need either:

1) An address system such as eth0: and wlan0:
(syntax invented to illustrate idea, it doesn't really work!)


2) A way to do something like this as a user without affecting other users:
$ export INTERFACE=eth0
$ lynx
$ export INTERFACE=wlan0
$ lynx


3) A pony.

Dotan Cohen


More information about the CentOS mailing list