tuto3: new script in debug host: reset-router-firewall: to reset fw filter rules

This commit is contained in:
nemunaire 2019-04-30 11:40:21 +02:00 committed by Pierre-Olivier Mercier
parent c3e43b0893
commit a61e2beac5
1 changed files with 11 additions and 0 deletions

View File

@ -324,6 +324,17 @@ files:
source: pkg/nsd/sshd_config
mode: "0644"
- path: /usr/bin/reset-router-firewall
contents: |
#!/bin/sh
PS=$(pgrep systemd | head -1)
nsenter -t "${PS}" -a iptables -F
nsenter -t "${PS}" -a iptables -P INPUT ACCEPT
nsenter -t "${PS}" -a iptables -P FORWARD ACCEPT
nsenter -t "${PS}" -a iptables -P OUTPUT ACCEPT
nsenter -t "${PS}" -a iptables -t nat -F
mode: "0755"
- path: /initdb/init-ttrss.sh
contents: |
#!/bin/sh