Server with 2 WAN interfaces
by Saule2006 from LinuxQuestions.org on (#6JKEJ)
Hi
I have ubuntu server with 2 WAN interfaces - 2 ISP. If request comes to ISP1 the answer is delivered through WAN1. Same with ISP2 - incoming requests to WAN2 are routed back through WAN2. So WAN1 is for ISP1, and WAN2 is for ISP2. Everything works well until one condition. If the request comes to WAN1 from the IP which belongs to ISP2 subnet, the answer do not come from WAN1, but from WAN2 (ISP2). Same happens if the request comes to WAN2 (ISP2), but the client IP belongs to ISP1 subnet, the server tries to deliver the answer through WAN1, not WAN2 as it should be. How I can change this?
I have ubuntu server with 2 WAN interfaces - 2 ISP. If request comes to ISP1 the answer is delivered through WAN1. Same with ISP2 - incoming requests to WAN2 are routed back through WAN2. So WAN1 is for ISP1, and WAN2 is for ISP2. Everything works well until one condition. If the request comes to WAN1 from the IP which belongs to ISP2 subnet, the answer do not come from WAN1, but from WAN2 (ISP2). Same happens if the request comes to WAN2 (ISP2), but the client IP belongs to ISP1 subnet, the server tries to deliver the answer through WAN1, not WAN2 as it should be. How I can change this?