0
I have tried many approaches to my problem. I had gotten his to work using static routes. But, I wanted a RAID 0 setup so I wiped and installed a clean minimal Centos 6.4 system.
Current:
- Centos 6.4 Minimal Install - No updates, no modifications
- RAID 0
- 2 On-Board NIC's (disabled through BIOS)
- 1 Intel i350 Dual Gbe NIC (PCIe on a DX79SR)
I understand the hardware specs aren't relevant outside of the on-board NIC.
Objective
Configure a Centos 6.4 install as a vanilla web server using Apache, PHP and MySQL. Connect web server to lan using eth0 and wan using eth 1. All web traffic (80, 21, 22, 110, 25, 53 etc) will use eth1. All local traffic and database traffic will use eth0.
ifcfg-eth0 listens and responds on ifcfg-eth0 - 10.10.10.0/24 gw 10.10.10.1
ifcfg-eth1 listens and responds on ifcfg-eth1 - 23.30.X.X/28 gw 23.30.X.X
I do not need help with Apache, MySQL or PHP. Routing traffic by port is not a solution I can use. I need help setting up the static routes per interface so that any incoming traffic on eth0 is sent out on eth0 and any incoming traffic on eth1 is sent out on eth1. I do not need to bridge the two.
/etc/sysconfig/network default gateway is 10.10.10.1
/etc/resolv.conf are 75.75.75.75, 75.75.76.76
eth0 and eth1 are assigned static Ip in their subnets
DEVICE=eth0
TYPE=ethernet
UUID=XXXX
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=static
IPADDR=X.X.X.X
PREFIX=24
GATEWAY=X.X.X.X
I know that without configuration Centos cannot have 2 default gateways. So, I have to configure per port gateways either using the /etc/sysconfig/network-scripts/route-ethx (on all on-default ethx) or I can create routes using iproute. I chose to use the iproute.
I created and am adding routes to table: pubnic
ip route add 23.30.X.X/28 dev eth1 src 23.30.X.XXX table pubnic ip route add default via 23.30.X.XXX dev eth1 table pubnic ip rule add from 23.30.X.XXX/32 table pubnic ip rule add t0 23.30.X.XXX/32 table pubnic
IP Rule Show
from all lookup local
from all to X.X.X.XXX lookup pubnic
from my.X.X.X.XXX lookup pubnic
from all lookup main
from all lookup default
ip route flush cache
This has worked in the past. I'm not sure why its not working now.
1Could you possibly format your post a little better? It's a little hard to follow – cutrightjm – 2013-07-28T01:59:38.723
1
Looking at the original text I tried to reformat it the best I could. Eric please edit your question and format your question the rest of the way.
– Scott Chamberlain – 2013-07-28T03:09:52.407Yes, thank you. I reformatted as soon as I was able to. I am sorry for the format issue - Ill be sure to pay attention to formatting my questions in the future. Asking for help and not formatting is inappropriate. – Eric Martin – 2013-07-29T01:27:14.153