Commit 89c9f06e authored by nanahira's avatar nanahira

add some services in dnsmasq

parent d46abe3b
......@@ -24,3 +24,55 @@ dhcp-range=tag:{{br.name}},::,constructor:{{br.name}},ra-names,24h
{% endif %}
{% endfor %}
{% if dnsmasq.kms is defined and dnsmasq.kms %}
# KMS
{% if dnsmasq.kms != "localhost" %}
srv-host=_vlmcs._tcp.lan,{{dnsmasq.kms}},1688,0,100
{% else %}
srv-host=_vlmcs._tcp.lan,{{services.address}},1688,0,100
{% endif %}
{% endif %}
{% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher %}
# apt cacher
local=/archive.ubuntu.com/security.ubuntu.com/deb.debian.org/security.debian.org/
{% if dnsmasq.aptCacher != "localhost" %}
address=/archive.ubuntu.com/{{dnsmasq.aptCacher}}
host-record=security.ubuntu.com,deb.debian.org,security.debian.org,{{dnsmasq.aptCacher}}
{% else %}
address=/archive.ubuntu.com/{{services.address}}
host-record=security.ubuntu.com,deb.debian.org,security.debian.org,{{services.address}}
{% endif %}
{% endif %}
{% if dnsmasq.pxe is defined and dnsmasq.pxe %}
# PXE
{% if dnsmasq.pxe != "localhost" %}
dhcp-match=set:bios,60,PXEClient:Arch:00000
dhcp-boot=tag:bios,netboot.xyz.kpxe,,{{dnsmasq.pxe}}
dhcp-match=set:efi32,60,PXEClient:Arch:00002
dhcp-boot=tag:efi32,netboot.xyz.efi,,{{dnsmasq.pxe}}
dhcp-match=set:efi32-1,60,PXEClient:Arch:00006
dhcp-boot=tag:efi32-1,netboot.xyz.efi,,{{dnsmasq.pxe}}
dhcp-match=set:efi64,60,PXEClient:Arch:00007
dhcp-boot=tag:efi64,netboot.xyz.efi,,{{dnsmasq.pxe}}
dhcp-match=set:efi64-1,60,PXEClient:Arch:00008
dhcp-boot=tag:efi64-1,netboot.xyz.efi,,{{dnsmasq.pxe}}
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
dhcp-boot=tag:efi64-2,netboot.xyz.efi,,{{dnsmasq.pxe}}
{% else %}
dhcp-match=set:bios,60,PXEClient:Arch:00000
dhcp-boot=tag:bios,netboot.xyz.kpxe,,{{services.address}}
dhcp-match=set:efi32,60,PXEClient:Arch:00002
dhcp-boot=tag:efi32,netboot.xyz.efi,,{{services.address}}
dhcp-match=set:efi32-1,60,PXEClient:Arch:00006
dhcp-boot=tag:efi32-1,netboot.xyz.efi,,{{services.address}}
dhcp-match=set:efi64,60,PXEClient:Arch:00007
dhcp-boot=tag:efi64,netboot.xyz.efi,,{{services.address}}
dhcp-match=set:efi64-1,60,PXEClient:Arch:00008
dhcp-boot=tag:efi64-1,netboot.xyz.efi,,{{services.address}}
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
dhcp-boot=tag:efi64-2,netboot.xyz.efi,,{{services.address}}
{% endif %}
{% endif %}
......@@ -11,6 +11,16 @@ services:
network_mode: host
command: --remote-ip {{gdut.remote}} --keep-alive1-flag {{gdut.flag}} --enable-crypt 1
{% endif %}
{% if dnsmasq.kms is defined and dnsmasq.kms == "localhost" %}
kms:
restart: always
image: teddysun/kms
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- '{{services.address}}:1688:1688'
{% endif %}
{% if services.ddns is defined and services.ddns %}
{% for instance in services.ddns %}
ddns-{{instance.name}}:
......
......@@ -82,10 +82,14 @@ vars:
gfwlistIPSet: false # 导入 gfwlist ipset
mycardDomains: false # 导入 MCNetwork 内网域名
extraInterfaces: [] # 额外监听的网卡
kms: localhost # kms 服务器的地址,localhost 为自己搭建
aptCacher: 10.0.0.2 # apt-cacher-ng 的地址
pxe: 10.0.0.3 # pxe 服务器的地址
gdut: # 校园网特化使用
remote: 10.0.3.6
flag: 2f
services:
address: 10.0.0.1 # 各内网服务主要监听的地址
ddns:
- name: test-ddns
email: name@example.com # cf邮箱
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment