Re: Recognizing traffic from multiple gateways
Holden Hao <[email protected]> Sat, 2 Jul 2016 16:36:28 +0800
| Newsgroups | gmane.org.user-groups.linux.philippine |
|---|---|
| Message-ID | <CAJNnNY=rUhHiPRnj01cuV=64B5TQOUkW0J5f+8hU2Y7g1t-mvg@mail.gmail.com> |
--===============0532045871450801613== Content-Type: multipart/alternative; boundary=001a1142fff0d9e3cb0536a2ffff --001a1142fff0d9e3cb0536a2ffff Content-Type: text/plain; charset=UTF-8 I have not implemented this my self but I have read that Haproxy, a load balancer, can do this as well. Haproxy will send the reply using the interface where the requests came from. Holden On Jul 2, 2016 1:37 PM, "Michael Tinsay" <tinsami1-/[email protected]> wrote: > Thank you for the info fooler. > > I get what you're saying about policy-based routing, but isn't that > applicable only to connections initiated by the server? Can policy-based > routing also do "All connections initiated externally and coming through > the router ip address so-and-so goes through that router"? > > > ------------------------------ > *From:* fooler mail <[email protected]> > *To:* Michael Tinsay <tinsami1-/[email protected]>; Philippine Linux Users' Group > (PLUG) Technical Discussion List <[email protected]> > *Sent:* Saturday, 2 July 2016, 11:33 > *Subject:* Re: [plug] Recognizing traffic from multiple gateways > > that is correct because traffic came from router A and B use the main > routing table... your solution is to use policy based routing.... > create additional two routing table aside from the default or main > routing table.. for incoming traffic for A or B.... mark or tag it ... > upon out going.. your policy rule state that packet tag for A goes to > gateway of A and tag for B goes to gateway of B.. non tag packets > goes to the main routing table's default gateway... > > fooler. > > > > On Thu, Jun 30, 2016 at 3:05 AM, Michael Tinsay <tinsami1-/[email protected]> > wrote: > > Ooops... My bad. I sent the email without putting a subject. Please > reply > > to this one instead. > > > > > > ________________________________ > > From: Michael Tinsay <tinsami1-/[email protected]> > > To: "Philippine Linux Users' Group (PLUG) Technical Discussion List" > > <[email protected]> > > Sent: Thursday, 30 June 2016, 15:03 > > Subject: > > > > Hi. > > > > Have a question for the tcp/ip experts here. > > > > I recently had to split my various DSL lines between 2 routers. So > Router A > > have 3 lines connected to it while Router B has 2. I now have a server > who > > will be receiving external traffic through these servers via port > > forwarding. As I understand it, without any additional configuration the > > server will send outside-bound traffic through via the default route. As > > such, if Router A is the default route for the server, even if the > traffic > > came from Router B the responses will be sent via Router A. > > > > If this is correct, what do I need to set up to have the server recognize > > which traffic is coming from which router and send its responses to the > > proper router accordingly? > > > > TIA! > > > > > > --- mike t. > > > > > > > > > _________________________________________________ > > Philippine Linux Users' Group (PLUG) Mailing List > > http://lists.linux.org.ph/mailman/listinfo/plug > > Searchable Archives: http://archives.free.net.ph > _________________________________________________ > Philippine Linux Users' Group (PLUG) Mailing List > http://lists.linux.org.ph/mailman/listinfo/plug > Searchable Archives: http://archives.free.net.ph > > > > > _________________________________________________ > Philippine Linux Users' Group (PLUG) Mailing List > http://lists.linux.org.ph/mailman/listinfo/plug > Searchable Archives: http://archives.free.net.ph > --001a1142fff0d9e3cb0536a2ffff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p dir=3D"ltr">I have not implemented this my self but I have read that Hap= roxy, a load balancer, can do this as well. Haproxy will send the reply usi= ng the interface where the requests came from.<br></p> <p dir=3D"ltr">Holden<br> </p> <div class=3D"gmail_quote">On Jul 2, 2016 1:37 PM, "Michael Tinsay&quo= t; <<a href=3D"mailto:tinsami1-/[email protected]">tinsami1-/[email protected]</a>> wro= te:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"marg= in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style= =3D"color:#000;background-color:#fff;font-family:Courier New,courier,monaco= ,monospace,sans-serif;font-size:10px"><div>Thank you for the info fooler.</= div><div><br></div><div>I get what you're saying about policy-based rou= ting, but isn't that applicable only to connections initiated by the se= rver?=C2=A0 Can policy-based routing also do "All connections initiate= d externally and coming through the router ip address so-and-so goes throug= h that router"?</div><div><br><br></div><div style=3D"display:block"> = <div style=3D"font-family:Courier New,courier,monaco,monospace,sans-serif;= font-size:10px"> <div style=3D"font-family:HelveticaNeue,Helvetica Neue,Hel= vetica,Arial,Lucida Grande,Sans-Serif;font-size:16px"> <div dir=3D"ltr"> <f= ont size=3D"2" face=3D"Arial"> <hr size=3D"1"> <b><span style=3D"font-weigh= t:bold">From:</span></b> fooler mail <<a href=3D"mailto:fooler.mail@gmai= l.com">[email protected]</a>><br> <b><span style=3D"font-weight:bold= ">To:</span></b> Michael Tinsay <<a href=3D"mailto:tinsami1-/[email protected]">t= insami1-/[email protected]</a>>; Philippine Linux Users' Group (PLUG) Technic= al Discussion List <<a href=3D"mailto:[email protected]">plug@list= s.linux.org.ph</a>> <br> <b><span style=3D"font-weight:bold">Sent:</span= ></b> Saturday, 2 July 2016, 11:33<br> <b><span style=3D"font-weight:bold">= Subject:</span></b> Re: [plug] Recognizing traffic from multiple gateways<b= r> </font> </div> <div><br>that is correct because traffic came from router= A and B use the main<br clear=3D"none">routing table... your solution is t= o use policy based routing....<br clear=3D"none">create additional two rout= ing table aside from the default or main<br clear=3D"none">routing table.. = for incoming traffic for A or B.... mark or tag it ...<br clear=3D"none">up= on out going.. your policy rule state that packet tag for A goes to<br clea= r=3D"none">gateway of=C2=A0 A and tag for B goes to gateway of B.. non tag = packets<br clear=3D"none">goes to the main routing table's default gate= way...<br clear=3D"none"><br clear=3D"none">fooler.<br clear=3D"none"><br c= lear=3D"none"><br clear=3D"none"><div><br clear=3D"none">On Thu, Jun 30, 20= 16 at 3:05 AM, Michael Tinsay <<a shape=3D"rect">tinsami1-/[email protected]</a>&= gt; wrote:<br clear=3D"none">> Ooops...=C2=A0 My bad. I sent the email w= ithout putting a subject.=C2=A0 Please reply<br clear=3D"none">> to this= one instead.<br clear=3D"none">><br clear=3D"none">><br clear=3D"non= e">> ________________________________<br clear=3D"none">> From: Micha= el Tinsay <<a shape=3D"rect">tinsami1-/[email protected]</a>><br clear=3D"none= ">> To: "Philippine Linux Users' Group (PLUG) Technical Discuss= ion List"<br clear=3D"none">> <<a shape=3D"rect">[email protected]= x.org.ph</a>><br clear=3D"none">> Sent: Thursday, 30 June 2016, 15:03= <br clear=3D"none">> Subject:<br clear=3D"none">><br clear=3D"none">&= gt; Hi.<br clear=3D"none">><br clear=3D"none">> Have a question for t= he tcp/ip experts here.<br clear=3D"none">><br clear=3D"none">> I rec= ently had to split my various DSL lines between 2 routers. So Router A<br c= lear=3D"none">> have 3 lines connected to it while Router B has 2.=C2=A0= I now have a server who<br clear=3D"none">> will be receiving external = traffic through these servers via port<br clear=3D"none">> forwarding.= =C2=A0 As I understand it, without any additional configuration the<br clea= r=3D"none">> server will send outside-bound traffic through via the defa= ult route.=C2=A0 As<br clear=3D"none">> such, if Router A is the default= route for the server, even if the traffic<br clear=3D"none">> came from= Router B the responses will be sent via Router A.<br clear=3D"none">><b= r clear=3D"none">> If this is correct, what do I need to set up to have = the server recognize<br clear=3D"none">> which traffic is coming from wh= ich router and send its responses to the<br clear=3D"none">> proper rout= er accordingly?<br clear=3D"none">><br clear=3D"none">> TIA!<br clear= =3D"none">><br clear=3D"none">><br clear=3D"none">> --- mike t.</d= iv><br clear=3D"none">><br clear=3D"none">><br clear=3D"none">><br= clear=3D"none">> _________________________________________________<br c= lear=3D"none">> Philippine Linux Users' Group (PLUG) Mailing List<br= clear=3D"none">> <a shape=3D"rect">http://lists.linux.org.ph/mailman/li= stinfo/plug</a><br clear=3D"none">> Searchable Archives: <a shape=3D"rec= t">http://archives.free.net.ph</a><br clear=3D"none">______________________= ___________________________<br clear=3D"none">Philippine Linux Users' G= roup (PLUG) Mailing List<br clear=3D"none"><a shape=3D"rect">http://lists.l= inux.org.ph/mailman/listinfo/plug</a><br clear=3D"none">Searchable Archives= : <a shape=3D"rect">http://archives.free.net.ph</a><div><br clear=3D"none">= </div><br><br></div> </div> </div> </div></div></div><br>_________________= ________________________________<br> Philippine Linux Users' Group (PLUG) Mailing List<br> <a href=3D"http://lists.linux.org.ph/mailman/listinfo/plug">http://lists.li= nux.org.ph/mailman/listinfo/plug</a><br> Searchable Archives: <a href=3D"http://archives.free.net.ph">http://archive= s.free.net.ph</a><br></blockquote></div> --001a1142fff0d9e3cb0536a2ffff-- --===============0532045871450801613== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List http://lists.linux.org.ph/mailman/listinfo/plug Searchable Archives: http://archives.free.net.ph --===============0532045871450801613==--