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

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

Start on CoreDNS: DNS and Service Discovery

Quick Start
Quick Start for Windows
jonathan · 2016-10-30 · via Start on CoreDNS: DNS and Service Discovery

This is a development quick start guide when you are using Windows.

  1. Make sure that you have your GOPATH set up

  2. Clone coredns and all dependencies: go get github.com/coredns/coredns

  3. Navigate to the source: cd $ENV:GOPATH\src\github.com\coredns\coredns

  4. Fork (but not clone) coredns

  5. Update the origin to point at your repository: git remote set-url origin https://github.com/USERNAME/coredns.git

  6. Open your editor: code .

  7. Create a new file named Corefile and populate it:

    # Only port 53 is supported as NSLOOKUP no longer supports non-standard ports
    .:53 {
        # Your router
        proxy . 192.168.1.1:53
    
        file D:\dev\zone\example.org example.org
    
        errors
        log
    }
    
  8. Create the example.org file:

    example.org.   IN SOA dns.example.org. domains.example.org. (
        2012062701   ; serial
        300          ; refresh
        1800         ; retry
        14400        ; expire
        300 )        ; minimum
    
    @                        IN NS      dns.example.com.
    
    @                  42000 IN A       127.0.0.1
    @                  42000 IN A       127.0.0.2
    @                  42000 IN A       127.0.0.3
    
    api                42000 IN CNAME   sample.service.dns.example.de.
    www                42000 IN CNAME   sample.service.dns.example.de.
    blog               42000 IN CNAME   sample.service.dns.example.de.
    
    @                   3600 IN MX 1    ASPMX1.L.google.com.
    @                   3600 IN MX 1    ASPMX2.L.google.com.
    @                   3600 IN MX 1    ASPMX3.L.google.com.
    @                    300 IN TXT     "v=spf1 include:_spf.google.com ~all"
    
  9. You should be able to execute coredns from VSCode, test it with:

    > nslookup - localhost
    Default Server:  UnKnown
    Address:  ::1
    
    > example.org
    Server:  UnKnown
    Address:  ::1
    
    Name:    example.org
    Addresses:  127.0.0.1
          127.0.0.2
          127.0.0.3
    
  10. Use github.com\coredns\coredns as though it were your own repository. This is required to ensure that debugging works in VSCode.

  11. You might want to add the following to your global .gitignore:

```
coredns.exe
Corefile
.vscode
debug
```