You are not logged in.

#1 2008-04-23 16:32:12

roach
Member
Registered: 2008-04-16
Posts: 11

network problem

My LAN doesn't work right. When I open firefox, I can only open the web pages that's using the real IP addresses like 10.*.*.*, and can't open the webpages that's using domain names,such as www.*.*.*. But when I open firefox using sudo firefox, it works fine, only couldn't type in Chinese. What am I missing?

Offline

#2 2008-04-23 16:49:45

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: network problem

In order for anyone to assist you the following information is necessary:
1. your /etc/rc.conf file
2. your /etc/resolv.conf
3. the results of the following command: ifconfig

R.

Offline

#3 2008-04-23 17:17:59

roach
Member
Registered: 2008-04-16
Posts: 11

Re: network problem

rc.conf

LOCALE="en_US.UTF-8" 
HARDWARECLOCK="localtime" 
USEDIRECTISA="yes" 
TIMEZONE="Asia/Shanghai" 
KEYMAP="us" 
CONSOLEFONT= 
CONSOLEMAP= 
USECOLOR="yes" 

MOD_AUTOLOAD="yes"

MODULES=(sky2 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore)

# Scan for LVM volume groups at startup, required if you use LVM 
USELVM="no" 

HOSTNAME="Y"

eth0="eth0 10.85.57.197 netmask 255.255.255.0 broadcast 10.85.57.255" 
INTERFACES=(eth0) 
gateway="default gw 10.85.57.254" 
ROUTES=(gateway) 

DAEMONS=(syslog-ng network netfs crond gdm alsa hal fam)

/etc/resolv.conf

nameserver 202.120.224.6
nameserver
search example.com

result of ifconfig

eth0      Link encap:Ethernet  HWaddr 00:16:D3:FC:77:27  
          inet addr:10.85.57.197  Bcast:10.85.57.255  Mask:255.255.255.0
          inet6 addr: fe80::216:d3ff:fefc:7727/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1242 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:85916 (83.9 Kb)  TX bytes:816 (816.0 b)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1280 (1.2 Kb)  TX bytes:1280 (1.2 Kb)

Offline

#4 2008-04-23 17:34:18

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: network problem

If it works for root (via sudo) but not for your normal user, check the permissions of /etc/resolv.conf, I think it needs to be read-able by everyone, the permissions on mine are:

# ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 78 Apr 23 18:02 /etc/resolv.conf

Offline

#5 2008-04-23 17:47:59

ybotspawn
Member
From: Oz
Registered: 2008-04-06
Posts: 140

Re: network problem

That would be correct, you need to make sure everyone can read the file and, someone stop me if I'm wrong but, write permissions as well if your dhcp... thought process as follows:

user initiates dhcp request
dhcp server responds and provides with network ip, sm, dg, and DNS
network information is being written
DNS Information fails to be written because you don't have write rights to resolv.conf
(should propogate as nameserver X.X.X.X)

just curious /etc/groups  does your user have rights to the network?  If not, add it.


"As long as people are going to call you a lunatic anyway,
why not get the benefit of it? It liberates you from convention. "

Offline

#6 2008-04-23 18:36:07

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: network problem

The dhcp request is actually run by root when the network daemon brings up the network, however the OP is using a static IP so this is not relevant to his question. 

I'm not a network expert but I think the user request needs to read resolv.conf to find out where to get the translation information to convert e.g. http://www.archlinux.com into an ip address that it can connect to.

Offline

#7 2008-04-23 18:51:05

ybotspawn
Member
From: Oz
Registered: 2008-04-06
Posts: 140

Re: network problem

I agree but I thought he was using dhcp, my bad


"As long as people are going to call you a lunatic anyway,
why not get the benefit of it? It liberates you from convention. "

Offline

#8 2008-04-23 22:00:29

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: network problem

/etc/resolv.conf also has some bad formatting. Your post shows:

nameserver 202.120.224.6
nameserver
search example.com

and if you only have one nameserver then it should read:

nameserver 202.120.224.6

BTW, if the above nameserver **is not** an example, then there is your problem. Testing for that server returns: *** 202.120.224.6 does not exist (Authoritative answer)

Hope this helps.

R

Offline

#9 2008-04-24 05:31:01

roach
Member
Registered: 2008-04-16
Posts: 11

Re: network problem

I think it's a permission issue. But it seems that I already have the permission.
# ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 20 2008-04-18
Still, I add the permission to all users:
#chmod a+r /etc/resolv.conf
#chmod a+w /etc/resolv.conf
#chmod a+x /etc/resolv.conf

and then it works.
thanks a lot.

Offline

Board footer

Powered by FluxBB