Looking for some advice, I'm pulling my hair out trying to figure this out! Running Redhat (CentOS) with fairly normal configuration and I've disabled the firewall for now.
I have a web server which has worked wonderfully in the following setup:
Server IP: 10.0.0.10 Firewall/Router: 10.0.0.1
I port forward our public facing IP address part 80/443, lets say 188.8.131.52, to the .10 internal IP and it works great.
However I recently had the need to add a second SSL site, so I needed a new external IP, which I have from the ISP. I added a second NIC to the system, eth1 with a "public" ip of 184.108.40.206. The gateway for this external IP is now 220.127.116.11, which is the same as the firewall/router. Now the system wants to route everything through eth1, rendering the first website (and interface) disabled.
Now I need to set up static routes, but can't seem to get it to do what I want. Basically I want:
Incoming Traffic from 18.104.22.168 to be forwarded to 10.0.0.223 by the firewall/router (already done), return traffic to go through 10.0.0.1 on eth0.
Incoming Traffic from 22.214.171.124 to be served straight up, routed through 126.96.36.199 on eth1.
Any tips on the correct setup?
Right now I have
DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=10.0.0.10 NETMASK=255.255.255.0 GATEWAY=10.0.0.1
default 10.0.0.1 dev eth0 10.0.0.0/24 via 10.0.0.1 dev eth0
DEVICE=eth1 ONBOOT=yes BOOTPROTO=static IPADDR=188.8.131.52 NETMASK=255.255.255.0 GATEWAY=184.108.40.206
default 220.127.116.11 dev eth1 18.104.22.168/32 via 22.214.171.124 dev eth1
126.96.36.199 via 188.8.131.52 dev eth1 184.108.40.206 via 10.0.0.1 dev eth0 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.10 220.127.116.11/24 dev eth1 proto kernel scope link src 18.104.22.168 169.254.0.0/16 dev eth1 scope link default via 22.214.171.124 dev eth1
This results in 126.96.36.199 traffic working fine, but the other interface is knocked offline.
Any help is appreciated!