dont include PTR records as host name #10

Closed
opened 2024-02-22 11:00:13 +00:00 by jon_nfc · 7 comments
jon_nfc commented 2024-02-22 11:00:13 +00:00 (Migrated from gitlab.com)

Exclude hostnames that are pure PTR DNS records. i.e. ip 172.16.84.135 as host name 172-16-84-135.

These hostnames should not be added to the IPAM address host name field as part of a scan report update.

example at path nmaprun.host which is a list of dict:

{
    "address": {
        "@addr": "172.16.83.68",
        "@addrtype": "ipv4"
    },
    "hostnames": {
        "hostname": {
            "@name": "172-16-83-68.cluster-service.automation.svc.cluster.local",
            "@type": "PTR"
        }
    },
    "status": {
        "@reason": "echo-reply",
        "@reason_ttl": "62",
        "@state": "up"
    },
    "times": {
        "@rttvar": "260499",
        "@srtt": "260499",
        "@to": "1302495"
    }
}

of note "@type": "PTR" does not denote the DNS name is a PTR, just that a PTR record was used to resolve. if the host has propper DNS name it will still show up in the @name field

Task

  • Filter out PTR DNS records as an IP Address host name
Exclude hostnames that are pure `PTR` DNS records. i.e. ip `172.16.84.135` as host name `172-16-84-135`. These hostnames should not be added to the IPAM address host name field as part of a scan report update. example at path `nmaprun.host` which is a `list of dict`: ``` json { "address": { "@addr": "172.16.83.68", "@addrtype": "ipv4" }, "hostnames": { "hostname": { "@name": "172-16-83-68.cluster-service.automation.svc.cluster.local", "@type": "PTR" } }, "status": { "@reason": "echo-reply", "@reason_ttl": "62", "@state": "up" }, "times": { "@rttvar": "260499", "@srtt": "260499", "@to": "1302495" } } ``` of note `"@type": "PTR"` does not denote the DNS name is a PTR, just that a PTR record was used to resolve. if the host has propper DNS name it will still show up in the `@name` field ## Task - [x] Filter out `PTR` DNS records as an IP Address host name
jon_nfc commented 2024-02-22 11:00:13 +00:00 (Migrated from gitlab.com)

added 5m of time spent

added 5m of time spent
jon_nfc commented 2024-02-22 11:57:39 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
jon_nfc commented 2024-02-23 09:29:19 +00:00 (Migrated from gitlab.com)

assigned to @jon_nfc

assigned to @jon_nfc
jon_nfc commented 2024-02-24 03:52:00 +00:00 (Migrated from gitlab.com)

mentioned in merge request !11

mentioned in merge request !11
jon_nfc commented 2024-02-24 11:37:54 +00:00 (Migrated from gitlab.com)

marked the checklist item Filter out PTR DNS records as an IP Address host name as completed

marked the checklist item **Filter out `PTR` DNS records as an IP Address host name** as completed
jon_nfc commented 2024-02-24 11:38:39 +00:00 (Migrated from gitlab.com)

mentioned in commit 667de0a41b

mentioned in commit 667de0a41bd6766cff7f1a2f8cbbf20fad8b0892
jon_nfc commented 2024-02-24 12:56:46 +00:00 (Migrated from gitlab.com)

mentioned in commit 0d11c40e21

mentioned in commit 0d11c40e21aad216e41141fc6085108ec8d14c3e
jon_nfc (Migrated from gitlab.com) closed this issue 2024-02-24 12:56:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ansible-collections/phpipam_scan_agent#10
No description provided.