Last active
May 25, 2016 09:19
-
-
Save elarif/9cee1ffa466b29858e2092ed89b811f5 to your computer and use it in GitHub Desktop.
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
mkdir -p /srv/docker/bind | |
chcon -Rt svirt_sandbox_file_t /srv/docker/bind | |
docker run --name bind -d --restart=always \ | |
--publish 53:53/tcp --publish 53:53/udp --publish 10000:10000/tcp \ | |
--volume /srv/docker/bind:/data \ | |
sameersbn/bind:latest | |
docker exec -it bind /bin/bash | |
DOMAIN=mydev | |
IP=10.0.2.15 | |
cat << EOF >> /etc/bind/named.conf.local | |
zone "$DOMAIN" { | |
type master; | |
file "/etc/bind/db.$DOMAIN"; | |
}; | |
EOF | |
cat << EOF >> /etc/bind/db.$DOMAIN | |
$DOMAIN. 86400 IN SOA $DOMAIN. hostmaster.$DOMAIN. ( | |
20091028 ; serial yyyy-mm-dd | |
10800; refresh every 15 min | |
3600; retry every hour | |
3600000; expire after 1 month + | |
86400 ); min ttl of 1 day | |
IN NS $DOMAIN. | |
IN MX 10 $DOMAIN. | |
IN A $IP | |
*.$DOMAIN. IN A $IP | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment