snster bootstrap
This commit is contained in:
		
							
								
								
									
										42
									
								
								files/snster-kaz/milxc/group.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								files/snster-kaz/milxc/group.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
version: 1
 | 
			
		||||
 | 
			
		||||
header:
 | 
			
		||||
  name: MILXC AS
 | 
			
		||||
  comment: The .milxc TLD auth NS
 | 
			
		||||
 | 
			
		||||
hosts:
 | 
			
		||||
  router:
 | 
			
		||||
    master: alpine
 | 
			
		||||
    network:
 | 
			
		||||
      interfaces:
 | 
			
		||||
        eth0:
 | 
			
		||||
          bridge: transit-a
 | 
			
		||||
          ipv4: 100.64.0.40/24
 | 
			
		||||
          ipv6: 2001:db8:b000::40/48
 | 
			
		||||
        eth1:
 | 
			
		||||
          bridge: milxc-lan
 | 
			
		||||
          ipv4: 100.100.20.1/24
 | 
			
		||||
          ipv6: 2001:db8:a020::1/48
 | 
			
		||||
    templates:
 | 
			
		||||
      - bgprouter:
 | 
			
		||||
          asn: 8
 | 
			
		||||
          asdev: eth1
 | 
			
		||||
          neighbors4: 100.64.0.1 as 30
 | 
			
		||||
          neighbors6: 2001:db8:b000::1 as 30
 | 
			
		||||
      - resolv:
 | 
			
		||||
          nameserver: 100.100.100.100
 | 
			
		||||
          domain: milxc.milxc
 | 
			
		||||
 | 
			
		||||
  ns:
 | 
			
		||||
    network:
 | 
			
		||||
      interfaces:
 | 
			
		||||
        eth0:
 | 
			
		||||
          bridge: milxc-lan
 | 
			
		||||
          ipv4: 100.100.20.10/24
 | 
			
		||||
          ipv6: 2001:db8:a020::10/48
 | 
			
		||||
      gatewayv4: 100.100.20.1
 | 
			
		||||
      gatewayv6: 2001:db8:a020::1
 | 
			
		||||
    templates:
 | 
			
		||||
      - resolv:
 | 
			
		||||
          domain: milxc.milxc
 | 
			
		||||
          ns: 100.100.100.100
 | 
			
		||||
							
								
								
									
										41
									
								
								files/snster-kaz/milxc/ns/provision.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								files/snster-kaz/milxc/ns/provision.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# .milxc registry
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
if [ -z $MILXCGUARD ] ; then exit 1; fi
 | 
			
		||||
DIR=`dirname $0`
 | 
			
		||||
cd `dirname $0`
 | 
			
		||||
 | 
			
		||||
# disable systemd-resolved which conflicts with nsd
 | 
			
		||||
echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
 | 
			
		||||
systemctl stop systemd-resolved
 | 
			
		||||
 | 
			
		||||
apt-get update
 | 
			
		||||
DEBIAN_FRONTEND=noninteractive apt-get install -y nsd
 | 
			
		||||
 | 
			
		||||
echo -e "zone:
 | 
			
		||||
	name: \"milxc.\"
 | 
			
		||||
	zonefile: \"milxc.zone\"
 | 
			
		||||
" > /etc/nsd/nsd.conf
 | 
			
		||||
 | 
			
		||||
echo -e "\$TTL	86400
 | 
			
		||||
\$ORIGIN milxc.
 | 
			
		||||
@  1D  IN  SOA ns.milxc. hostmaster.milxc. (
 | 
			
		||||
			      2002022401 ; serial
 | 
			
		||||
			      3H ; refresh
 | 
			
		||||
			      15 ; retry
 | 
			
		||||
			      1w ; expire
 | 
			
		||||
			      3h ; nxdomain ttl
 | 
			
		||||
			     )
 | 
			
		||||
       IN  NS     ns.milxc.
 | 
			
		||||
ns    IN  A      100.100.20.10  ;name server definition
 | 
			
		||||
ns	IN	AAAA	2001:db8:a020::10
 | 
			
		||||
kaz.milxc.		IN	NS	ns.kaz.milxc.
 | 
			
		||||
ns.kaz.milxc.	IN	A 100.80.0.2
 | 
			
		||||
isp-a.milxc.	IN	NS	ns.isp-a.milxc.
 | 
			
		||||
ns.isp-a.milxc.	IN	A 100.120.1.2
 | 
			
		||||
ns.isp-a.milxc.	IN	AAAA 2001:db8:120:1::2
 | 
			
		||||
mica.milxc.	IN	NS	ns.mica.milxc.
 | 
			
		||||
ns.mica.milxc.	IN	A 100.82.0.2
 | 
			
		||||
ns.mica.milxc.	IN	AAAA 2001:db8:82::2
 | 
			
		||||
" >> /etc/nsd/milxc.zone
 | 
			
		||||
		Reference in New Issue
	
	Block a user