Role ipt-server: sync with ipt-server repo (93d9af8); adapt extract-fw-host-vars.py.
- Update firewall scripts and shared conf files from firewall/ipt-server
(HTTP connection limits, IPv6 TCP MSS clamping, ban_ipv6_mask,
mattermost TCP fallback, rename 'stansard_*' -> 'standard_*').
- New role variables: fw_set_max_new_http_conn_per_ip_per_second,
fw_max_http_new_conn_per_ip_per_second, fw_set_max_concurrent_http_conn_per_ip,
fw_max_concurrent_http_conn_per_ip, fw_set_max_new_http_conn_per_second,
fw_max_new_http_conn_per_second, fw_throttle_tcp6_mss_for_https,
fw_tcp6_mss_for_https_val, fw_mm_tcp_ports_in, fw_ban_ipv6_mask.
- Split fw_blocked_ips into fw_blocked_ips_v4 / fw_blocked_ips_v6 and
rename it in host_vars accordingly.
- Restart firewall when scripts or shared conf files change.
- extract-fw-host-vars.py: map new variables, normalize '${var}' and renamed
bash variables, fall back to IPv6 for shared variables and warn if IPv4
and IPv6 values differ.
- README.md / MIGRATION.md: document host_vars naming
(<short-hostname>-ipt-server.yml) and new variables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ Das alte Verfahren:
|
||||
|
||||
Das neue Verfahren:
|
||||
|
||||
- Alle Firewall-Einstellungen liegen in `host_vars/${HOSTNAME}/ipt-server.yml`.
|
||||
- Alle Firewall-Einstellungen liegen in `host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml`.
|
||||
- Ansible deployt die Config-Dateien aus Jinja2-Templates.
|
||||
- Direktes Editieren auf dem Host ist nicht mehr vorgesehen.
|
||||
|
||||
@@ -57,7 +57,7 @@ cd /path/to/ansible/oopen-server
|
||||
HOSTNAME=<hostname>
|
||||
|
||||
./extract-fw-host-vars.py ${HOSTNAME} --sudo \
|
||||
-o host_vars/${HOSTNAME}/ipt-server.yml
|
||||
-o host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml
|
||||
```
|
||||
|
||||
Das Skript fragt einmalig nach dem `sudo`-Passwort.
|
||||
@@ -65,7 +65,7 @@ Das Skript fragt einmalig nach dem `sudo`-Passwort.
|
||||
**Ergebnis prüfen:**
|
||||
|
||||
```bash
|
||||
cat host_vars/${HOSTNAME}/ipt-server.yml
|
||||
cat host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml
|
||||
```
|
||||
|
||||
Kontrollpunkte:
|
||||
@@ -114,7 +114,7 @@ Jetzt wird `fw_manage_config: true` gesetzt, damit Ansible die vier
|
||||
host-spezifischen Config-Dateien aus den Templates schreibt:
|
||||
|
||||
```yaml
|
||||
# host_vars/${HOSTNAME}/ipt-server.yml
|
||||
# host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml
|
||||
---
|
||||
fw_manage_config: true # ← hinzufügen / auf true setzen
|
||||
|
||||
@@ -159,7 +159,7 @@ Config-Dateien produzieren exakt dieselben Rules wie die bisher händisch
|
||||
verwalteten.
|
||||
|
||||
Falls Unterschiede erscheinen: die abweichenden Rules identifizieren, die
|
||||
entsprechenden Variablen in `host_vars/${HOSTNAME}/ipt-server.yml` nachpflegen,
|
||||
entsprechenden Variablen in `host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml` nachpflegen,
|
||||
erneut ausrollen und den Diff wiederholen.
|
||||
|
||||
Ab jetzt:
|
||||
@@ -204,7 +204,7 @@ Hinweis (via `{{ ansible_managed }}`):
|
||||
```ini
|
||||
# Ansible managed
|
||||
# DO NOT EDIT - changes will be overwritten on the next Ansible run.
|
||||
# Edit host_vars/${HOSTNAME}/ipt-server.yml instead.
|
||||
# Edit host_vars/${HOSTNAME}/${HOSTNAME%.*.*}-ipt-server.yml instead.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user