Find the answer to your Linux question:
Results 1 to 4 of 4

Thread: Perl DNS reply

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Perl DNS reply


    i am configuring DNS using Perl language. It is working fine but i need to send the reply packet of DNS back to the client. I am unable to do that. Uptill yet my perl code captures the DNS packet detined to it, then process it finds all records answers but do not send the packet back to the client. please help me. Thanks alot.


  2. #2
    Are you using the DNS module available from CPAN? Or maybe you're using socket to handle the dns information in the raw? If the latter, I can definately help you. If the former, I could probably help you anyway. I wrote the following script in perl handling the dns information in the raw:

    dig any (doesn't actually use dig)

  3. #3
    thx for replying. yes im using dns module from CPAN. i have writen a script that does everything but donot send reply back to the client. infact i cannot figure out how to send dns packet back to the client address.
    pleas write if u can help. thanx again

  4. $spacer_open
  5. #4
    Alright, first let's talk about the logistics of your program. You say that it captures a packet with answer records? Those kind of packets are not supposed to be replied to. This is how query/response works:

    1 question record

    0 or 1 question record
    0 or more answer records
    0 or more authority records
    0 or more additional records

    So is your program acting as a dns server or client?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts