Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Hardware Troubleshooting in Linux => Other Devices => Topic started by: ty_young on September 08, 2004, 04:35:46 AM
-
Currently I setup my linux box to be a transparent proxy w/ firewall (using firestarter and built-in). The box works well with only 1 NIC but things started to go wrong when I installed a 2nd NIC.
Whenever I ping, I couldn't ping to my internal network nor my gateway or whatsoever. Could anybody kind enough to help me out?
-
PLEASE WHICH OF YOUR CARDS IS THE ETH0 AND WHICH IS ETH1
-
first of all you have to assign appropriate ips two both of cards, wether it is from dhcp or static.
Then again run firestart setup ! hope then you will not get any problem.
-
I'm using a static ip address. Eth0 is using 198.1.1.19 (3Com) while Eth1 (Realtek Chip-set) is using 198.1.1.20. I want to connect my Eth0 to my ISP while Eth1 connect to my internal network.
-
and where did you obtained those IP address ? given to you by ur ISP ?
I really don't think that your Eth1 ip should look like that as it is internal network !
-
Ricky, you're right. That was because i was testing it using internal network to simulate a real-world environment. Earlier I put my Linux box for test in the following configuration:
Eth0 IP: 202.179.113.124
Mask: 255.255.255.248
Gateway: 202.179.113.121
Eth1 IP: 198.1.1.18
Mask: 255.255.255.0
Gateway: 198.1.1.18
I tried to Ping both internal and external IP but to no avail. Any suggestion?
-
NOw I think I am confused.. I am really unable to understand that wht you want to do ?
Well in the case you want to connect to your ISP and if your ISP provides you static IPs then simply assign that IP to your ethernet and other info.. like DNS , like gateway.
In your internal network card you don't need to assign gateway if that machine is directly connected to internet , other clients will require the gateway as of your LAN NIC ip .
hmm.. may be you can understand wht I am saying.. but make sure to check ur firewall rules.. they are mostly to block pinging..
-
Sorry for the confusion. I'll try to clarify my situation. Now I have deployed my Linux Box into test using my ISP given fixed ip which I specified earlier and the 2nd NIC is connected to my internal network. anyway, i'll try you method and see how it goes. Thanks.
-
I've been trying for hours trying to get both my NICs working right but so far to no avail. Whenever i try switch the setting between two cards, for example Eth0 is set to as Gateway while Eth1 is set to internal network, Eth0 would ping succesfully but not Eth1. If I try to switch the setting again, I could ping external successfully but not internally. For you information, I tested my both NICs and they work flawlessly. Can anybody show me show clue on what's going on?
By the way, Eth0 is using SMC2-1211TX while Eth1 is using 3c905-TX/TX-M (Tornado). At this moment my setting is as below:
Eth0: 198.1.1.10 (Static IP)
Mask: 255.255.255.0
Gateway: -
Eth1: 202.179.113.124
Mask:255.255.255.248
Gateway: 202.179.113.121 (ISP Static IP)
In this case, I can ping my internal network but not my external network.
-
HI..
there is notthing which you can decide from pinging on same machine.. ie sometimes etxternat and sometimes internalk :)
Well forget all l..
NOw
When y ou get a connection from an ISP then you should be given at 3 things..
a. your NODE Ip address
b. subnemt mask (usually 255.2555.255.0) or depends upon ur ISP.
c. DNS servers
So if you you are provided with above settings then in your external NIC put Ip address, dns, and subnet and in gateway give same as your IP.
and if they provide you separate gateway then provide gateway also as given by them.
Now for your LAN
First of all enable routing on your machine which is directly connected to internet ie the one with two NIC.
Now give Ip as you wish..
say I am gving 90.0.0.1 / 255.255.255.0 , leave gateway blank as gateway is already specified on extrnal nic.
Now your clients who are connected to your machine through LAN NIC .. in those specifiy ip as 90.0.0.2 and subnet as 255.255.255.0 and gateway at 90.0.0.1 , and dns as your ISP's dns..
HOpe you will get it solved now !
-
I think I'VE FOUND OUT THE COURSE OF MY PROBLEM NOW. The Hardware section in the Network configuration mess up my NICs , big time! I've set my Eth0 as Tornado while the Eth1 as SMC. when i set my devices, the system cross switch both NICs! Eth0 to SMC while Eth1 to Tornado! eventhough i double check my hardware setting is right! I wonder what course of this? But i'll try to fix the problem and sees how it goes from there.
-
I tried to remove my NICs and delete all the configuration and start a fresh installation. this time the setting is nice and match. I set my Eth0 (SMC) as a gateway to my ISP while my Eth1 (3com) serves as my internal network.
But later to my dismay, the same problem happens again. the difference is, this time i can ping my external ip but not internally..... and quite interesting I setup another pc to ping my linux box, i was able to ping the internal network just once... Anyone got a clue what's going on?
-
Ricky, Could you be a bit specific about the 'enable routing' part.I'm would like to know about that part in more details. For now, I'm using the network configuration's GUI, to set my routing but i'm not quite sure am I doing it right.
For example, For my Eth0 (Tornado) in which connecting to ISP, I add an entry : Destination Network: 198.1.1.19, mask 255.255.255.0 into Network Static Route. on the other hand, Eth1 (SMC) connecting to internal network, Destination network: 202.179.113.121, mask 255.255.255.248. Is it correct? Thanks.
-
I am talking about NAT .. see Tutorial section to do that ! btw you have asked ur same problem at another place.. was that necessary to ask there ?
-
I've already went thru the tutorial earlier and it works fine for me. By the way, about the other forum I posted earlier, well I thought it is a separate problem so I just do it. If it's causing problem, I won't mind to stop it. thanks.[/quote]
-
Today I finally make my Linux Box works after weeks of effort. It took my quite a while to realise that the problem I had all along was my 3Com (3c905c-TX) doing. Even though I tested this card on other Microsoft machine and it works like a charm but on my Linux, It's been giving me one hell of time.
Long Story cut short, it seems that my 3Com (eth0) card has compatibility issue with RHL 9.0. Either if you put in a 2nd 3Com card or other brand (in my case Realtek), then the 3Com would generate error especially pinging. I was able to ping myself and I also double check my configuration, it is all alright. But not to the outside. So next time, any of you using 3Com NIC, beware of this issue.
and I would like to express my gratitude to you, Ricky, for your advices and support. Man, you rock!
-
I have a weird problem concerning two NICs. My eth0 is connected to the ISP and the second one is connected to the local area network.
When I put the second NIC down, the ISP link works fine (i.e the DNS works) but when the second one is up, I can't get the DNS.
Here is the configuration
for eth0
IP: ISP assigned IP
Netmask: ISP assigned mask
gateway: ISP gateway
for eth1
IP: 192.168.50.230
Mask: 255.255.255.0
Gateway: 10.10.10.254
My /etc/resolv.conf contains two addresses assigned by the ISP as their DNS server (static)
While both of the NICs are up, only then the DNS doesnt work though both the networks do fine.
Any idea?
-
IP: 192.168.50.230
Mask: 255.255.255.0
Gateway: 10.10.10.254
Here for your second NIC set gateway as none!
-
IP: 192.168.50.230
Mask: 255.255.255.0
Gateway: 10.10.10.254
Here for your second NIC set gateway as none!
Thanks Ricky, you are absolutely right. But the fact is, now I can't get into the network those were accessed through my eth1. I mean, there is another network connected through eth1 and to get into that I need the getway. The scenario is as below:
1. From outside I get connected to Server through the public IP (assigned by the ISP) assigned in eth0
2. eth1 should have an internal IP (192.168.50.200) and connected to a local domain.
3. Through eth1 I need to connect to another server (192.168.0.240). But for that I need the gateway 192.168.50.250.
Now, as I can't set the gateway for my eth1, I can't get access to 192.168.0.240.
Is there anyway I can work this one out?
-
You can connect as many network you wish, but for each network you must set default gateway from the network itself.
I can give you further solutions if you can explain your problem in detail.
-
What you do to connect to 192.168.50.250 !
May be then I can help !
-
hmm
Here is my netstat -nr command output when i delete the gateway for my eth1:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
203.76.105.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0
192.168.50.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 203.76.105.1 0.0.0.0 UG 0 0 0 eth0
Here is my netstat -nr command output when I add both the gateways
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
203.76.105.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0
192.168.50.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.50.254 0.0.0.0 UG 0 0 0 eth1
I can't see the gateway information for my ISP.
And when I try to add a route request, it's giving me an error of:
no host associated with name.