Re: some dnsmasq problems
Matteo Corti wrote:
> 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
>
Did you read the dnsmasq documentation about using it
for the host housing the daemon?
Are you trying to Telnet/SSH the computer with its external
IP address from the same machine?
The IP stack is smart enough to route packets to *any* of
the local addresses via the loopback interface.
Does the computer have the Telnet / SSH server daemon running?
Does the computer have a firewall up?
For more specific answers, please post:
- the output of ifconfig -a
- the output of route -n
- the output of iptables -nvL
An afterthought: PLEASE do not use publicly accessible Telnet server,
you'll be cracked in no time.
--
Tauno Voipio
tauno voipio (at) iki fi
|