1831022 Members
2385 Online
110018 Solutions
New Discussion

Re: DNS Client problems

 
SOLVED
Go to solution
David Preston_4
Frequent Advisor

DNS Client problems

Hi, I am having some problems setting up my hp box for sending email to an external email server. I used what notes I had to set up the DNS call in SAM (hpux 10.2) to allow sendmail to hit our mail server. and was able to send to our internal mail system with 2 problems.
1) I could not send mail to the outside world, but I think that is on the mail server side.
and 2) my system seemed to lock up, every telnet in required up to a minute to connect and SAM would not opperate until I removed the /etc/resolv.conf file.
Can anyone help? This is my first time trying to set up any DNS even as a client.
Thanks
Dave
11 REPLIES 11
Victor BERRIDGE
Honored Contributor

Re: DNS Client problems

once you use the resolver, if you happen to not have the name resolution you are stuck!
You will have to create on top of /etc/resolv.conf a /etc/nsswitch.conf file to bypass in case of non resolution of name or address.
here is an example of nsswitch.conf file:
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
hosts: files [NOTFOUND=CONTINUE] dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files

Good luck
Cheers
Victor
Victor BERRIDGE
Honored Contributor

Re: DNS Client problems

Ah I forgot
It looks like a permission problem (due to a umaks?): Be sure /etc/resolv.conf is read for everyone otherwise only root can telnet or ftp your machine... ( best would be to set ownership=bin:bin and chmod 444 )

Best regards
Victor
Victor BERRIDGE
Honored Contributor

Re: DNS Client problems

Finally have you configured /etc/mail/sendmail.cf ?
There is a line (around +105...) that starts by:
#DSbbm.something
uncomment it and put the name of your mail server:

DS.mymail.mydomain



All the best

Victor
David Preston_4
Frequent Advisor

Re: DNS Client problems

Victor, I t will take me a while to check out all your suggestions, but I do have 1 question.
How would these settings cause SAM to hang?
I also forgot to mention that I could not log in throught ny X-window emulator until I removed /etc/resolv.conf,
Does any of this make sense?

Thanks, and I will let you know what I find from your responses.
Dave
Berlene Herren
Honored Contributor

Re: DNS Client problems

SAM depends on name resolution to run. To set yourself up as a client, you only need to have a resolv.conf

Example
domain hp.com
nameserver 10.22.34.1

and your /etc/nsswitch.conf to go to DNS for name resolution.

I attached a document that may help.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
Victor BERRIDGE
Honored Contributor

Re: DNS Client problems

I had the case happen 2 years ago when an external consultant supposed to help created an /etc/resolv.conf as:
r-x------ root root resolv.conf
Straight after my phone went bezerk with people complaining about not being able to ftp, I didnt see anything at that time, next day it was telnet also... And I coulnd find what was wrong as I was root..., until I asked someon his account and passwd and tried and realized...
It can come from umask because your are on a trusted machine or sutomized in such way that what root modifies is read only by root...
So the best is bin:bin r--r--r--

All the best
Victor
David Preston_4
Frequent Advisor

Re: DNS Client problems

Victor and Berlene,
Thanks for the help so far, I got the mail working, but it had a side effect.
I set up the /etc/resolv.conf, /etc/nsswitch.conf, and /etc/mail/sendmail.cf as described. including the Chown to bin:bin. but if I do that all my telnet sessions have a delay of up to 5 minutes before they get a login prompt.
is there something else I am missing?
My X emulator works ok now, the mail passes to the world, but this one thing keeps getting in the way, and this is my production box. (Users don't like to wait)

Dave
Kofi ARTHIABAH
Honored Contributor
Solution

Re: DNS Client problems

The problem is that when a telnet connection is made, inetd does a reverse name lookup of the connecting host - ie. the workstation - if it times out (after a couple of minutes) then it will display the prompt.

what has to be done is:

1. Check to make sure that your DNS records have reverse entries (ie. given the IP address/get the hostname and given the hostname get the IP address)

2. to test, insert the IP address of a known host in the /etc/hosts file and try connecting to it from that machine and time it.

3. the "hosts" line in your /etc/resolv.conf should be:

hosts: files [NOTFOUND=continue] dns

note that the keyword continue is in lower case.

Good luck.
nothing wrong with me that a few lines of code cannot fix!
David Preston_4
Frequent Advisor

Re: DNS Client problems

One last Question, If I need to add all my user IP's to /etc/hosts, Can I just list the IP, or do I need to list the host name?

Thanks for all the great help.

Dave
Kofi ARTHIABAH
Honored Contributor

Re: DNS Client problems

You need both the IP address and a name - it need not be the "real" name of the machine - any name will do.
nothing wrong with me that a few lines of code cannot fix!
David Preston_4
Frequent Advisor

Re: DNS Client problems

Thanks for the help. It took a little of each answer to turn the trick. but I am now up and running.

Thanks Again
Dave