https://github.com/strrl/coredns-plugin-hijacking
https://github.com/strrl/coredns-plugin-hijacking
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/strrl/coredns-plugin-hijacking
- Owner: STRRL
- Archived: true
- Created: 2021-12-12T07:28:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T23:11:31.000Z (over 3 years ago)
- Last Synced: 2025-02-16T18:08:00.456Z (over 1 year ago)
- Language: Go
- Size: 164 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# coredns-plugin-hijacking
This project is a plugin for CoreDNS that allows hijacking DNS requests.
This plugin would response for the `A` DNS query with an wildcard domain, and each record should correspond to the IP for the Kubernertes worker node.
## Usage
When I configuring the ingress for the Kubernetes cluster, I found that I should make up a virtual IP for all the node IP.
But I do not want to configure that vip, so there is a trick solution for that: response watch Kubernetes worker node IP for the ingress domain.
At first, I have used `dnsmasq` for a while, but it would response all the DNS request for `kubernetes.cluster.example.com` with the static record, which makes my cert-manager issuers not working. So I need tool that could only hijack `A` record, but forward other type (like `TXT`) to the upstream DNS server.
## Config Example
```text
kubernetes.cluster.example.com:8053 {
hijacking {
record * A 10.233.233.1
record * A 10.233.233.2
record * A 10.233.233.3
record * A 10.233.233.4
}
forward . 1.1.1.1
log
errors
}
```