Operating System - Linux
1757642 Members
2868 Online
108862 Solutions
New Discussion

server response from the same nic, where the traffic comes

 
likeguru
Occasional Contributor

server response from the same nic, where the traffic comes

How can I configure the server to reply/response via the same NIC from where the traffic/request came to the server.

kernel version 2.6.34

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.

our country wide customers access the server via  www.example.com.local   ... while  our foreign customers will access the server using   www.example.com   address.

I am responsible to configure the linux box, so that the server will respond using the same nic 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, likewise if a request hits the server on eth1, then server also respond using the same NIC i.e eth1

I went through the iproute2 manualls but unable to find the syntax for the issue

please help me