Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dns nat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
giovo84
n00b
n00b


Joined: 18 Aug 2004
Posts: 2

PostPosted: Thu Aug 19, 2004 12:44 pm    Post subject: dns nat Reply with quote

I have a small home network (two macs and a pc) and use a hardware modem-router (d-link dsl-504T) to share an adsl internet connection. The router runs nat and a dns server. The macs and the pc under windows work fine using the router as gateway and dns server. Then I installed linux (gentoo) and freebsd and configured them the same way. They work fine at ip level, but have trouble with dns. And the strange thing is that in linux some programs work (for example ping, mozilla) and others do not (wget). Example:

localhost% wget http://www.linux.org
--15:26:35-- http://www.linux.org/
=> `index.html.1'
Resolving www.linux.org... 1.0.0.0
Connecting to www.linux.org[1.0.0.0]:80...

and it hangs. But if I do:

localhost% dig www.linux.org

; <<>> DiG 9.2.3 <<>> www.linux.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50051
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;www.linux.org. IN A

;; ANSWER SECTION:
www.linux.org. 29054 IN A 198.182.196.56

;; AUTHORITY SECTION:
linux.org. 35172 IN NS ns0.aitcom.net.
linux.org. 35172 IN NS ns.invlogic.com.

;; Query time: 2054 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Thu Aug 19 15:28:17 2004
;; MSG SIZE rcvd: 104

localhost%

and then use wget again it works (192.168.0.100 is the router address). In freebsd it's similar, to get fetch work, I have to use ping. I understand this is because using ping (or some other thing that resolve dns names) the ip address is resolved and the cached somewhere so that other programs can get it from that cached instead of asking the router.

I think it may be a dns resolver configuration problem, so that is mine:

localhost% cat /etc/resolv.conf
nameserver 192.168.0.100
localhost%

But if there is a configuration error why only some programs should be affected by it? And also, about configuration, I have no registered domain, so how shuld I name the computer (currently is localhost)? And is this important?

Can someone help me?

Thanks
Back to top
View user's profile Send private message
gnuageux
Veteran
Veteran


Joined: 17 Apr 2004
Posts: 1201

PostPosted: Thu Aug 19, 2004 1:00 pm    Post subject: Reply with quote

You can name your computer by adding the desired hostname to /etc/hostname. Why not use your providers dns servers in /etc/resolv.conf rather than your router? May not be the answer you were looking for but it should work.
_________________
The realOTW: http://forums.realotw.org/index.php

Registered Linux user#364538
Back to top
View user's profile Send private message
giovo84
n00b
n00b


Joined: 18 Aug 2004
Posts: 2

PostPosted: Fri Aug 20, 2004 12:23 pm    Post subject: Reply with quote

I did as you said: I modified my resolv.conf putting a couple of dns server and removing my router and it worked. (also in freebsd)
I don't understand what was the problem but it seems fixed so thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum