Created
March 19, 2024 20:33
-
-
Save ekanant/4c9621b6cdd467d23594b5fb9a7a1aae to your computer and use it in GitHub Desktop.
Coredns learning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .:53 { | |
| hosts /config/host { | |
| fallthrough | |
| } | |
| forward . 1.1.1.1 8.8.8.8 | |
| # Cache 300 second | |
| cache 300 { | |
| success 10000 | |
| denial 2500 | |
| } | |
| log | |
| errors | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.9' | |
| services: | |
| dns-server: | |
| image: coredns/coredns:1.11.1 | |
| ports: | |
| - "30053:53/udp" | |
| # network_mode: "host" | |
| command: ["-conf", "/config/Corefile"] | |
| volumes: | |
| - ./coredns.conf:/config/Corefile:ro | |
| - ./host.conf:/config/host:ro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 127.0.0.1 www.mygoogle.com | |
| 127.0.0.1 www.mygoogle2.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment