Re: Recognizing traffic from multiple gateways

Michael Tinsay <tinsami1-/[email protected]> Mon, 4 Jul 2016 07:57:36 +0000 (UTC)
Newsgroups gmane.org.user-groups.linux.philippine
Message-ID <[email protected]>
--===============4788678720042914335==
Content-Type: multipart/alternative; 
	boundary="----=_Part_1309165_1330513075.1467619056948"

------=_Part_1309165_1330513075.1467619056948
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thanks Holden. =C2=A0I'll take a look at HAProxy.

      From: Holden Hao <[email protected]>
 To: Philippine Linux Users' Group (PLUG) Technical Discussion List <plug@l=
ists.linux.org.ph>; Michael Tinsay <tinsami1-/[email protected]>=20
 Sent: Saturday, 2 July 2016, 16:36
 Subject: Re: [plug] Recognizing traffic from multiple gateways
  =20
I have not implemented this my self but I have read that Haproxy, a load ba=
lancer, can do this as well. Haproxy will send the reply using the interfac=
e 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 applica=
ble only to connections initiated by the server?=C2=A0 Can policy-based rou=
ting also do "All connections initiated externally and coming through the r=
outer ip address so-and-so goes through that router"?

      From: fooler mail <[email protected]>
 To: Michael Tinsay <tinsami1-/[email protected]>; Philippine Linux Users' Group (PL=
UG) Technical Discussion List <[email protected]>=20
 Sent: Saturday, 2 July 2016, 11:33
 Subject: Re: [plug] Recognizing traffic from multiple gateways
 =20
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=C2=A0 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...=C2=A0 My bad. I sent the email without putting a subject.=C2=A0 =
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.=C2=A0 I now have a ser=
ver who
> will be receiving external traffic through these servers via port
> forwarding.=C2=A0 As I understand it, without any additional configuratio=
n the
> server will send outside-bound traffic through via the default route.=C2=
=A0 As
> such, if Router A is the default route for the server, even if the traffi=
c
> 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


  =20
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph



  
------=_Part_1309165_1330513075.1467619056948
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div style=3D"color:#000; background-color:#fff; f=
ont-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10=
px"><div id=3D"yui_3_16_0_ym19_1_1467618935240_3980"><span id=3D"yui_3_16_0=
_ym19_1_1467618935240_4042">Thanks Holden. &nbsp;I'll take a look at HAProx=
y.</span></div><div class=3D"qtdSeparateBR" id=3D"yui_3_16_0_ym19_1_1467618=
935240_3981"><br><br></div><div class=3D"yahoo_quoted" id=3D"yui_3_16_0_ym1=
9_1_1467618935240_3986" style=3D"display: block;">  <div style=3D"font-fami=
ly: Courier New, courier, monaco, monospace, sans-serif; font-size: 10px;" =
id=3D"yui_3_16_0_ym19_1_1467618935240_3985"> <div style=3D"font-family: Hel=
veticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; fo=
nt-size: 16px;" id=3D"yui_3_16_0_ym19_1_1467618935240_3984"> <div dir=3D"lt=
r" id=3D"yui_3_16_0_ym19_1_1467618935240_3983"> <font size=3D"2" face=3D"Ar=
ial" id=3D"yui_3_16_0_ym19_1_1467618935240_3982"> <hr size=3D"1"> <b><span =
style=3D"font-weight:bold;">From:</span></b> Holden Hao &lt;holdenhao@gmail=
.com&gt;<br> <b><span style=3D"font-weight: bold;">To:</span></b> Philippin=
e Linux Users' Group (PLUG) Technical Discussion List &lt;[email protected]=
org.ph&gt;; Michael Tinsay &lt;tinsami1-/[email protected]&gt; <br> <b><span style=
=3D"font-weight: bold;">Sent:</span></b> Saturday, 2 July 2016, 16:36<br> <=
b><span style=3D"font-weight: bold;">Subject:</span></b> Re: [plug] Recogni=
zing traffic from multiple gateways<br> </font> </div> <div class=3D"y_msg_=
container" id=3D"yui_3_16_0_ym19_1_1467618935240_4043"><br><div id=3D"yiv63=
24217742"><div id=3D"yui_3_16_0_ym19_1_1467618935240_4045"><div dir=3D"ltr"=
 id=3D"yui_3_16_0_ym19_1_1467618935240_4044">I have not implemented this my=
 self but I have read that Haproxy, a load balancer, can do this as well. H=
