The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
.
google unix.com



IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script needed to select and delete lower case and mixed case records abhilash mn Shell Programming and Scripting 1 03-17-2008 08:00 AM
Newbie: Simulate unix on my pc welbp00 UNIX for Dummies Questions & Answers 5 01-16-2008 08:43 PM
How can i simulate network problems between unix machines ? umen IP Networking 2 02-12-2007 08:10 AM
simulate text mode in X-Windows shestero UNIX for Advanced & Expert Users 3 10-26-2005 01:33 PM
lower case to upper case string conversion in shell script dchalavadi UNIX for Dummies Questions & Answers 3 05-29-2002 01:07 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-18-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
Simulate 'try again' case

Hi,
I was searching thro the topic and could not find a thread which zeroes in on the case i'm trying to simulate. Basically I have a need to simulate DNS Try again cases, without bringing the dns_sever down (by manipulating the entries in /etc/resolv.conf under 'nameserver' tag). I am so specific about doing this simulation without manipulating resolv.conf, because i have a program which would send UDP requests to dns_server (obviously the return value will be success as i doesnt check whether dns_server exists). In this case, I want dns_server to up, and tell my program when it gets a try again.

So is there a method by which i can simulate 'Host not found, try again' case without terminating nameserver?

PS: If I'm correct, resolv.c contacts the dns server at port 53 (default) to the IP addresses specified under nameserver tag of resolv.conf?

Thanks,
Srini
  #2 (permalink)  
Old 04-18-2007
stdout stdout is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 103
hi,

to be specific -- what are you trying to accomplish?
you already have DNS knowledge there, but what kind of other query you need?
be careful of doing DoS.

cheers.
  #3 (permalink)  
Old 04-19-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
More clarifications

Ah, I'm usually bad at explaining things. Sorry, but I'll give another try.
The actual need for me is to make the nameserver (dns_server) return 'Host not found, try again', irrespective of the IP queried for.
I understand that dns queries undergo multiple hops before they reach the final server. I want to accomplish 'try again' return value in the first hop itself. I currently am aware of 2 possibilities to do this. But I want a third way to do it, because I have some other problem testing my code with the first two possibilities.

Possibility 1: Change the resolv.conf to point to invalid nameserver
Possibility 2: Terminate the local nameserver, or change the local dns_server code to return 'try again' irrespective of the query

PS: I'm an email developer and am not attempting DoS even in its mildest way.

Thanks,
Srini
  #4 (permalink)  
Old 04-21-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
Post More info..

I missed out the key word actually, please excuse me. Actually, by TRY_AGAIN, i mean SERVFAIL case. I want the DNS server to return SERVFAIL case irrespective of the query. I went through 'named' code in bind library, but it was too complex for me to understand and modify.

So is there a workaround?

Thanks,
Srini
  #5 (permalink)  
Old 04-21-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,246
What OS?

You could use iptables / ipfilters to reject incoming requests from your test server on the dns server or to stop them from leaving the test server.
  #6 (permalink)  
Old 04-23-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
Post

Hi,
I'm working on a solaris machine. The iptables idea is actually what i intended for. When I googled, I found that iptables are located at /etc/sysconfig/iptables. It is not present in my system. Can I just create it by myself and will bind code read it when the 'named' is restarted?

BTW, I found a workaround for this problem and I had no way other than to write a fake server to send SERVFAIL to all requests. But still I'm baffled as to why the tcpdump of the reply packet doesnt show SERVFAIL. It just shows some address.

Thanks,
Srini
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0