question about routes

Navindra Umanee <[email protected]>
Newsgroups gmane.comp.kde.cafe
Message-ID <[email protected]>
Can I easily tell Linux to respond to *any* external request on the
same interface from which they were received but, if an internal
request is made for an external resource, route it over whatever
interface I specify?

For example:

CLIENT makes connection to SERVER through CLIENT's normal ethernet
connection.  SERVER should respond back through the same eth0
interface.

But if SERVER tries to make a new connection to CLIENT, it should take
the static default route which is through the ppp0 interface, not the
eth0 interface.

What I *don't* want is for SERVER to respond to CLIENT through ppp0 if
the original request came from eth0 because then the response would
come from the wrong IP!

This is what my routing table currently looks like:

[navindra@localhost daemons]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
216.46.1.3      0.0.0.0         255.255.255.255 UH    0      0        0 eth0
131.246.103.200 216.46.1.3      255.255.255.255 UGH   0      0        0 eth0
131.246.103.200 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
0.0.0.0         131.246.103.200 0.0.0.0         UG    0      0        0 ppp0

When I make external connections from SERVER it goes through ppp0 and
it works fine.  But nothing can connect to me because the request
comes through eth0 and the response goes through ppp0.

You help could be *invaluable*.

Thanks,
Navin.

Kde-cafe mailing list - [email protected]
http://ofb.biz/lists/listinfo.cgi/kde-cafe

DISCLAIMER: The views expressed on this mailinglist are the personal
opinions of the author and do not represent OfB.biz: Open for Business, KDE or the author's employer.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.