Networking Forums

Networking Forums > Computer Networking > Linux Networking > DNS only works as root with Verizon DSL/Netgear router

Reply
Thread Tools Display Modes

DNS only works as root with Verizon DSL/Netgear router

 
 
dave
Guest
Posts: n/a

 
      11-05-2003, 02:45 AM
I just got Verizon DSL and am connecting to it using a Netgear RT311
router. My problem is that I'm having trouble doing name resolution. I
can run nslookup/host/etc as root and can run lynx as root but if I
run mozilla, netscape4.x or opera as user, I get "foo.com could not be
found" errors unless I type the IP address of the web site into the
browser location bar. Strangely, this appears to also happen if I run
mozilla as root.

When I get my IP address from the router, the following gets written
to my /etc/resolv.conf:

search verizon.net
nameserver 192.168.0.1

where 192.168.0.1 is the IP address of the router on the local
network.

I've tried changing the nameserver to one of Verizon's (151.197.0.38)
but that doesn't seem to wwork either.

Any ideas as to what's going wrong?
 
Reply With Quote
 
 
 
 
Neil Horman
Guest
Posts: n/a

 
      11-05-2003, 11:53 AM
dave wrote:
> I just got Verizon DSL and am connecting to it using a Netgear RT311
> router. My problem is that I'm having trouble doing name resolution. I
> can run nslookup/host/etc as root and can run lynx as root but if I
> run mozilla, netscape4.x or opera as user, I get "foo.com could not be
> found" errors unless I type the IP address of the web site into the
> browser location bar. Strangely, this appears to also happen if I run
> mozilla as root.
>
> When I get my IP address from the router, the following gets written
> to my /etc/resolv.conf:
>
> search verizon.net
> nameserver 192.168.0.1
>
> where 192.168.0.1 is the IP address of the router on the local
> network.
>
> I've tried changing the nameserver to one of Verizon's (151.197.0.38)
> but that doesn't seem to wwork either.
>
> Any ideas as to what's going wrong?

put the line:
PEERDNS=yes
in your /etc/sysconfig/ifcfg-<ifname> file

HTH
Neil

--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc., www.redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://www.keyserver.net
************************************************** */

 
Reply With Quote
 
Ian Northeast
Guest
Posts: n/a

 
      11-05-2003, 07:16 PM
dave wrote:
> I just got Verizon DSL and am connecting to it using a Netgear RT311
> router. My problem is that I'm having trouble doing name resolution. I
> can run nslookup/host/etc as root and can run lynx as root but if I
> run mozilla, netscape4.x or opera as user, I get "foo.com could not be
> found" errors unless I type the IP address of the web site into the
> browser location bar. Strangely, this appears to also happen if I run
> mozilla as root.


Check permissions on /etc/resolv.conf, /etc/nsswitch.conf and, if it
exists, /etc/host.conf. All should be world readable.

Possibly Mozilla is giving up some root privileges for security reasons.

Regards, Ian

 
Reply With Quote
 
dave
Guest
Posts: n/a

 
      11-05-2003, 07:36 PM
Neil Horman <(E-Mail Removed)> wrote in message news:<boasti$5dm$(E-Mail Removed)>...
> dave wrote:
> > I just got Verizon DSL and am connecting to it using a Netgear RT311
> > router. My problem is that I'm having trouble doing name resolution. I
> > can run nslookup/host/etc as root and can run lynx as root but if I
> > run mozilla, netscape4.x or opera as user, I get "foo.com could not be
> > found" errors unless I type the IP address of the web site into the
> > browser location bar. Strangely, this appears to also happen if I run
> > mozilla as root.
> >
> > When I get my IP address from the router, the following gets written
> > to my /etc/resolv.conf:
> >
> > search verizon.net
> > nameserver 192.168.0.1
> >
> > where 192.168.0.1 is the IP address of the router on the local
> > network.
> >
> > I've tried changing the nameserver to one of Verizon's (151.197.0.38)
> > but that doesn't seem to wwork either.
> >
> > Any ideas as to what's going wrong?

> put the line:
> PEERDNS=yes
> in your /etc/sysconfig/ifcfg-<ifname> file
>


