Add Netplan for Servers
This commit is contained in:
parent
042d63f30a
commit
bc5a0ada52
@ -61,3 +61,14 @@
|
||||
- iptables-persistent
|
||||
state: latest
|
||||
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
|
14
roles/01-vpn-offloader-setup/templates/netplan.j2
Normal file
14
roles/01-vpn-offloader-setup/templates/netplan.j2
Normal 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
|
@ -337,6 +337,24 @@ protocols {
|
||||
}
|
||||
}
|
||||
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 {
|
||||
allow-client {
|
||||
address 0.0.0.0/0
|
||||
|
Loading…
Reference in New Issue
Block a user