View Single Post

  #1 (permalink)  
Old 11-29-2004
Matteo Corti
 
Posts: n/a
Default some dnsmasq problems

Hi,

I just installed dnsmasq at home and I have a strange problem.

My setup:

- a router/gateway machine with an external ip (let's call it
my_ip) with an internal ip (192.168.1.1)
- several machines in the 192.168.1.0 network

On the gatway /etc/resolv.conf is generated by the DHCP client on the
external interface and the /etc/hosts contains the local machines:

[root@gateway root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

192.168.1.1 gateway
192.168.1.10 patrick
192.168.1.20 matteo
192.168.1.30 andreas
192.168.1.254 ap

On the "internal machines" i simply have set up the DNS server to be
192.168.1.1

Everything seems to work but:

On a local machine:

> host myname.mydomain

returns my_ip wanderful!

> telnet myname.mydomain 80

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

And here telnet (but also mozilla, ssh, ...) resolves myname.mydomain
to localhost.

I am puzzled: are host and other linux programs using different
methods to resolv domain names (host seems to use libresolv but I
didn't really get what telnet is doing).

On the dns server everything seems ok:
[root@gateway root]# host myname.mydomain
casa.dyndns.info has address my_ip
[root@gateway root]# telnet myname.mydomain 80
Trying my_ip...
Connected to myname.mydomain.
Escape character is '^]'.

I'm pretty sure that problem is pretty simple but at the moment I am
clueless...

Many thanks for any hint.

Matteo

--
Matteo Corti
Computer Systems Institute
Swiss Federal Institute of Technology Zurich
Reply With Quote