aproxy will send the reply using the interface where the requests came from=
.<br clear=3D"none"></div>
<div dir=3D"ltr">Holden<br clear=3D"none">
</div>
<div class=3D"yiv6324217742gmail_quote" id=3D"yui_3_16_0_ym19_1_14676189352=
40_4046">On Jul 2, 2016 1:37 PM, "Michael Tinsay" &lt;<a rel=3D"nofollow" s=
hape=3D"rect" ymailto=3D"mailto:tinsami1-/[email protected]" target=3D"_blank" href=
=3D"mailto:tinsami1-/[email protected]">tinsami1-/[email protected]</a>&gt; wrote:<br clear=
=3D"none"><blockquote class=3D"yiv6324217742gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id=3D"yui_3_16_0_ym1=
9_1_1467618935240_4050"><div class=3D"yiv6324217742yqt5313150056" id=3D"yiv=
6324217742yqt71426"><div id=3D"yui_3_16_0_ym19_1_1467618935240_4049"><div s=
tyle=3D"color:#000;background-color:#fff;font-family:Courier New, courier, =
monaco, monospace, sans-serif;font-size:10px;" id=3D"yui_3_16_0_ym19_1_1467=
618935240_4048"><div id=3D"yui_3_16_0_ym19_1_1467618935240_4047">Thank you =
for the info fooler.</div><div id=3D"yui_3_16_0_ym19_1_1467618935240_4051">=
<br clear=3D"none"></div><div id=3D"yui_3_16_0_ym19_1_1467618935240_4052">I=
 get what you're saying about policy-based routing, but isn't that applicab=
le only to connections initiated by the server?&nbsp; Can policy-based rout=
ing also do "All connections initiated externally and coming through the ro=
uter ip address so-and-so goes through that router"?</div><div id=3D"yui_3_=
16_0_ym19_1_1467618935240_4053"><br clear=3D"none"><br clear=3D"none"></div=
><div style=3D"display:block;" id=3D"yui_3_16_0_ym19_1_1467618935240_4057">=
  <div style=3D"font-family:Courier New, courier, monaco, monospace, sans-s=
erif;font-size:10px;" id=3D"yui_3_16_0_ym19_1_1467618935240_4056"> <div sty=
le=3D"font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida G=
rande, Sans-Serif;font-size:16px;" id=3D"yui_3_16_0_ym19_1_1467618935240_40=
55"> <div dir=3D"ltr" id=3D"yui_3_16_0_ym19_1_1467618935240_4054"> <font si=
ze=3D"2" face=3D"Arial"> </font><hr size=3D"1"> <b id=3D"yui_3_16_0_ym19_1_=
1467618935240_4059"><span style=3D"font-weight:bold;" id=3D"yui_3_16_0_ym19=
_1_1467618935240_4058">From:</span></b> fooler mail &lt;<a rel=3D"nofollow"=
 shape=3D"rect" ymailto=3D"mailto:[email protected]" target=3D"_blank" =
href=3D"mailto:[email protected]">[email protected]</a>&gt;<br clea=
r=3D"none"> <b><span style=3D"font-weight:bold;">To:</span></b> Michael Tin=
say &lt;<a rel=3D"nofollow" shape=3D"rect" ymailto=3D"mailto:tinsami1@yahoo=
.com" target=3D"_blank" href=3D"mailto:tinsami1-/[email protected]">[email protected]=
om</a>&gt;; Philippine Linux Users' Group (PLUG) Technical Discussion List =
&lt;<a rel=3D"nofollow" shape=3D"rect" ymailto=3D"mailto:[email protected]=
rg.ph" target=3D"_blank" href=3D"mailto:[email protected]" id=3D"yui_=
3_16_0_ym19_1_1467618935240_4060">[email protected]</a>&gt; <br clear=
=3D"none"> <b id=3D"yui_3_16_0_ym19_1_1467618935240_4062"><span style=3D"fo=
nt-weight:bold;" id=3D"yui_3_16_0_ym19_1_1467618935240_4061">Sent:</span></=
b> Saturday, 2 July 2016, 11:33<br clear=3D"none"> <b><span style=3D"font-w=
eight:bold;">Subject:</span></b> Re: [plug] Recognizing traffic from multip=
le gateways<br clear=3D"none">  </div> <div><br clear=3D"none">that is corr=
ect because traffic came from router A and B use the main<br clear=3D"none"=
>routing table... your solution is to use policy based routing....<br clear=
=3D"none">create additional two routing table aside from the default or mai=
n<br clear=3D"none">routing table.. for incoming traffic for A or B.... mar=
k or tag it ...<br clear=3D"none">upon out going.. your policy rule state t=
hat packet tag for A goes to<br clear=3D"none">gateway of&nbsp; A and tag f=
or B goes to gateway of B.. non tag packets<br clear=3D"none">goes to the m=
ain routing table's default gateway...<br clear=3D"none"><br clear=3D"none"=
>fooler.<br clear=3D"none"><br clear=3D"none"><br clear=3D"none"><div><br c=
lear=3D"none">On Thu, Jun 30, 2016 at 3:05 AM, Michael Tinsay &lt;<a rel=3D=
"nofollow" shape=3D"rect" href=3D"">tinsami1-/[email protected]</a>&gt; wrote:<br cl=
ear=3D"none">&gt; Ooops...&nbsp; My bad. I sent the email without putting a=
 subject.&nbsp; Please reply<br clear=3D"none">&gt; to this one instead.<br=
 clear=3D"none">&gt;<br clear=3D"none">&gt;<br clear=3D"none">&gt; ________=
