Networking Forums

Networking Forums > Computer Networking > Linux Networking > Stupid DNS queries

Reply
Thread Tools Display Modes

Stupid DNS queries

 
 
theking
Guest
Posts: n/a

 
      05-12-2005, 06:41 PM
Hello,

I have a linux box on a local network
This is a redhat 8
There is no DNS server on the linux, nor on my local network, so the
/etc/resolv.conf has the DNS servers of my ISP.

My problem : this stupid box makes stupid reverse DNS queries when I
connect to it (for example with telnet) from a machine on my network
whitch is not known in its /etc/hosts file.
This makes my gateway connecting uselessly to internet !
And I don't want add all names of machines on my network in all hosts
files.

My questions :
1) I suppose linux wants to know the name of the machine whitch connects
to it, to put the name in a log, am I right ?
2) Can I disable this name lookup ?
3) The most interesting : why this system makes DNS queries for machines
which are on the local network ? I have not found in
redhat-config-network the same option as in windows : "don't use DNS for
local addresses"
Note : the local network address and mask are correctly set.

Thanks



 
Reply With Quote
 
 
 
 
SEND NO SPAM
Guest
Posts: n/a

 
      05-12-2005, 09:00 PM
theking wrote:
> Hello,
>
> I have a linux box on a local network
> This is a redhat 8
> There is no DNS server on the linux, nor on my local network, so the
> /etc/resolv.conf has the DNS servers of my ISP.
>
> My problem : this stupid box makes stupid reverse DNS queries when I
> connect to it (for example with telnet) from a machine on my network
> whitch is not known in its /etc/hosts file.


Telnet is insecure You should use ssh if anyone one the internet can see
Your telnet sessions

> This makes my gateway connecting uselessly to internet !
> And I don't want add all names of machines on my network in all hosts
> files.


Is that really a problem ?? How many are there.

>


if you want to use hostnames for connections they must be resolved to
ipaddresses somewhere.

> My questions :
> 1) I suppose linux wants to know the name of the machine whitch connects
> to it, to put the name in a log, am I right ?


No it's so the machine's know what address a host is at and if it really
exists.

> 2) Can I disable this name lookup ?


NO but you can telnet to and ip address every time (xxx.xxx.xxx.xxx)

> 3) The most interesting : why this system makes DNS queries for machines
> which are on the local network ? I have not found in
> redhat-config-network the same option as in windows : "don't use DNS for
> local addresses"


WINBLOWS uses their own method of networking. If Your connecting a Linux
box to a Microsucks network there may be a way to use there hostname
resolution system.

> Note : the local network address and mask are correctly set.
>
> Thanks
>
>
>

 
Reply With Quote
 
Ohmster
Guest
Posts: n/a

 
      05-12-2005, 11:41 PM
"theking" <(E-Mail Removed)> wrote in news:4283a39c$0$25908
$(E-Mail Removed):

> I have a linux box on a local network
> This is a redhat 8


Unrelated to your question, but redhat 8 is rather old and has been EOL
for a long time. I just got into trouble with my redhat 9 box on the net
that I have loved dearly for years and years. Script kiddies got in and
spammed thousands from my domain, deposited phishers, viruses, etc, (No
they did not get root) and this caused me a lot of grief. apached was
exploited by the script kiddies.

I asked for help from the linux newsgroups and I got it, but I also got
severely admonished for using an EOL distro on the public internet like
redhat 9. I did not want to hear it but they were right, I threw in the
towel and grabbed fedora core 3 and redid the machine. I cannot tell you
how nice it is to run up2date again or see the flashing red icon in
gnome, telling me that there are 153 updates waiting to be downloaded and
installed. All done, what a feeling, security at last!

Dude, do yourself a favor and ditch the redhat 8. Fedora core is free and
it is the same thing, go and grab it, here:
http://www.linuxiso.org/distro.php?distro=64

If the servers are horribly slow and you cannot get disc 4, here is a
better download link, very fast, you will have it overnight with wget.
http://linux.rz.ruhr-uni-bochum.de/d...386/core3-iso/

About your question, I too have a local LAN and yes, I name all my
machines and it is not a big deal to put the local IP of the machine and
it's name in your /etc/hosts file. Here is mine:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.1 mydomain.com myotherdomain.org ohmster
192.168.0.2 cindy
192.168.0.3 missy

I munged the domain names, it is not necessary for this reply. Do that an
no more "stupid DNS queries because the machine will know that
192.168.0.2 is named "brad" and is a local machine.

There may be a way of "turning off DNS querries" but this is probably a
bad idea, security and all. My IP is static and my LAN machines have NAT
IP addresses that I gave them in the 192.168.0.xx range, so I name the
machines in /etc/hosts. When I first did this years ago, I setup a DHCP
server on the redhat machine (might have been redhat 6 back then.) and it
worked quite well, the LAN machines got an IP from the linux box when
they were turned on and I do not recall having DSN issues back then. It
was pretty neat, would be good if you wanted to just plug more machines
into the hub and away you go with automatic DNS and IP on your local
machines. After changine distros, I did not feel like setting up the DCHP
again, it was a cool learning process and I got it to work, with help
from the usenet linux community, so I now use static IPs.

