2020-11-13 17:47:40 +00:00
|
|
|
nodes['home.router'] = {
|
2020-11-13 22:57:12 +00:00
|
|
|
'hostname': '172.19.138.1',
|
2020-11-13 20:41:24 +00:00
|
|
|
'bundles': {
|
2020-12-06 18:52:32 +00:00
|
|
|
'dhcpd',
|
2020-11-14 13:05:28 +00:00
|
|
|
'netdata',
|
2020-11-16 16:07:05 +00:00
|
|
|
'nginx',
|
2020-12-08 16:45:30 +00:00
|
|
|
'openvpn-client',
|
2020-11-13 20:41:24 +00:00
|
|
|
'pppd',
|
2020-11-14 10:47:44 +00:00
|
|
|
'radvd',
|
2020-12-13 13:59:44 +00:00
|
|
|
'unbound',
|
2020-11-16 15:33:26 +00:00
|
|
|
'vnstat',
|
2020-11-14 10:34:16 +00:00
|
|
|
'wide-dhcp6c',
|
2020-11-21 14:38:38 +00:00
|
|
|
'wireguard',
|
2020-11-13 20:41:24 +00:00
|
|
|
},
|
2020-11-21 09:55:09 +00:00
|
|
|
'groups': {
|
2021-04-10 07:20:34 +00:00
|
|
|
'debian-bullseye',
|
2020-11-21 09:55:09 +00:00
|
|
|
},
|
2020-11-13 17:47:40 +00:00
|
|
|
'metadata': {
|
|
|
|
'interfaces': {
|
|
|
|
'enp1s0.23': {
|
|
|
|
'ips': {
|
2020-11-13 22:57:12 +00:00
|
|
|
'172.19.139.1/24',
|
2020-11-13 17:47:40 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'enp1s0.42': {
|
|
|
|
'ips': {
|
2020-11-13 22:57:12 +00:00
|
|
|
'172.19.138.1/24',
|
2020-11-13 17:47:40 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-13 20:41:24 +00:00
|
|
|
'enp1s0.100': {
|
|
|
|
'ignore': True,
|
|
|
|
},
|
2020-11-13 17:47:40 +00:00
|
|
|
},
|
|
|
|
'backups': {
|
|
|
|
'exclude_from_backups': True,
|
|
|
|
},
|
2020-11-13 22:07:18 +00:00
|
|
|
'cron': {
|
|
|
|
# Our internet provider resets the connection if you're
|
|
|
|
# connected longer than 24 hours. We install this cronjob
|
|
|
|
# to make sure we don't get disconnected randomly during the
|
|
|
|
# day.
|
2020-12-12 08:12:05 +00:00
|
|
|
'restart_pppd': '23 2 * * * root systemctl restart pppoe && date -u +\%s > /var/tmp/pppd-last-restart.status',
|
2020-11-13 22:07:18 +00:00
|
|
|
},
|
2020-12-06 18:52:32 +00:00
|
|
|
'dhcpd': {
|
|
|
|
'subnets': {
|
2021-02-14 15:16:47 +00:00
|
|
|
'dmz': {
|
|
|
|
'interface': 'enp1s0.23',
|
|
|
|
'netmask': '255.255.255.0',
|
|
|
|
'range_lower': '172.19.139.200',
|
|
|
|
'range_higher': '172.19.139.250',
|
|
|
|
'subnet': '172.19.139.0',
|
|
|
|
'options': {
|
|
|
|
'broadcast-address': '172.19.139.255',
|
|
|
|
'domain-name-servers': '172.19.139.1',
|
2021-04-10 10:09:24 +00:00
|
|
|
'routers': '172.19.139.1',
|
2021-02-14 15:16:47 +00:00
|
|
|
'subnet-mask': '255.255.255.0',
|
|
|
|
},
|
|
|
|
},
|
2020-12-06 18:52:32 +00:00
|
|
|
'home': {
|
2021-02-14 15:16:47 +00:00
|
|
|
'interface': 'enp1s0.42',
|
2020-12-06 18:52:32 +00:00
|
|
|
'netmask': '255.255.255.0',
|
|
|
|
'range_lower': '172.19.138.100',
|
|
|
|
'range_higher': '172.19.138.250',
|
2021-02-14 15:16:47 +00:00
|
|
|
'subnet': '172.19.138.0',
|
2020-12-06 18:52:32 +00:00
|
|
|
'options': {
|
|
|
|
'broadcast-address': '172.19.138.255',
|
2021-02-14 15:16:47 +00:00
|
|
|
'domain-name': 'franzi-home.kunbox.net',
|
|
|
|
'domain-name-servers': '172.19.138.1',
|
|
|
|
'domain-search': 'home.kunbox.net',
|
|
|
|
'routers': '172.19.138.1',
|
2020-12-06 18:52:32 +00:00
|
|
|
'subnet-mask': '255.255.255.0',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-02-19 13:46:29 +00:00
|
|
|
'icinga_options': {
|
2021-04-17 07:21:51 +00:00
|
|
|
'also_affected_by': {
|
|
|
|
'home.nas',
|
|
|
|
'ovh.wireguard',
|
|
|
|
},
|
2021-02-19 13:46:29 +00:00
|
|
|
# disabled on group level
|
|
|
|
'vars.notification.sms': True
|
|
|
|
},
|
2021-04-17 07:21:51 +00:00
|
|
|
|
2020-11-13 21:39:09 +00:00
|
|
|
'iptables': {
|
|
|
|
'custom_rules': [
|
2020-12-31 21:30:10 +00:00
|
|
|
# This is a router. Allow forwarding traffic for internal networks.
|
2020-11-13 21:39:09 +00:00
|
|
|
'iptables_both -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT',
|
2020-12-31 21:30:10 +00:00
|
|
|
'iptables_both -A FORWARD -i enp1s0.23 -o ppp0 -j ACCEPT',
|
2020-11-13 21:39:09 +00:00
|
|
|
'iptables_both -A FORWARD -i enp1s0.42 -j ACCEPT',
|
2020-11-14 11:26:22 +00:00
|
|
|
|
|
|
|
# External port 2022 should be home.nas
|
|
|
|
'iptables -t nat -A PREROUTING -p tcp --dport 2022 -j DNAT --to 172.19.138.20:22',
|
|
|
|
'iptables -A FORWARD -p tcp -d 172.19.138.20 --dport 22 -j ACCEPT',
|
2020-12-08 16:45:30 +00:00
|
|
|
|
|
|
|
# use MASQUERADE for tun0 (c3voc)
|
|
|
|
'iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE',
|
2020-12-31 20:28:15 +00:00
|
|
|
|
|
|
|
# yaaaaay, IPv6! No NAT!
|
|
|
|
'ip6tables -A FORWARD -p ipv6-icmp -j ACCEPT',
|
|
|
|
'ip6tables -A FORWARD -p tcp --dport 22 -j ACCEPT',
|
2020-11-13 21:39:09 +00:00
|
|
|
],
|
|
|
|
},
|
2020-11-14 13:05:28 +00:00
|
|
|
'netdata': {
|
2021-02-15 13:16:35 +00:00
|
|
|
'restrict-to': {
|
2021-04-04 09:30:50 +00:00
|
|
|
'172.19.136.0/25',
|
|
|
|
'172.19.138.0/24',
|
2020-11-14 13:05:28 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-16 16:07:05 +00:00
|
|
|
'nginx': {
|
2021-02-15 13:16:35 +00:00
|
|
|
'restrict-to': {
|
2021-04-04 09:30:50 +00:00
|
|
|
'172.19.136.0/25',
|
|
|
|
'172.19.138.0/24',
|
2020-11-16 16:07:05 +00:00
|
|
|
},
|
2021-02-20 13:25:27 +00:00
|
|
|
'vhosts': {
|
|
|
|
'vnstat': {
|
|
|
|
'ssl': False,
|
|
|
|
},
|
|
|
|
},
|
2020-11-16 16:07:05 +00:00
|
|
|
},
|
2020-12-08 16:45:30 +00:00
|
|
|
'openvpn-client': {
|
|
|
|
'configs': {
|
|
|
|
'c3voc',
|
|
|
|
},
|
|
|
|
},
|
2020-11-14 10:47:44 +00:00
|
|
|
'radvd': {
|
|
|
|
'interfaces': {
|
2021-02-14 15:16:47 +00:00
|
|
|
'enp1s0.23': {},
|
2020-12-13 13:59:44 +00:00
|
|
|
'enp1s0.42': {},
|
2020-11-14 10:47:44 +00:00
|
|
|
},
|
|
|
|
},
|
2021-03-15 10:41:35 +00:00
|
|
|
'postfix': {
|
|
|
|
'mynetworks': {
|
|
|
|
'172.19.138.0/24',
|
|
|
|
},
|
|
|
|
},
|
2020-11-13 20:41:24 +00:00
|
|
|
'pppd': {
|
|
|
|
'username': vault.decrypt('encrypt$gAAAAABfruZ5AZbgJ3mfMLWqIMx8o4bBRMJsDPD1jElh-vWN_gnhiuZVjrQ1-7Y6zDXNkxXiyhx8rxc2enmvo26axd7EBI8FqknCptXAPruVtDZrBCis4TE='),
|
|
|
|
'password': vault.decrypt('encrypt$gAAAAABfruaXEDkaFksFMU8g97ydWyJF8p2KcSDJJBlzaOLDsLL6oCDYjG1kMPVESOzqjn8ThtSht1uZDuMCstA-sATmLS-EWQ=='),
|
|
|
|
'interface': 'enp1s0.100',
|
2020-11-14 11:46:19 +00:00
|
|
|
'dyndns': {
|
|
|
|
'url': 'https://ns-1.kunbox.net/nic/update?hostname=franzi-home.kunbox.net&myip={ip}',
|
|
|
|
'username': vault.decrypt('encrypt$gAAAAABfr8DLAJhmUIhdxLq83I8MnRRvkRgDZcO8Brvw1KpvplC3K8ZGj0jIIWD3Us33vIP6t0ybd_mgD8slpRUk78Kqd3BMoQ=='),
|
|
|
|
'password': vault.decrypt('encrypt$gAAAAABfr8Cq5M1hweeJTQAl0dLhFntdlw-QnkIYUQpY-_ycODVWOpyeAwjwOgWLSdsdXIUvqcoiXPZPV-BE12p5C42NGnj9r7sKYpoGz8xfuGIk6haMa2g='),
|
|
|
|
},
|
2020-11-13 20:41:24 +00:00
|
|
|
},
|
2020-12-13 13:59:44 +00:00
|
|
|
'unbound': {
|
2021-02-15 13:16:35 +00:00
|
|
|
'restrict-to': {
|
|
|
|
'172.19.138.0/23',
|
2020-12-13 13:59:44 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-15 09:07:29 +00:00
|
|
|
'users': {
|
|
|
|
'f2k1de': {
|
|
|
|
'ssh_pubkey': {
|
|
|
|
'command="/bin/false",no-pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrvhqC/tZzpLMs/qy+1xNSVi2mfn8LXPIEhh7dcGn9e',
|
|
|
|
'command="/bin/false",no-pty ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH5+j2vDW1FHSSEEI/Sf5qiKJq1uoxGO5BPv84mqohvol7GxDFObv69tn7g6HYfZY/SaS75C4ZXy+cKa0xy8UCpF0SBa2xHASkenS9v55oweDL4rYSPARzn2XKt3RFJG/d8V5NOWtcyq5DFSzewUF35E4hx1pUc/CIxgJEem5ZvzvN0hlIKXUN2djkVUx+mz6RryBysLTJEFBamjJxIkvDG/PZU73W4SHaKAYV4Ojz2NY7T5/NYKePfIU5F9pkE3RU0LRj58usvA1eP0PvEArWlGNCd8EJU+HQ5xr2dZ6MKPpEyG0KJkC88DuapeF5RwUV53ZhNpF+QgzpI72fH5up',
|
|
|
|
},
|
|
|
|
},
|
2020-12-12 08:12:26 +00:00
|
|
|
'kunsi': {
|
|
|
|
'ssh_pubkey': {
|
|
|
|
# work laptop
|
|
|
|
'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICYst1HK+gJYhNxzqJGnz4iB73pa89Xz2yH+8wufOcsA',
|
|
|
|
},
|
|
|
|
},
|
2020-11-15 09:07:29 +00:00
|
|
|
},
|
2020-11-16 15:33:26 +00:00
|
|
|
'vnstat': {
|
2020-11-16 16:07:05 +00:00
|
|
|
'generate-web-dashboard': True,
|
2020-11-16 15:33:26 +00:00
|
|
|
'interface': 'enp1s0.100',
|
|
|
|
},
|
2020-11-13 17:47:40 +00:00
|
|
|
'vm': {
|
|
|
|
'cpu': 2,
|
|
|
|
'ram': 2,
|
|
|
|
},
|
2020-11-14 10:34:16 +00:00
|
|
|
'wide-dhcp6c': {
|
|
|
|
'source': 'ppp0',
|
|
|
|
'targets': {
|
2021-02-14 15:16:47 +00:00
|
|
|
'enp1s0.23': '2',
|
2020-11-14 10:34:16 +00:00
|
|
|
'enp1s0.42': '1',
|
|
|
|
},
|
|
|
|
},
|
2020-11-21 14:38:38 +00:00
|
|
|
'wireguard': {
|
2021-04-01 14:27:31 +00:00
|
|
|
'external_hostname': 'franzi-home.kunbox.net', # Set via DynDNS
|
|
|
|
'my_ip': '172.19.136.2/22',
|
|
|
|
'peers': {
|
|
|
|
'ovh.wireguard': {},
|
|
|
|
},
|
2020-11-21 14:38:38 +00:00
|
|
|
'subnets': {
|
|
|
|
'172.19.138.0/24',
|
|
|
|
'172.19.139.0/24',
|
|
|
|
},
|
|
|
|
},
|
2020-11-13 17:47:40 +00:00
|
|
|
},
|
|
|
|
}
|