How to force a connection to go out of machine?

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Thu May 16 21:33:07 UTC 2013


On Thu, May 16, 2013 at 04:49:10PM -0400, James Knott wrote:
> William Park wrote:
> >Normally, the machine simply route the connection internally.  But, I
> >need it to go to the router on "wlan0" and then back to me on "eth0",
> >and vice versa.
> 
> That's not likely to happen for a couple of reasons.
> 
> 1) Since the two addresses are on the same subnet, there's no
> routing involved.
> 2) The computer will recognize the destination is itself and not
> send anything out through either NIC.

I guess I can set wlan0 and eth0 on different subnet, ie.
    wlan0 = 192.168.1.3
    eth0 = 192.168.2.3
which means I have to add a routing entry on the router for 192.168.2
network.  Still, I can't get it to go out of my machine.

Googling... I found references to "marking" the packet using iptables,
and then using "iproute2" to route it.  But, it seems convoluted.
-- 
William
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list