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