Simulate 'try again' case


 
Thread Tools Search this Thread
Special Forums IP Networking Simulate 'try again' case
# 1  
Old 04-18-2007
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  
Old 04-18-2007
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  
Old 04-19-2007
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  
Old 04-21-2007
Java 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  
Old 04-21-2007
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  
Old 04-23-2007
Java

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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change first letter of a word from lower case to upper case

Hi all, I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like . ; : ! ?I found the following command sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies

2. Red Hat

Simulate Storage

Hello, I wanted to simulate SAN on my VMware PLayer running RHEL. Is there any tool that can be used to simulate storage setup for learning/testing? THanks, (1 Reply)
Discussion started by: ikn3
1 Replies

3. Shell Programming and Scripting

Conversion from Upper Case to Lower Case Condition based

Hello Unix Gurus : It would be really appreciative if can find a solution for this . I have records in a file . I need to Capitalize the records based on condition . For Example i tried the following Command COMMAND --> fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies

4. Programming

Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX

Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies

5. Shell Programming and Scripting

[Solved] Change Upper case to Lower case in C shell

Is there a command that can switch a character variable from UPPER case to lower case? like foreach AC ( ABC BCD PLL QIO) set ac `COMMAND($AC)` ... end Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies

6. Shell Programming and Scripting

sed ignoring case for search but respecting case for subtitute

Hi I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute": original becomes substitute Origninal becomes Substitute ORIGINAL becomes SUBSTITUTE I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies

7. Shell Programming and Scripting

data array needs to change upper case to lower case

Hi all, i have a data array as followes. ARRAY=DFSG345GGG ARRAY=234FDFG090 ARRAY=VDFVGBGHH so on.......... i need all english letters to be change to lower case. So i am expecting to see ARRAY=dfsg345ggg ARRAY=234fdfg090 ARRAY=vdfvgbghh so on........ If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies

8. Shell Programming and Scripting

Script needed to select and delete lower case and mixed case records

HELLO ALL, URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE. FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY and the CITY column records will be: Newyork washington ... (1 Reply)
Discussion started by: abhilash mn
1 Replies

9. UNIX for Dummies Questions & Answers

lower case to upper case string conversion in shell script

How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
Login or Register to Ask a Question