server reply from the same NIC where the traffic comes in
How can I configure the server to reply/response via the same NIC(and gateway) from where the traffic/request came to the server
OS: SLES 11 SP2 x864
eth0 IP address: a.b.c.d
eth1 IP address: w.x.y.z www.example.com resolves into IP addres "a.b.c.d" www.example.com.local resolves into IP address "w.x.y.z"
eth0 has public and routable IP address(world accessible) while eth1 has public IP address but not accessible from outside the country.
Gateway IP address(use to communicate to the foreign customers): aa.bb.cc.dd and this is also the default Gateway
Gateway IP address(use to communicate to the local/nation wide customers): ww.xx.yy.zz this gateway will be use only to communicate with country wide customers
I am responsible to configure the linux box, so that the server will respond using the same NIC(and Gateway) from where the traffic comes .. i,e if a request hits the server on eth0, the server must reply to that request using the same nic i.e eth0 via gateway(aa.bb.cc.dd), likewise if a request hits the server on eth1, then server also respond using the same NIC i.e eth1 and gateway(ww.xx.yy.zz)
I went through the iproute2 manuals but unable to find the syntax for the issue