Add Netplan for Servers

This commit is contained in:
Stefan Hoffmann 2023-03-06 18:25:27 +01:00
parent 042d63f30a
commit bc5a0ada52
3 changed files with 44 additions and 1 deletions

View File

@ -61,3 +61,14 @@
- iptables-persistent - iptables-persistent
state: latest state: latest
update_cache: yes update_cache: yes
- name: Copy Netplan Template for Internal Network
ansible.builtin.template:
src: netplan.j2
dest: /etc/netplan/01-freifunk-internal.yaml
owner: root
group: root
mode: 755
- name: Apply Netplan
ansible.builtin.shell: netplan apply

View File

@ -0,0 +1,14 @@
network:
ethernets:
ens19:
dhcp4: false
addresses:
- {{ freifunk_internal_ip }}
nameservers:
addresses:
- 1.1.1.1
routes:
- to: default
via: {{ core_router }}
table: 42
version: 2

View File

@ -337,6 +337,24 @@ protocols {
} }
} }
service { service {
dhcp-server {
listen-address 172.16.7.1
shared-network-name freifunk {
subnet 172.16.7.0/24 {
default-router 172.16.7.1
name-server 1.1.1.1
name-server 1.0.0.1
range dhcp {
start 172.16.7.10
stop 172.16.7.200
}
static-mapping vpn-01 {
ip-address 172.16.7.2
mac-address 36:f3:82:18:9b:03
}
}
}
}
ntp { ntp {
allow-client { allow-client {
address 0.0.0.0/0 address 0.0.0.0/0