Thanks for your reply.

/etc/sysconfig didn't exist, so I created that directory and ran

echo "PEERDNS=yes" > ifconfig-eth0

where eth0 is my ethernet card that's hooked up to the hub that's
hooked up to the router.
After that, I ran inetd restart in /etc/init.d and renewed my IP
address with pump (pump -r;pump -k;pump just to be safe), but DNS
still doesn't work. I'm not sure if restarting inetd was the way to go
or not, since I don't know a whole lot about what's where in the init
scripts. My resolv.conf still looks exactly the same.

One thing I forgot to mention in my initial post is that, while IP
address lookups with host work when I'm logged in as root, when I try
to do that as user I get the following:

$ host google.com
Nameserver not running
google.com A record not found, try again

I'm also running Debian testing with Mozilla 1.5 from unstable, if
that's any help.
 
Reply With Quote
 
dave
Guest
Posts: n/a

 
      11-05-2003, 10:54 PM
It finally occurred to me to check the permissions on /etc/resolv.conf
and noticed that it's now a symlink to /etc/ppp/resolv.conf
Both the directory (/etc/ppp) and the file (resolv.conf) were owned by
root and had permissions set so that only owner and group (also root)
could read them. After changing permissions, I can now do DNS lookups
as user, browse with lynx and, I assume, browse with mozilla but won't
find out until I get home.

Stupid of me not to check that earlier. I think one of the options I
chose -- or failed to choose -- when I was fooling around with
pppoe-rp must've done that (it had an option for "allow user access"
or something like that).

Thanks once again, Neil, for your response.


(E-Mail Removed) (dave) wrote in message news:<(E-Mail Removed). com>...
> I just got Verizon DSL and am connecting to it using a Netgear RT311
> router. My problem is that I'm having trouble doing name resolution. I
> can run nslookup/host/etc as root and can run lynx as root but if I
> run mozilla, netscape4.x or opera as user, I get "foo.com could not be
> found" errors unless I type the IP address of the web site into the
> browser location bar. Strangely, this appears to also happen if I run
> mozilla as root.
>
> When I get my IP address from the router, the following gets written
> to my /etc/resolv.conf:
>
> search verizon.net
> nameserver 192.168.0.1
>
> where 192.168.0.1 is the IP address of the router on the local
> network.
>
> I've tried changing the nameserver to one of Verizon's (151.197.0.38)
> but that doesn't seem to wwork either.
>
> Any ideas as to what's going wrong?

 
Reply With Quote
 
dave
Guest
Posts: n/a

 
      11-07-2003, 06:41 PM
Ian Northeast <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> dave wrote:
> > I just got Verizon DSL and am connecting to it using a Netgear RT311
> > router. My problem is that I'm having trouble doing name resolution. I
> > can run nslookup/host/etc as root and can run lynx as root but if I
> > run mozilla, netscape4.x or opera as user, I get "foo.com could not be
> > found" errors unless I type the IP address of the web site into the
> > browser location bar. Strangely, this appears to also happen if I run
> > mozilla as root.

>
> Check permissions on /etc/resolv.conf, /etc/nsswitch.conf and, if it
> exists, /etc/host.conf. All should be world readable.
>
> Possibly Mozilla is giving up some root privileges for security reasons.



That was the problem... I'm reading this with google groups, so I
didn't get this followup until after I'd already figured the problem
out and posted the "FIXED" followup.

You're probably right about mozilla. I'll have to look that up.

Anyway, thanks again.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WGT624 netgear router,which channel works for super G Theos Wireless Internet 1 12-31-2006 04:45 PM
program calls rcmd() twice, _second_ call works for root but notnormal users David Mathog Linux Networking 1 06-17-2005 05:26 PM
Verizon wireless router + Netgear Wireless card techquesions101 Wireless Networks 0 03-14-2005 06:55 PM
Postfix config - cron messages for root going to root@ISP. Doug Laidlaw Linux Networking 5 02-27-2005 03:21 PM
Netgear Router works with DLink Access Point Steve Guidos Wireless Internet 3 01-09-2005 01:39 AM



1 2 3 4 5 6 7 8 9 10 11