# Completely unable to connect to Internet.  Any suggestions??

## carlos123

Okay here we go.....

I am not completely 100% unable to connect to the Internet through both KDE 3.0, KDE 3.1, and through terminal windows in both. 

I have not touched /etc/resolv.conf since yesterday when I was able to connect to the Internet.  

"/sbin/ifconfig eth0" shows everything just fine.  Correct IP addresses and everything.  Just like when I am able to connect. 

"/etc/init.d/net.eth0 status" returns "started".

"ping www.google.com" returns "sendto: Network is unreachable".  

Rebooting the computer entirely doesn't solve it.  

I can connect to my hardware firewall through it's HTTP interface just fine.  When I use the Java SSH interface and log in as root to my firewall I can ping out to anywhere on the Internet just fine.  I am also writing this from a Windows computer hooked up to the same firewall as my Linux box.  The firewall is working fine from all that I can see. 

I can ping from the Linux Gentoo out to my firewall just fine (using it's IP address).  

"/etc/init.d/net.eth0 stop"

"/etc/init.d/net.eth0 start" both seem to work just fine.  

The ONLY thing I did differently than a few minutes ago when all this began to happen was edit the file /usr/kde/....(something) I can't remember exactly and add KDELIBDIR (or something like that).  A setting that it was obviously missing.  After making that change I was able to get into KDE 3.1 but just not able to connect as explained.  

When I logged out and back in again using KDE 3.0 I could then not connect at all.  Rebooting at that point didn't do anything at all. 

I am once again completely stumped.  Anybody got any ideas?  

Thanks.  

Carlos

PS.  Last minute edit...I can connect through Redhat just fine.  Redhat is on /dev/hda on the same computer as Gentoo which itself is on /dev/hdb.  So I believe we can safely deduce from all the above that it's not my NIC, harware firewall, ethernet cable or any other such a thing.  Everything is pointing squarely at something malfunctioning in my Gentoo install.  But as to what I haven't got a clue!  Redhat is using the same identical driver to drive the same NIC that Gentoo is trying to access too as far as I know.  Now that I can connect through Redhat let me know if anybody needs to see actual command line output from Gentoo and I will post it.

----------

## ikshaar

I'm not an expert, but it looks like a gateway problem. Did you set up the gateway as your firewall IP on your Gentoo box ?

In file : /etc/conf.d/net

```

gateway="eth0/192.168.10.1"

```

Insert you own gateway IP.

----------

## zentek

What is the output of netstat -rn ?

you should have a line like this in it .

```
0.0.0.0    IP_OF_GATEWAY    0.0.0.0 ......
```

if you dont, try "route add default gw IP_OF_GATEWAY metric 1" and as it was suggest before do the mod in "/etc/conf.d/net"

----------

## carlos123

Thanks for the input.  

I don't believe that the lack of a gateway is the problem but I will try what you both suggested.  The reason I don't think it's the problem is that I have previously been able to connect to the Internet adequately without a gateway being indicated throught the route command or otherwise.  

My Windows computer does not use a gateway IP either.  And it too is connected to my firewall computer the same way my Linux (dual boot between Redhat and Gentoo) is.  Namely through a central hub.  It too uses manually assigned static IP's.  My firewall connects out to the Internet through an external ADSL modem and gets it's IP from the ISP DHCP server.  

Since I do not use a gateway per se I have not really seen a need for it.  But I will reinsert a gateway IP and see if that helps.  

My network setup works fine except for my Gentoo installation.  I can access the Internet just fine through both my Windows and through Redhat (when I boot up Redhat on my Linux box).  

Will posts my results in a bit.   

Thanks.  

Carlos

----------

## jetblack

Are you using gentoo-sources? This thread seems to show a couple of people who had networking trouble with gentoo-sources a couple days ago. The problems were fixed by switching to vanilla-sources. I haven't had this problem myself, so it's just a guess.

----------

## carlos123

I stand corrected!!

I added the following line to my /etc/conf.d/net file...

```

gateway="eth0/192.168.1.1"

```

Effectively making my hardware firewall the gateway.  

I took a closer look at my Windows computer and sure enough it is using the 192.168.1.1 IP as a gateway IP.  I could have sworn that I had deleted that.  My Redhat one seems to pull a gateway IP up everytime I use Redhat.  Even though I keep deleting it  :Smile: .  So I suppose that would explain why Redhat worked.  

Oh I almost forgot here is the output from the netstate -rm command when I was not able to connect to the Internet...

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.168.1.0     0.0.0.0         255.255.255.0   U        40 0          0 eth0

```

Here is the output now...

```

carlos@pine [~]

$ netstat -rn

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.168.1.0     0.0.0.0         255.255.255.0   U        40 0          0 eth0

0.0.0.0         192.168.1.1     0.0.0.0         UG       40 0          0 eth0

carlos@pine [~]

```

Can't say that I understand the difference but it's working!

By the way I am using gentoo-sources.

THANKS VERY MUCH for the support and tips given.  It's GREAT to know that I can turn to the forum when I get stuck.  

A surfing I will go;

A surfing I will go;

Hi ho dedario;

A furfing I will go!!

Carlos

----------

## brain

To add some insight to the comment:

 *Quote:*   

> Since I do not use a gateway per se I have not really seen a need for it. But I will reinsert a gateway IP and see if that helps. 

 

Just basic TCP/IP stuff... if your computer has a different IP address subnet than the one you're attempting to connect to (which is everything on the internet), you need a gateway.  It may not be one you're responsible for (could be your ISP) but every computer that talks on a subnetted network requires one.

If you're not sure... check on your Windows box by doing a `ipconfig /all` at a command prompt.  I'm 100% sure you'll see something like this:

```

Default Gateway .  .   .  .  .  .  .  .  .  : 192.168.0.1

```

<steps off soapbox>  :Smile: 

----------

## keratos68

in /etc/profile, try adding the line

```
MAILTO=""
```

Does that fix it?

----------

