Re: [tcllib] dns::resolve and rbl-query



Giuppech <apencil@xxxxxxxxxx> writes:

>Hi all,
>I'm new in tcl (and in programming too, to be honest), so, if
>my question is not so interesting, please be patient :-)
>
>
>I'm trying to do a dns query using the tcllib_dns with the fqdn:
>21.189.61.200.sbl-xbl.spamhaus.org
>
>doing a query with dig or with nslookup gives me the right answer
>(at the moment I'm writing the ip 200.61.189.21 IS present in
>sbl-xbl.spamhaus.org); but with tcl I have this:
>
>% package require dns
>1.2.0
>% set tok [dns::resolve 21.189.61.200.sbl-xbl.spamhaus.org]
>::dns::1
>% dns::status $tok
>error

% package require dns
1.2.1
% set tok [dns::resolve dns://london/21.189.61.200.sbl-xbl.spamhaus.org]
::dns::1
% dns::status $tok
ok
% dns::result $tok
{name 21.189.61.200.sbl-xbl.spamhaus.org type A class IN ttl 3600
rdlength 4 rdata 127.0.0.6} {name 21.189.61.200.sbl-xbl.spamhaus.org
type A class IN ttl 3600 rdlength 4 rdata 127.0.0.4}

The above DNS URL syntax is equivalent to using
dns::configure -nameserver london

It isn't obvious if you are using tcp or udp. Some servers will only
work with UDP so that might be an answer. Get the tcludp package for
udp support. The DNS package will use UDP if it can find tcludp.

You might try dns::error $tok to see what the error information is.

--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
.



Relevant Pages

  • Re: NETDIAG problem - SPN queries
    ... Ethernet adapter Local Area Connection: ... Connection-specific DNS Suffix. ... There is no primary WINS server defined for this adapter. ... Description: RSVP UDP Service Provider ...
    (microsoft.public.win2000.dns)
  • RE: DNS ACL ?
    ... > Not all DNS clients automatically try to negotiate bigger UDP ... The same goes for DNS servers. ... as a part of the response, but could not be included in its entirety. ...
    (Pen-Test)
  • Re: Some help interpreting log snipped please?
    ... >apps only, with fw set to block anything else -all protocols,even dns, ... >for each app). ... UDP Source address _can_ and usually IS faked. ... As I'm not stupid enough to be using windoze, ...
    (comp.security.firewalls)
  • Re: Help with ipfw rules to allow DNS queries through
    ... Thanks a whole heap! ... I am guessing that this broken UDP rule may have been ... > UDP from your box, including DNS, if I'm read your ruleset rightly? ... > Does the output of 'ipfw list' or 'ipfw show' include that UDP rule? ...
    (FreeBSD-Security)
  • Re: SMTP delivery failure when NIC DNS server points to router
    ... I learned that the router's DNS server does not listen to TCP queries. ... Configure the SMTPSVC to use UDP for DNS queries. ...
    (microsoft.public.inetserver.iis.smtp_nntp)