maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Newbie (https://talk.maemo.org/forumdisplay.php?f=26)
-   -   N800 & DNS problems (https://talk.maemo.org/showthread.php?t=10148)

bill-linux 2007-10-01 21:22

N800 & DNS problems
 
I have a new N800. It works fine in public places that have dhcp, but when I try it on my home network it doesn't resolve domain names. For example, http://64.225.102.66/ connects to the proper site. My home network is encrypted and uses static IP addresses. I even have a "pocket router" from D-Link that works as an access point. This has the same problems -- and in fact has the same problems when I take it work, which is also not DHCP. I have sent the DNS address correctly in the device -- under tools > connections. What gives? I note that others have seen this behavior: See http://www.internettablettalk.com/fo...hp/t-5967.html

rm -rf 2007-10-02 03:14

Re: N800 & DNS problems
 
Do you have Xterm installed? Can you try an 'nslookup' from an Xterm window? That should tell you if you can resolve DNS names or not.

bill-linux 2007-10-02 03:35

Re: N800 & DNS problems
 
Indeed I have an xterm installed: When I do

nslookup google.com

it returns:

Server: Nokia-N800-10
Address: 127.0.0.1

nslookup: google.com Host name lookup failure

-------------

This is clearly an error: When I do this on my linux box (for comparison) it says the address is the DNS server and does the nslookup just fine; the N800 is listing the loop back address (127.0.0.1) as the DNS - how odd. How do I solve this?

luca 2007-10-02 07:05

Re: N800 & DNS problems
 
the n800 uses dnsmasq for name resolution, so /etc/resolv.conf points at 127.0.0.1, then it puts the configuration for dnsmasq in some file in /tmp (sorry, I don't remember the name of the files, I'm not on the tablet now, take a look at /etc/dnsmasq.conf or something similar).
If you use static ip, you should either manually modify /etc/resolv.conf to point at your nameserver or put a line "nameserver x.x.x.x" (where x.x.x.x is the address of your nameserver) in one of those files (the one that terminates in wlan0).
If you use the former you'll have to edit back /etc/resolv.conf to 127.0.0.1 when you switch to a dhcp access point, with the latter the file will be overwritten automatically.
I hadn't time yet to investigate if is there a better way to automate things.

bill-linux 2007-10-02 13:31

Re: N800 & DNS problems
 
Wonderful! This would not be too hard to fix. Do I need to be root to modfiy those files? If so, how do I become root on the N800 -- I noticed the "becomeroot" program at maemo, but it seems to be for the 770, the earlier verison. Perhaps I am wrong in thinking this.

luca 2007-10-02 14:03

Re: N800 & DNS problems
 
it also works with the n800

bill-linux 2007-10-02 18:06

Re: N800 & DNS problems
 
At maemo.org: becomeroot doesn't not have an active install. Any advice on how to become root other than this program -- or other sources or methods to install it.

bill-linux 2007-10-02 18:41

Re: N800 & DNS problems
 
Has any one tried "godmode.deb" from http://blog.2blocksaway.com/2007/02/...your-purposes/

bill-linux 2007-10-08 01:30

Re: N800 & DNS problems
 
PROBLEM SOLVED: In short, I modified /etc/resolv.conf to include the nameservers I needed.

Long answer:

1) As noted above the N800 uses masquarade to do DNS on a DHCP connection, so /etc/resolv.conf must contain "nameserver 127.0.0.1", but the file can contain other nameservers in addition and thus work with both a dhcp connection and a static IP.

2) To modify /etc/resolv.conf the user must become root. You'll need an xterm installed and an editor. I used nano which is a version of emacs for the N800; you may prefer vi. Next install either dropbear or openssh. (Both are ssh clients and servers - you'll need both -- dropbear is a stripped down version for tablets, but works fine here.) Log in as root by typing "ssh root@localhost, with a password of "rootme." [Please read http://maemo.org/community/wiki/HowDoiBecomeRoot to understand fully the dangers of having ssh installed on your N800 with such a weak password.]

3) Edit /etc/resolv.conf to read

nameserver 127.0.0.1
nameserver xxx.xxx.xxx.xxx <--- insert the nameserver you need.

4) exit

5) If you don't plan to change your root password then remove the ssh server at least.

That's it. I find the N800 works fine on my home network and also works just like it did when I encounter an unlocked dhcp wireless network.

Makes me appreciate open source: I have no idea why Nokia configured the N800 like they did ... but bless them for making this open source.

geneven 2007-10-08 05:16

Re: N800 & DNS problems
 
http://eko.one.pl/maemo/dists/mistra....1-2_armel.deb

It's too late, I suppose, but the above should set up becomeroot.

luca 2007-10-08 08:58

Re: N800 & DNS problems
 
Quote:

Originally Posted by bill-linux (Post 80477)
5) If you don't plan to change your root password then remove the ssh server at least.

a better option is to generate ssh keys (see man ssh-keygen on a desktop pc running linux, there's an analogous utility with putty for windows), drop the public key in /home/user/.ssh/authorized_keys, test that everything is working then edit /etc/ssh/sshd_config to disable root login and password authentication.
The you can login on the tablet as "user" with no password and nobody can try to login as root.

spooley 2008-09-23 08:31

Re: N800 & DNS problems
 
Quote:

Originally Posted by luca (Post 79039)
the n800 uses dnsmasq for name resolution...take a look at /etc/dnsmasq.conf

Thank you for that pointer.

I was having an issue with openvpn failing to pick up DNS servers for the private network and your mention of dnsmasq led me to read the man page for it. I found just the ability I need: in /etc/dnsmasq.conf I added 'server' directives to explicitly specify a DNS server for my private domain, e.g.

server=/my.private.domain/10.77.1.1

Simon.


All times are GMT. The time now is 15:19.

vBulletin® Version 3.8.8