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 126.96.36.199, 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 188.8.131.52. The gateway for this external IP is now 184.108.40.206, 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 220.127.116.11 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 18.104.22.168 to be served straight up, routed through 22.214.171.124 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=126.96.36.199 NETMASK=255.255.255.0 GATEWAY=188.8.131.52
default 184.108.40.206 dev eth1 220.127.116.11/32 via 18.104.22.168 dev eth1
22.214.171.124 via 126.96.36.199 dev eth1 188.8.131.52 via 10.0.0.1 dev eth0 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.10 184.108.40.206/24 dev eth1 proto kernel scope link src 220.127.116.11 169.254.0.0/16 dev eth1 scope link default via 18.104.22.168 dev eth1
This results in 22.214.171.124 traffic working fine, but the other interface is knocked offline.
Any help is appreciated!