Reverse DNS problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reverse DNS problem
# 1  
Old 08-26-2008
Reverse DNS problem

Hi everyone,

I am having a problem in the following area:

I want to arrange list of Ip Addresses selected from a multiple files and make it look like this:

"IP=192.168.0.1, hostname=snake.cooliris.com"

Now i have already written the code to select the ip address from various files but want this part to be working.

Thanks a lot.
# 2  
Old 08-26-2008
Quote:
Originally Posted by snake450
Now i have already written the code to select the ip address from various files but want this part to be working.
And where is your code and where is the problem?
Whitout the code we can't tell you where the problem is!
# 3  
Old 08-26-2008
Hey ,
my logic was to get as many file sin as possible so here is the half part of the code

Please correct me if i am wrong.

grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' followed by respective file names which lies under /var/lib/output/ for me atleast.

Now i want to write the code for reverse dns here .....am i on the right path?

I just wanted to add that i know the commands for reverse dns is Nslookup or dig -x followed by the ip address but the thing how do i make to take the ip address from various files and format it.

Last edited by snake450; 08-26-2008 at 09:28 PM..
# 4  
Old 08-26-2008
Quote:
Originally Posted by snake450
Please correct me if i am wrong.

grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' followed by
Your regexp will match anything upto 999.999.999.999

For IPv4 try this awk solution:
Code:
awk -F'.' 'NF==4 && $1 > 0 && $1 && $2 && $3 && $4 <256'

If IP match use the system function to dig your ip and printf to format the output.

Regards,
# 5  
Old 08-27-2008
Hey thanks for the reply but i am not aware how to use the system function to dig my ip from the previous result.....can you enlighten me on that part cause i am having a tough time figuring out how to make the function grab the ip from the grep expression and give it to the reverse dns process.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

DNS reverse lookup issue

Hi guys. Ok so let me lay out my configs. I can do a NSlookup from client to server BUT NOT a reverse lookup. DNS server: Optimus.jaydomain.com IP : 192.168.1.50 DNS Client: Megatron.jaydomain.com IP : 192.168.1.60 On Sever: # cat /etc/named.conf // // named.conf // // Provided... (4 Replies)
Discussion started by: Junaid Subhani
4 Replies

2. IP Networking

HOWTO: Linux multihomed dns client - reverse lookup

The following thread is closed: 133552-howto-linux-multihomed-dns-client (Sorry I am not allowed to post URLs) Therefore I write this append in an own thread. The HOWTO in the referenced thread helped me a lot and I only want to append how to make reverse lookup working for a local zone: ... (0 Replies)
Discussion started by: scheruga
0 Replies

3. IP Networking

Reverse DNS

Hello, I'm trying to get reverse dns to point to my domain on network but I'm failing. I am using bind dns with port 53 enabled and my ISP is mediacom. Currently my reverse dns is *.client.mchsi.com and I would like to make it example.com basically. My bind configuration I have 2 records, one... (4 Replies)
Discussion started by: GRMrGecko
4 Replies

4. Red Hat

Mail Problem. Maybe, it is a DNS Problem!

Hi, i've a redhat linux 9 upadated by redhat from 7 version to 9 version. A couple of days ago i was a problem with my mail, in other words i'm not able to get any email nor to send any email. I've a proxy configuration and i tried to set iptables in order to verify the port. The 110,255 and 995... (1 Reply)
Discussion started by: pintalgi
1 Replies

5. UNIX for Dummies Questions & Answers

DNS forward and reverse entry required thorugh scripting instead of manually done

HI GUrus, I am very mcuh new for this forum ....i need you all guys help for resolving my queries. As i have DNS server , platform is sunsolaris----8. We are using that serevr for resolving all network nodes. I am going to explain the process what i am following .... I could have... (2 Replies)
Discussion started by: leenagoyal
2 Replies

6. UNIX for Advanced & Expert Users

dnsstuff says no reverse dns in place, but there is!

Folks...have just stumbled on an issue where DNSstuff says there is no reverse dns in place when there is...as evidenced by a reverse check from 3 diff networks. Any advice why this would be happening (DNSstuff-wise) would be appreciated. Jordan: jsd@standby:~$ host 12.177.133.70... (3 Replies)
Discussion started by: jsd
3 Replies

7. UNIX for Advanced & Expert Users

[DNS] Reverse Lookup for 2 IP Addresses

Originally I had the server at home and on Comcast so I used dyndns.org for DNS. Once the server got a bit more popular, I leased a server at a colo facility. They set up the server name in their DNS so I didn't really have any reason to manage my own DNS. DynDNS was managing the domains and I... (7 Replies)
Discussion started by: BOFH
7 Replies

8. UNIX for Dummies Questions & Answers

telnet refused / reverse DNS issue?

I have users with laptops who may telnet from the local network one minute and then connect remotely a short time later from a different IP address. This causes a problem as the UnixWare 7.1.1 server appears to try to resolve the remote machine name (via our primary DNS server) to the IP... (4 Replies)
Discussion started by: rm -r *
4 Replies

9. IP Networking

reverse lookup file problem

I'm trying to create a reverse lookup file. Below are the error messages I get in the messages file, when I start named. Below the error messages is a copy of the reverse lookup file I'm trying to use. I'm using Bind version 8.1.2. Would someone recommend the correct values and if you see any... (2 Replies)
Discussion started by: Westy564
2 Replies
Login or Register to Ask a Question