________________________<br clear=3D"none">&gt; From: Michael Tinsay &lt;<a=
 rel=3D"nofollow" shape=3D"rect" href=3D"">tinsami1-/[email protected]</a>&gt;<br cl=
ear=3D"none">&gt; To: "Philippine Linux Users' Group (PLUG) Technical Discu=
ssion List"<br clear=3D"none">&gt; &lt;<a rel=3D"nofollow" shape=3D"rect" h=
ref=3D"">[email protected]</a>&gt;<br clear=3D"none">&gt; Sent: Thurs=
day, 30 June 2016, 15:03<br clear=3D"none">&gt; Subject:<br clear=3D"none">=
&gt;<br clear=3D"none">&gt; Hi.<br clear=3D"none">&gt;<br clear=3D"none">&g=
t; Have a question for the tcp/ip experts here.<br clear=3D"none">&gt;<br c=
lear=3D"none">&gt; I recently had to split my various DSL lines between 2 r=
outers. So Router A<br clear=3D"none">&gt; have 3 lines connected to it whi=
le Router B has 2.&nbsp; I now have a server who<br clear=3D"none">&gt; wil=
l be receiving external traffic through these servers via port<br clear=3D"=
none">&gt; forwarding.&nbsp; As I understand it, without any additional con=
figuration the<br clear=3D"none">&gt; server will send outside-bound traffi=
c through via the default route.&nbsp; As<br clear=3D"none">&gt; such, if R=
outer A is the default route for the server, even if the traffic<br clear=
=3D"none">&gt; came from Router B the responses will be sent via Router A.<=
br clear=3D"none">&gt;<br clear=3D"none">&gt; If this is correct, what do I=
 need to set up to have the server recognize<br clear=3D"none">&gt; which t=
raffic is coming from which router and send its responses to the<br clear=
=3D"none">&gt; proper router accordingly?<br clear=3D"none">&gt;<br clear=
=3D"none">&gt; TIA!<br clear=3D"none">&gt;<br clear=3D"none">&gt;<br clear=
=3D"none">&gt; --- mike t.</div><br clear=3D"none">&gt;<br clear=3D"none">&=
gt;<br clear=3D"none">&gt;<br clear=3D"none">&gt; _________________________=
________________________<br clear=3D"none">&gt; Philippine Linux Users' Gro=
up (PLUG) Mailing List<br clear=3D"none">&gt; <a rel=3D"nofollow" shape=3D"=
rect" href=3D"">http://lists.linux.org.ph/mailman/listinfo/plug</a><br clea=
r=3D"none">&gt; Searchable Archives: <a rel=3D"nofollow" shape=3D"rect" hre=
f=3D"">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 rel=3D"nofollow" shape=3D"rec=
t" href=3D"">http://lists.linux.org.ph/mailman/listinfo/plug</a><br clear=
=3D"none">Searchable Archives: <a rel=3D"nofollow" shape=3D"rect" href=3D""=
>http://archives.free.net.ph</a><div><br clear=3D"none"></div><br clear=3D"=
none"><br clear=3D"none"></div> </div> </div>  </div></div></div></div><br =
clear=3D"none">_________________________________________________<br clear=
=3D"none">
Philippine Linux Users' Group (PLUG) Mailing List<br clear=3D"none">
<a rel=3D"nofollow" shape=3D"rect" target=3D"_blank" href=3D"http://lists.l=
inux.org.ph/mailman/listinfo/plug">http://lists.linux.org.ph/mailman/listin=
fo/plug</a><br clear=3D"none">
Searchable Archives: <a rel=3D"nofollow" shape=3D"rect" target=3D"_blank" h=
ref=3D"http://archives.free.net.ph/">http://archives.free.net.ph</a><br cle=
ar=3D"none"></blockquote></div></div></div><br><br></div> </div> </div>  </=
div></div></body></html>
------=_Part_1309165_1330513075.1467619056948--

--===============4788678720042914335==
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
--===============4788678720042914335==--