How can I redirect HTTPS(S) traffic to anothr gateway?

Posted by PsyStyle on Server Fault See other posts from Server Fault or by PsyStyle
Published on 2010-12-29T16:59:17Z Indexed on 2010/12/29 17:56 UTC
Read the original article Hit count: 193

Filed under:
|
|
|
|

I have a network like 192.168.0.0/15 with the default gateway set to 192.168.0.1. Al the workstations of the network use this gateway for all kind of accesses to the Internet. Now I am testing a new Internet connection with another provider and for this I am using a second gateway on the same subnet with 192.168.0.2 as IP address. I want to redirect only HTTP and HTTPS traffic to this second gateway without touching the address of the default gateway set inside every workstation. How can I accomplish this task? What I have to change inside the first's gateway firewall configuration or routes? I tried with a dnat like

DNAT loc:192.168.0.1 loc:192.168.0.2 tcp 80

but nothing worked. I use Shorewall for simplicity in configuration but I can understand even theorical answers which I will try to adapt to my case

© Server Fault or respective owner

Related posts about linux

Related posts about firewall