Not kidding about old distros that are out of date and not "updateable"
anymore, just giving you advice by someone that had just recently "been
there done that" and got whacked because of it.

Cheers,
--
~Ohmster
ohmster at newsguy dot com
 
Reply With Quote
 
Chris Lowth
Guest
Posts: n/a

 
      05-13-2005, 01:20 PM
theking wrote:
> Hello,
>
> I have a linux box on a local network
> This is a redhat 8
> There is no DNS server on the linux, nor on my local network, so the
> /etc/resolv.conf has the DNS servers of my ISP.
>
> My problem : this stupid box makes stupid reverse DNS queries when I
> connect to it (for example with telnet) from a machine on my network
> whitch is not known in its /etc/hosts file.
> This makes my gateway connecting uselessly to internet !
> And I don't want add all names of machines on my network in all hosts
> files.
>
> My questions :
> 1) I suppose linux wants to know the name of the machine whitch connects
> to it, to put the name in a log, am I right ?
> 2) Can I disable this name lookup ?
> 3) The most interesting : why this system makes DNS queries for machines
> which are on the local network ? I have not found in
> redhat-config-network the same option as in windows : "don't use DNS for
> local addresses"
> Note : the local network address and mask are correctly set.
>
> Thanks


Strikes me that it could be tcp_wrappers doing its stuff. This is the
code that looks in /etc/hosts.allow and /etc/hosts.deny to find out
whether or not to allow access.

Do you have host or domain names in your /etc/hosts.allow file? - if so,
try replacing them with IP addresses.

--
http://www.lowth.com - GPL'ed IpTables addins.
http://www.lowth.com/rope/BlockingBittorrent
- Identifying the Bittorrent protocol with iptables and "rope".
 
Reply With Quote
 
theking
Guest
Posts: n/a

 
      05-13-2005, 03:23 PM
> Strikes me that it could be tcp_wrappers doing its stuff. This is the
> code that looks in /etc/hosts.allow and /etc/hosts.deny to find out
> whether or not to allow access.
>
> Do you have host or domain names in your /etc/hosts.allow file? - if

so,
> try replacing them with IP addresses.
>


.... These files are empty




 
Reply With Quote
 
Bruno Wolff III
Guest
Posts: n/a

 
      05-19-2005, 01:28 PM
In article <4283a39c$0$25908$(E-Mail Removed)>, theking wrote:
> Hello,
>
> I have a linux box on a local network
> This is a redhat 8
> There is no DNS server on the linux, nor on my local network, so the
> /etc/resolv.conf has the DNS servers of my ISP.
>
> My problem : this stupid box makes stupid reverse DNS queries when I
> connect to it (for example with telnet) from a machine on my network
> whitch is not known in its /etc/hosts file.
> This makes my gateway connecting uselessly to internet !
> And I don't want add all names of machines on my network in all hosts
> files.


You probably want to running a publishing DNS server for your local network.
You can have it publish PTR records for IP addresses you use locally and
any private domain names.
You will also want to run your own cache or cache/forwarder that points
to your publishing server for the information above.
This is pretty easy to do with djbdns, but I suspect you can do it with
bind as well.
 
Reply With Quote
 
SK
Guest
Posts: n/a

 
      05-20-2005, 04:37 AM
<snip>
There is no DNS server on the linux, nor on my local network, so the
/etc/resolv.conf has the DNS servers of my ISP.

My problem : this stupid box makes stupid reverse DNS queries when I
connect to it (for example with telnet) from a machine on my network
whitch is not known in its /etc/hosts file.
</snip>

For all name look ups linux first see's /etc/hosts file and then talks
to DNS(default changes by altering the /etc/host.conf entry). Since you
have given your ISP's DNS servers in resolv.conf all queries are sent
to the internet.

<snip>
I have not found in redhat-config-network the same option as in windows
: "don't use DNS for local addresses"
</snip>
Because linux doesn't use NETBIOS, it wont.

Better you can put the host entries in /etc/hosts and if there are more
number of clients consider setting up a local DNS server that will act
both as caching DNS for public domains and serve your local names.

HTH,
SK

 
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
stupid sky! lol Beck Broadband 3 03-12-2007 01:11 PM
Stupid question kráftéé Broadband 2 12-21-2006 07:50 PM
Am I being stupid? ukwizkid Wireless Internet 14 08-03-2006 08:42 PM
I am stupid Jorge Wireless Networks 2 10-11-2005 04:36 PM
More fax queries David G Broadband 6 09-15-2004 10:47 PM



1 2 3 4 5 6 7 8 9 10 11