2 nic's in centos
Hello,
I have a centos box running as a webserver with 1 nic assigned an IP direct from my T1. I have a 2nd nic installed that I would like to connect to my internal LAN so the webserver can access some data off the LAN. When I connect this 2nd nic the centos server can access the LAN fine but the webserver become unaccessable from the web. How do I configure I assume IPTABLES to allow both nic's to work? Both have different gateways. Thank you, John |
You need to not set a gateway for the LAN NIC. Add static routes for any subnets that are not on the default subnet assigned to the LAN NIC.
|
From what you are saying i think the second nic changes your default gw making your system unaccessable from the web.
You only need one gateway which is the one u use to get to the internet. The nic on the lan such not use a gateway as the lan is a directly connected network. I suggest you use static addressing on nic 2 to avoid it using dhcp to overwrite the gateway. |
That is exactly my problem I think. I did assign nic 2 a static ip on the lan but I also assigned it the lan gateway. I will remove that and try again.
Thanks for your help! John |
All times are GMT -5. The time now is 04:40 PM. |