# eth0 working, but not in X [Solved]

## r4d1x

Heres something I've never seen before.  From a term I can get to the net fine using ftp/lynx/etc. , but firefox/x-chat/waste/gaim/etc. will all time out or respond with various messages about no connections being present.  I havent run across a log yet that shows any errors and I dont see how there could be considering things are connecting.  

what am I missing here?

----------

## NeddySeagoon

r4d1x,

X wants to talk to itself using networking. 

Is the loopback network interface up and do you have localhost defined in your /etc/hosts ?

----------

## r4d1x

yes.  ifconfig shows both lo and eth0 up and running.

```
 ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:20:ED:6F:DB:F6  

inet addr:10.0.0.9  Bcast:10.0.0.255  Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:9 errors:0 dropped:0 overruns:0 frame:0

TX packets:33 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000 

RX bytes:1030 (1.0 Kb)  TX bytes:3393 (3.3 Kb)

Interrupt:16 

lo        Link encap:Local Loopback  

inet addr:127.0.0.1  Mask:255.0.0.0

UP LOOPBACK RUNNING  MTU:16436  Metric:1

RX packets:58 errors:0 dropped:0 overruns:0 frame:0

TX packets:58 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0 

RX bytes:4296 (4.1 Kb)  TX bytes:4296 (4.1 Kb)

 

wget gentoo.gg3.net/distfiles/ppp-2.4.2.tar.gz

--06:38:47--  http://gentoo.gg3.net/distfiles/ppp-2.4.2.tar.gz

           => `ppp-2.4.2.tar.gz'

Resolving gentoo.gg3.net... 219.121.6.52

Connecting to gentoo.gg3.net[219.121.6.52]:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 774,441 [application/x-tar]

100%[====================================>] 774,441      504.93K/s             

06:38:54 (503.68 KB/s) - `ppp-2.4.2.tar.gz' saved [774,441/774,441]

```

----------

## NeddySeagoon

r4d1x,

... and your /etc/hosts ?

----------

## r4d1x

doh,

```
127.0.0.1       localhost

10.0.0.1        router

10.0.0.2        gaming

10.0.0.4        ftp

10.0.0.9        mysql

10.0.0.187      rio

# IPV6 versions of localhost and co

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

```

not sure what the ipv6 stuff is, not using it AFAIK  :Wink: 

----------

## NeddySeagoon

r4d1x,

Thats OK. I'm running out of ideas.

Can you open a terminal in X?

Do network commands work there for root or an ordinary user ?

----------

## r4d1x

ahhh!  good call.  works for root but not for standard users.

----------

## NeddySeagoon

r4d1x,

Its a permissions thing then. Can both root and users use a terminal?

If not, you have a pty problem, like you have not made any ptys in the kernel.

----------

## r4d1x

root and users can use a term, just not the net.  not really sure what permissons would have changed though.  any guidance you can offer?

----------

## NeddySeagoon

r4d1x,

Can you ping by number but not by name?

Try 

```
ping 216.239.39.99

ping google.com
```

do they both work?

If not, what happens?

----------

## r4d1x

yes, ping works by IP but not by a hostname.  so, im guessing somewhere my new dns servers havent replaced my old ones under my regular user profile.

----------

## NeddySeagoon

r4d1x,

Check the permissions on /etc/resolv.conf   

```
$ ls -l /etc/resolv.conf

-rw-r--r--  1 root root 70 Nov  4  2004 /etc/resolv.conf
```

works here.

----------

## r4d1x

```

ls -l /etc/resolv.conf 

-rw-------  1 root root 55 Jul  2 05:05 /etc/resolv.conf
```

strange....... although I cant say that I know what the 55/70 difference is.  Im guessing access permissions?

----------

## r4d1x

ok, chmod 644 got it.  thx for the help, sorry for takin so long on a seemingly simple fix.  should have caught that in the first place!

----------

## NeddySeagoon

r4d1x,

The 55/70 are the different file sizes. The permissions are the letters 

```
-rw-r--r--
```

There is an odd position, then its rwx for the owner, rwx for the group and rwx for the world, hence chmod uses octal.

For some reason, only root could look up the IPs for your nameservers, which broke DNS for everyone else.

----------

