1
I have this network configuration (see picture and details bellow):
R1 and R2 are two routers linux with CentOS, each with 2 NICs (LAN and ISP). Now all web trafic goes trough R1 and a vpn trough R2 (R2->R3).
All i want to know is how to redirect all requests to a web server on some port (let's say 8080) trough R2 (ISP2) and keep all internet trough R1 (ISP1)(see next image):
All answers are good if guide me in the right direction. Thank you.
UPDATE: - using @Brian answer as starting point i found this answer and this
Thank you all.
Are you really doing NAT on both R1 and R2? Which router (NAT gateway) do your LAN clients use as their default route? Does the web server in question have a static IP address? Do you mind if all traffic to that IP address (not just port 8080) goes via R2? Depending on your answers to these questions, there may be ways to solve it with routing. Otherwise, you might have to do something like block connections to port 8080 except from a web proxy machine, and configure all your LAN clients to use the web proxy for port 8080 connections. – Spiff – 2013-09-25T21:15:52.193
R1 is default gateway. WebServer have static IP address (public IP 181.xxx.xxx.xxx). I think i must configure a proxy because i want all internet trafic to R1 and to this web server trough R2. – DGA – 2013-09-25T21:25:15.097
If you want all traffic for that web server's IP address to go via R2, then Brian's answer should work for you. – Spiff – 2013-09-25T21:35:18.433