LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Double Reverse DNS + DHCP (https://www.linuxquestions.org/questions/linux-networking-3/double-reverse-dns-dhcp-12124/)

MikHud 01-19-2002 12:03 PM

Double Reverse DNS + DHCP
 
When using a telent server on a LAN with DHCP, is it necessary to have a local DNS eg BIND?

All PCs (W98) on the LAN use DHCP (served by a dial-up ISDN router) which assigns IPs to them and also provides them with the Internet DNS IPs as provided by my ISP. This works fine, and the PCs can browse the internet resolving domain names OK. My Telnet Server is on Red Hat 7.2 which does not use DHCP but has a static IP which is set in the telnet clients on the PCs. There is no DNS eg: BIND installed on the telnet server.

Problem:-
Telnet connections are very slow (20-30 secs) and the server is calling the internet DNS each time a client connects. I know this because I have installed a Router Monitor (RBC Data) which deciphers the last packet to make an internet call. The internet calls are UDP Protocol 17 to Port 53, and the Destination is the first nameserver listed in Red Hat's /etc/resolv.conf. I believe this may be called "Double reverse DNS".
Deleting (renaming) /etc/resolv.conf cures the telnet problems, but of course I can't then refer to internet DNS to resolve domain names eg: for web browsing from Red Hat.
Presumably the RH telnet server is trying to check the domain names of the telnet clients when they connect. This checking is not essential because I get nice fast telnet connections when resolv.conf is removed.
Is there any way to tell the telnet server not to check the name of each client, or is there another way (other than resolv.conf) to provide DNS to non-telnet internet services such as the web browser? Or is the only solution to install BIND which I understand is not the easiest service to configure.

I might move to SSH so ideally I'd like a solution that will work with SSH too!

lfslinux 01-19-2002 12:23 PM

Re: Double Reverse DNS + DHCP
 
Quote:

Originally posted by MikHud
When using a telent server on a LAN with DHCP, is it necessary to have a local DNS eg BIND?

All PCs (W98) on the LAN use DHCP (served by a dial-up ISDN router) which assigns IPs to them and also provides them with the Internet DNS IPs as provided by my ISP. This works fine, and the PCs can browse the internet resolving domain names OK. My Telnet Server is on Red Hat 7.2 which does not use DHCP but has a static IP which is set in the telnet clients on the PCs. There is no DNS eg: BIND installed on the telnet server.

Problem:-
Telnet connections are very slow (20-30 secs) and the server is calling the internet DNS each time a client connects. I know this because I have installed a Router Monitor (RBC Data) which deciphers the last packet to make an internet call. The internet calls are UDP Protocol 17 to Port 53, and the Destination is the first nameserver listed in Red Hat's /etc/resolv.conf. I believe this may be called "Double reverse DNS".
Deleting (renaming) /etc/resolv.conf cures the telnet problems, but of course I can't then refer to internet DNS to resolve domain names eg: for web browsing from Red Hat.
Presumably the RH telnet server is trying to check the domain names of the telnet clients when they connect. This checking is not essential because I get nice fast telnet connections when resolv.conf is removed.
Is there any way to tell the telnet server not to check the name of each client, or is there another way (other than resolv.conf) to provide DNS to non-telnet internet services such as the web browser? Or is the only solution to install BIND which I understand is not the easiest service to configure.

I might move to SSH so ideally I'd like a solution that will work with SSH too!

You can tell your system to try to resolve a hostname through local files like /etc/hosts first. If that fails, it will use the nameservers listed in /etc/resolv.conf

Here's how it's setup best:

Edit the /etc/nsswitch.conf file if you have it and check for this line:

hosts: files dns

it may be reversed, as: hosts: dns files

If so, change it.

if you don't have the /etc/nsswitch.conf file, create it and add "hosts: files dns" to it.


Next, edit or create the /etc/host.conf file and have it contain the following:

order hosts,bind


Now try telnet again (no need to restart network or anything. These changes should take effect on-the-fly when the next network attempt is made by a program)

Scotty2435 03-06-2002 01:42 PM

i have the same problem except with ftp and pop3 as well. I can't just add to /etc/hosts because I don't have the ips for everyone trying to use pop3 and ftp. Is there anyway to tell /etc/hosts to allow any ip or just disable reverse dns in all my services. Keep in mind I still want to be able to browse internet from the problem server.
Thanks

lfslinux 03-06-2002 05:15 PM

Quote:

Originally posted by Scotty2435
i have the same problem except with ftp and pop3 as well. I can't just add to /etc/hosts because I don't have the ips for everyone trying to use pop3 and ftp. Is there anyway to tell /etc/hosts to allow any ip or just disable reverse dns in all my services. Keep in mind I still want to be able to browse internet from the problem server.
Thanks

I'd say adding a DNS server to /etc/resolv.conf should fix all your reverse DNS problems. As long as that DNS server (say your ISP) can be reached at the time of somebody making a connection, there shouldn't be any problem.

pop3 and ftp shouldn't disallow access when an IP can't be resolved, they just time out after a while. Sometimes you can tell pop3 and ftp servers not to do any reverse DNS lookups, but that's highly server dependant.

Scotty2435 03-06-2002 08:38 PM

thanks for your help. I solved my problem by adding the lan computers to /etc/hosts. The outside computers that i tested did not have the logon lag problem anyway. Some might though.


All times are GMT -5. The time now is 03:39 PM.