[CentOS] Addressing outgoing connections to a specific interface
lowen at pari.edu
Sat Nov 6 18:51:48 UTC 2010
On Nov 6, 2010, at 9:04 AM, Dotan Cohen wrote:
> Both connections have router on the 192.168.0.1
> Although I need to stay connected to the wireless router, can I still
> access the address 192.168.0.1 on the wired interface?
What you want is a NAT to take, say, 192.168.1.0/24 and translate it
to the eth0 192.168.0.0/24 network, where the translation occurs at
the egress of eth0 (that is, the 192.168.1.0/24 route is set to go out
eth0, and the egress (and by extension the ingress) traffic gets
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 192.168.1.1 and it would get
translated to 192.168.0.1 at the eth0 point and wouldn't interfere
with the wlan0 version of the 192.168.0.1 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.
More information about the CentOS