Comments (1)
If anyone runs into a similar problem, I had a misunderstanding on how the forward
plugin works: the client IP is lost, because when I hit the first forward
, the CoreDNS server forwards the request to the next block and the client IP becomes the CoreDNS server IP (or localhost), not the original client IP.
I hence had to change the config above to something like :
example.com:53 {
bind 0.0.0.0
loadbalance round_robin
view split-dns {
expr client_ip() in ["10.1.1.1","10.2.2.2"]
}
template IN ANY host3.example.com {
answer "host3.example.com 60 IN A 25.25.25.3"
}
forward example.com 127.0.0.1:5302
errors
}
example.com:5302 {
bind lo
template IN ANY host1.example.com {
answer "host1.example.com 60 IN A 25.25.25.1"
}
template IN ANY host2.example.com {
answer "host1.example.com 60 IN A 25.25.25.2"
}
forward . 127.0.0.1:5301
errors
}
[...]
Basically, making sure I test the client IP in the first block receiving the request.
from coredns.
Related Issues (20)
- Pods are not receiving a balanced load
- Failed to download CoreDNS on a IPv6-only server HOT 3
- Panic on /miekg/dns/labels
- How to restart forward plugin after updating nameserver inside resolve.conf
- coredns secondary received notify can not use udp.is use tcp.
- error getting ClusterInformation: connection is unauthorized: Unauthorized HOT 1
- Coredns forward upstream nameserver is invalid when policy is round_robin HOT 2
- Question about truncate and compress
- When is v1.11.3 going to get released? Need it for security fixes HOT 2
- DNS rate limit to 8.8.8.8, as over 300K (before only 5k) requests per 30-minute interval HOT 1
- plugin/hosts error in metrics coredns_hosts_entries
- Improvement of OpenSSF Scorecard Score HOT 1
- Problem with rewrite+dns64 HOT 3
- [Forward plugin] Imbalance with multiple servers behind single cluster IP
- CoreDNS returns REFUSED instead of SERVFAIL when no server block matches HOT 2
- [ Feature ] Add the ability to call a plugin programatically from another plugin
- Block the users IP
- Is it possible with CoreDNS plugins to filter DNS queries based on the namespace the pod is querying?
- Wildcard subdomain resolution for home network
- Route53 Plugin with aws_signing_helper credential-process.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coredns.