惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
月光博客
月光博客
T
Tailwind CSS Blog
Y
Y Combinator Blog
L
Lohrmann on Cybersecurity
Latest news
Latest news
H
Heimdal Security Blog
MongoDB | Blog
MongoDB | Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
阮一峰的网络日志
阮一峰的网络日志
C
CXSECURITY Database RSS Feed - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
小众软件
小众软件
Security Archives - TechRepublic
Security Archives - TechRepublic
The Cloudflare Blog
T
Threatpost
S
Secure Thoughts
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
爱范儿
爱范儿
SecWiki News
SecWiki News
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
D
DataBreaches.Net
S
Security @ Cisco Blogs
B
Blog RSS Feed
N
News and Events Feed by Topic
V
Visual Studio Blog
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Plugin on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns errors grpc_server https https3 docker auto geoip multisocket nomad dnstap import ready etcd header loadbalance bind grpc file prometheus quic kubeforward JSON gslb autopath dnssec root fanout k8s_cache bufsize k8s_external reload gathersrv meship meshname multicluster acl cache recursor health trace k8s_event redis dns64 finalize kubenodes ebpf rrl secondary mysql warnlist loop minimal sign azure git local any cancel debug erratic metadata nsid pprof alternate k8s_dns_chaos records k8s_gateway hosts netbox mdns wgsd alias chaos whoami lighthouse ens idetcd gravwell amazondns kubernetai redisc unbound on dump pdsql ipin Logging with dnstap demo example When Should Plugins be External? Add External Plugins How Queries Are Processed in CoreDNS How to Add Plugins to CoreDNS Writing Plugins for CoreDNS
route53
2022-05-11 · via Plugin on CoreDNS: DNS and Service Discovery

Description

The route53 plugin is useful for serving zones from resource record sets in AWS route53. This plugin supports all Amazon Route 53 records (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html). The route53 plugin can be used when CoreDNS is deployed on AWS or elsewhere.

Syntax

route53 [ZONE:HOSTED_ZONE_ID...] {
    aws_access_key [AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY] # Deprecated, uses other authentication methods instead.
    aws_endpoint ENDPOINT
    credentials PROFILE [FILENAME]
    fallthrough [ZONES...]
    refresh DURATION
}
  • ZONE the name of the domain to be accessed. When there are multiple zones with overlapping domains (private vs. public hosted zone), CoreDNS does the lookup in the given order here. Therefore, for a non-existing resource record, SOA response will be from the rightmost zone.

  • HOSTED_ZONE_ID the ID of the hosted zone that contains the resource record sets to be accessed.

  • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY the AWS access key ID and secret access key to be used when querying AWS (optional). If they are not provided, CoreDNS tries to access AWS credentials the same way as AWS CLI - environment variables, shared credential file (and optionally shared config file if AWS_SDK_LOAD_CONFIG env is set), and lastly EC2 Instance Roles. Note the usage of aws_access_key has been deprecated and may be removed in future versions. Instead, user can use other methods to pass crentials, e.g., with environmental variable AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively.

  • aws_endpoint can be used to control the endpoint to use when querying AWS (optional). ENDPOINT is the URL of the endpoint to use. If this is not provided the default AWS endpoint resolution will occur.

  • credentials is used for overriding the shared credentials FILENAME and the PROFILE name for a given zone. PROFILE is the AWS account profile name. Defaults to default. FILENAME is the AWS shared credentials filename, defaults to ~/.aws/credentials. CoreDNS will only load shared credentials file and not shared config file (~/.aws/config) by default. Set AWS_SDK_LOAD_CONFIG env variable to a truthy value to enable also loading of ~/.aws/config (e.g. if you want to provide assumed IAM role configuration). Will be ignored if static keys are set via aws_access_key.

  • fallthrough If zone matches and no record can be generated, pass request to the next plugin. If ZONES is omitted, then fallthrough happens for all zones for which the plugin is authoritative. If specific zones are listed (for example in-addr.arpa and ip6.arpa), then only queries for those zones will be subject to fallthrough.

  • refresh can be used to control how long between record retrievals from Route 53. It requires a duration string as a parameter to specify the duration between update cycles. Each update cycle may result in many AWS API calls depending on how many domains use this plugin and how many records are in each. Adjusting the update frequency may help reduce the potential of API rate-limiting imposed by AWS.

  • DURATION A duration string. Defaults to 1m. If units are unspecified, seconds are assumed.

Examples

Enable route53 with implicit AWS credentials and resolve CNAMEs via 10.0.0.1:

example.org {
	route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7
}

. {
    forward . 10.0.0.1
}

Enable route53 with explicit AWS credentials:

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
      aws_access_key AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY # Deprecated, uses other authentication methods instead.
    }
}

Enable route53 with an explicit AWS endpoint:

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
      aws_endpoint https://test.us-west-2.amazonaws.com
    }
}

Enable route53 with fallthrough:

. {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.gov.:Z654321543245 {
      fallthrough example.gov.
    }
}

Enable route53 with multiple hosted zones with the same domain:

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.org.:Z93A52145678156
}

Enable route53 and refresh records every 3 minutes

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
      refresh 3m
    }
}

Authentication

Route53 plugin uses AWS Go SDK for authentication, where there is a list of accepted configuration methods. Note the usage of aws_access_key in Corefile has been deprecated and may be removed in future versions. Instead, user can use other methods to pass crentials, e.g., with environmental variable AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively.