Results 1 to 4 of 4
Greetings
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-29-2005 #1Just Joined!
- Join Date
- Apr 2005
- Posts
- 14
Perl DNS reply
Greetings
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.
Fahad
- 04-29-2005 #2Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
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 yahoo.com any (doesn't actually use dig)
- 04-30-2005 #3Just Joined!
- Join Date
- Apr 2005
- Posts
- 14
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
Fahad
- 04-30-2005 #4Linux Newbie
- Join Date
- Mar 2005
- Posts
- 230
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:
query:
1 question record
response:
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?


Reply With Quote
