Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DNS Connection Question



On 20 Oct 2004 Grant M. wrote:

> What exactly is it that you are trying to do? Verify IP addresses? 
> Lookup Hostnames? Something else? Perhaps there is a better way to do it.

Sorry if I didn't make that clear.  A user enters the name of a 
nameserver in a form.  I want to verify at least that it appears to 
exist (easy to do, just a gethostbyname() call) but also, if I can, 
that it is truly a nameserver.  It saves me from dealing with 
everything from typos to malicious entries.  It's by no means perfect --
they can still put in an erroneous nameserver name, for example -- but 
it's better than no verification at all.

Simply making a TCP connection on port 53 works well about 98% of the 
time, but apparently some nameservers are configured to only accept UDP 
on that port, and those my code currently considers to be invalid, 
requiring manual intervention.  That's the problem I'm working on.  
While the systems involved are running Linux, it's really a networking 
question not a Linux question.

--
Tom







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org