2 NICs, 2 external IP's (1 behind a router):
I have a Linux PC setup as a standalone machine, running RedHat 6.2 Professional. It has an ethernet connection eth0 and is connected to the web via an external IP (say 24.65.xxx.xxx).
For some reasons, I need to provide a way for PCs on an internal office LAN to access this Linux PC as a special server. The PCs on internal LAN are connected together via a Linksys Cable/DSL Router (BEFSR81 with an integrated 8-port 10/100 switch), which provides both a switch for the LAN and a connection to the web via another separate external IP (say 24.68.yyy.yyy).
So I put in another NIC into the Linux PC, and configured it as eth1 to connect to the internal LAN via the Linksys router/switch. The Linksys router is setup with DHCP disabled, and IP addresses for PCs on the LAN being assigned manually: the router with an internal IP of 192.168.1.1, eth1 of Linux PC with an internal IP of 192.1.30, and a Windows 2000 PC on the LAN with an internal IP of 192.168.1.10.
On reboot all PCs and router, everything seems to working fine with the following expected behavior:
1. From the Linux PC:
a. I can browse external web sites via eth0 through external IP 24.65.xxx.xxx
b. I can talk to a Windows 2000 PC on LAN via eth1, look at its web site thru http://192.168.1.10/
or an internal name assigned via /etc/hosts.
2. From an external PC outside the LAN:
a. I can browse the Linux PC through a domain name mapped to 24.65.xxx.xxx (the IP for eth0).
b. I can browse the Windows 2000 PC via another domain name mapped to the router’s external IP 24.68.yyy.yyy, with port 80 forwarded to this particular PC.
However, after running for a while, things seem to go wrong for no particular reasons that I know of:
1. From the Linux PC, when I browse an external web site (that reports on your originating IP address), I find that I am accessing thru eth1 and the router, as the external site is reporting my router external IP address.
2. From an external PC, I can no longer access the web server on the Linux PC, associated with the domain name mapped to 24.65.xxx.xxx (the IP for eth0).
3. Sometimes, even the web site on the Windows 2000 PC associated with the router external IP 24.68.yyy.yyy is not accessible.
On rebooting the Linux PC, everything is then back to normal, with expected behavior as described in the preceding paragraph.
1. What is causing the Linux PC to switch to using eth1 (from eth1) on accessing the Internet? Any workaround?
2. Why are the domain names or the external IP’s associated with Linux PC and the router can become inaccessible? Any workaround?
Thanks for any assistance you might offer!