Giter VIP home page Giter VIP logo

xip-dns-server's Introduction

Xip Dns Server

https://xip.lhjmmc.cn If the server is down, notify me by email. [email protected]

Require

  • docker
  • docker-compose
  • acme.sh

Usage

  1. set a NS record to your domain (such as xip.lhjmmc.cn)
    ...
    NS      xip.lhjmmc.cn       your_server_domain(origin.lhjmmc.cn)
    ...
  1. deploy
## clone
git clone https://github.com/hjmmc/xip-dns-server.git
cd xip-dns-server

## docker-compose
docker-compose up -d

check nsedit is success running http://your_server_ip:5380 default user is admin/admin

add your zone in powerdns by nsedit or curl

curl -X POST --data '{"name":"xip.lhjmmc.cn.", "kind": "Native", "masters": [], "nameservers": ["ns1.xip.lhjmmc.cn.", "ns2.xip.lhjmmc.cn."]}' -v -H 'X-API-Key: 123456' http://localhost:5381/api/v1/servers/localhost/zones

add some A record for your domain

    A    xip.lhjmmc.cn     your_server_ip
    A    *.xip.lhjmmc.cn   your_server_ip

check dns server by nslookup

nslookup xip.lhjmmc.cn
nslookup 192-168-1-1.xip.lhjmmc.cn
  1. generate certs
## http://acme.sh/
export PDNS_Url="http://localhost:5381"
export PDNS_ServerId="localhost"
export PDNS_Token="123456"
export PDNS_Ttl=60
acme.sh --issue --dns dns_pdns -d xip.lhjmmc.cn -d *.xip.lhjmmc.cn

## install-cert
mkdir /var/www/html/xip.lhjmmc.cn
acme.sh --install-cert -d xip.lhjmmc.cn --cert-file  /var/www/html/xip.lhjmmc.cn/cert.pem  --key-file  /var/www/html/xip.lhjmmc.cn/key.pem  --fullchain-file /var/www/html/xip
.lhjmmc.cn/fullchain.pem --reloadcmd "chmod 777 /var/www/html/xip.lhjmmc.cn/*" 
  1. Share cert by nginx conf
server {
    listen       80;
    listen       443 ssl;
    server_name  xip.lhjmmc.cn;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;
    #SSL Support
    ssl_certificate /var/www/html/xip.lhjmmc.cn/fullchain.pem;
    ssl_certificate_key /var/www/html/xip.lhjmmc.cn/key.pem;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULLL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    location / {
        root   /var/www/html/xip.lhjmmc.cn;
        index  index.html index.htm;
    }
}

Thanks

Mikroways/docker-powerdns

techguy613/native-dns-packet

acme.sh

Donate

If you find this project useful, you can buy author a glass of juice 🍹

Paypal & Alipay & Wechat

xip-dns-server's People

Contributors

hjmmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.