advanced routing q
Erez D
erez0001 at gmail.com
Wed Sep 5 08:28:44 IDT 2012
On Mon, Aug 20, 2012 at 10:52 AM, shimi <linux-il at shimi.net> wrote:
>
> On Aug 20, 2012 9:34 AM, "Erez D" <erez0001 at gmail.com> wrote:
> >
> > hello
> >
> >
> > i have a server with two eth ports, each connects to a different router,
> and then to the internet.
> > i want all normal trafic to the internet to go via router 1 (eth0), so i
> added a default route to it
> > i want connections TCP coming from all over the internet to the second
> router(eth1), to be accepted.
> >
> > the problem is that altough connections are coming from eth1, due to the
> default route, they are answered from eth0, which means a tcp connection
> can not be established.
> > i know that linux has a conntrack module, can i use it to tell the
> kernel to answer on the same eth it got SYN from ?
>
> Are the two ports on the same netblock?
>
what do you mean by that ?
> If so, can they be separated to two non overlapping blocks?
>
didn't get that
i have many clients from many differnet ips connecting to my server. the
server has two eth interfaces, with many ports open.
there is no relation between eth and port, the same port can receive
connections from either interface.
i just want to route the relayed packets of the same connection to the eth
the syn packet came from.
> If so, I believe that would solve your problem...
>
> Otherwise, two listeners and an 'ip rule from <2nd ip> lookup <alt.
> routing table>'[*], would probably do the trick...
>
> [*] syntax by heart, consult man page to be sure
>
> --
> Shimi from Samsung Galaxy S II
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20120905/d6ac362e/attachment.html>
More information about the Linux-il
mailing list