DNS server hosting via Docker, Alpine Linux, and Unbound

Source: Internet
Author: User
Tags dns entry hosting server hosting

Imagine if we were going to build a mobile app , and not enough budget to buy hardware and software resources, what to do? For example, if we are going to run this appon our existing infrastructure, but we have only a few old low-performance machines on hand, what is the way to deploy and run mobile apps?

For some companies, their application itself is not a lot of users, fixed users about hundreds of people. In this case, spending a lot of money to buy resources is certainly not cost-effective, not to mention the company's team is also very small, difficult to maintain a large number of facilities. The company does not have sufficient funds, but it does need to build a dedicated development operations environment, this example is ubiquitous in reality.

entrepreneurial companies with slightly better conditions can buy AWS instances, and some will buy some IP The address is assigned to the server, but there are some small teams that cannot provide these conditions. As far as I know, some teams directly use the home computer to do the server,theIP address is only 1 , only by building a subnet, with proxy server to achieve traffic redirection. In this case , you need to customize the DNS rules to match the server hostname to the intranet IP one by one.

through Docker, Alpine and the Unbound Quickly create micro DNS Server

Docker After the advent of this embarrassing situation is coming to an end, and now we can pass Docker , Alpine and the Unbound Fast Implementation DNS the server is hosted. First, we need to invoke the following Dockerfile script:

From alpine:3.3
Maintainer Philip Miglinci "[Email protected]"
RUN apk add--update Unbound; \
rm-rf/var/cache/apk/*;
COPY unbound.conf/etc/unbound/unbound.conf
COPY root.hints/var/unbound/etc/root.hints
COPY Root.key/var/unbound/etc/root.key
RUN unbound-checkconf
CMD ["Unbound"]

we can Poke here Download the above root.hints file.

root.keythat's the top level we downloaded above. DNS Server:

. In DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5

in the file, you unbnound.conf can create a custom DNS Entry, such as the following configuration script is set up a-record The record value:

Server
interface:0.0.0.0
Verbosity:1
Do-daemonize:no
access-control:0.0.0.0/0 allow
Do-ip4:yes
Do-ip6:no
Do-udp:yes
Do-tcp:no
Hide-identity:yes
Hide-version:yes
Harden-glue:yes
Harden-dnssec-stripped:yes
Use-caps-for-id:yes
cache-min-ttl:3600
cache-max-ttl:86400
Prefetch:yes
Num-threads:4
Msg-cache-slabs:8
Rrset-cache-slabs:8
Infra-cache-slabs:8
Key-cache-slabs:8
rrset-cache-size:256m
msg-cache-size:128m
so-rcvbuf:1m
Private-address:192.168.1.0/16
unwanted-reply-threshold:10000
Do-not-query-localhost:no
Val-clean-additional:yes

Local-zone: "pmig.at." Static
Local-data: "pmig.at. In A 192.168.1.201 "

Forward-zone:
Name: "."
forward-addr:195.34.133.10
forward-addr:213.33.99.70
forward-addr:8.8.8.8
forward-addr:8.8.4.4

We can also define it in the file. Local-zone and set A Record value if the current host address is not Local Zone inside, the system will go to other DNS The server sends the request, in this case I'm using the current ISP Service Provider's DNS , if ISP cannot provide DNS service, the system will be enabled Google DNS .

in other words, if you want to use this way to achieve DNS hosting, also need to open Docker Host's UDP Port and set it in the intranet router.

After the above configuration is completed, our intranet environment is built, we can set up in the LAN without restriction Docker development environment, this approach is both convenient and cost-saving, can be described as one of the many.


This article is from the "11424222" blog, please be sure to keep this source http://11434222.blog.51cto.com/11424222/1774635

DNS server hosting via Docker, Alpine Linux, and Unbound

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.