Skip to content

how to rewrite ptr records #2

@sxauyhz

Description

@sxauyhz

for example, corefile :

rewriteng ANY ANY substring k8s.test.com  nginx-deploy.default.svc.cluster.local {
          answer name regex (.*)\.nginx-deploy.default.svc.cluster.local. {1}.k8s.test.com.
          answer data regex (.*)\.nginx-deploy.default.svc.cluster.local. {1}.k8s.test.com.
          authority both suffix nginx-deploy.default.svc.cluster.local. k8s.test.com.
          additional both suffix nginx-deploy.default.svc.cluster.local. k8s.test.com.
}

~]# nslookup nginx-rc1-77bpb.k8s 127.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: nginx-rc1-77bpb.k8s.test.com
Address: 10.30.253.110

~]# nslookup 10.30.253.110 127.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53

110.253.30.10.in-addr.arpa name = nginx-rc1-77bpb.nginx-deploy.default.svc.cluster.local.

### how to rewrite "nginx-rc1-77bpb.nginx-deploy.default.svc.cluster.local." to "nginx-rc1-77bpb.k8s.test.com" ??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions