Mysql PTR

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mysql PTR

Graham White-5

Tried to get a reverse lookup working on an ip but without much success, I tried a few variations on the insert statement below, any ideas? Thanks

 

insert into records (domain_id, name,type,content,ttl,prio) select id ,’test.com’,

'PTR', ‘192.168.50.1’, 3600, 0 from domains where name='test.com';

 

Graham White

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

RE: Mysql PTR

Roeland Nieuwenhuis-2
Hi,

You need the arpa representation.

1.50.168.192.in-addr.arpa as name not 192.168.50.1.

Regards,

Roeland
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Graham
White
Sent: vrijdag 28 februari 2003 3:52
To: [hidden email]
Subject: [Pdns-users] Mysql PTR


Tried to get a reverse lookup working on an ip but without much success,
I tried a few variations on the insert statement below, any ideas?
Thanks

insert into records (domain_id, name,type,content,ttl,prio) select id
,'test.com',
'PTR', '192.168.50.1', 3600, 0 from domains where name='test.com';

Graham White
[hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: Mysql PTR

AJ McKee
In reply to this post by Graham White-5
Something I learned just last night.

Your domain name is going to be somthing like this.

13.13.13.in-addr.arpa and then each record for each host will be a PTR
record. so you would only have to enter in the last digits of the Ip
address.

Your SQL looks like:

DOMAIN;
INSERT INTO domains VALUES (68, '141.168.192.in-addr.arpa', NULL, NULL,
'NATIVE', NULL, NULL);
RECORD
INSERT INTO records VALUES (640, 68, '3.141.168.192.in-addr.arpa',
'PTR', ns.yourdomain.com, 3600, 0, 1046327878);



I hope that helps.
AJ

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Graham
White
Sent: 28 February 2003 02:52
To: [hidden email]
Subject: [Pdns-users] Mysql PTR


Tried to get a reverse lookup working on an ip but without much success,
I tried a few variations on the insert statement below, any ideas?
Thanks

insert into records (domain_id, name,type,content,ttl,prio) select id
,'test.com',
'PTR', '192.168.50.1', 3600, 0 from domains where name='test.com';

Graham White
[hidden email]