Created
November 5, 2021 10:15
-
-
Save tormath1/1184ffb73bc393c6413d94bd1317b486 to your computer and use it in GitHub Desktop.
iptables restore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ct --in-file ./config.yml --pretty > ./ignition.json | |
storage: | |
files: | |
- path: /var/lib/iptables/rules-save | |
filesystem: root | |
mode: 0644 | |
contents: | |
inline: | | |
*filter | |
-A INPUT -p tcp --dport ssh -j ACCEPT | |
COMMIT | |
systemd: | |
units: | |
- name: iptables-restore.service | |
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ignition": { | |
"config": {}, | |
"security": { | |
"tls": {} | |
}, | |
"timeouts": {}, | |
"version": "2.3.0" | |
}, | |
"networkd": {}, | |
"passwd": {}, | |
"storage": { | |
"files": [ | |
{ | |
"filesystem": "root", | |
"path": "/var/lib/iptables/rules-save", | |
"contents": { | |
"source": "data:,*filter%0A-A%20INPUT%20-p%20tcp%20--dport%20ssh%20-j%20ACCEPT%0ACOMMIT%0A", | |
"verification": {} | |
}, | |
"mode": 420 | |
} | |
] | |
}, | |
"systemd": { | |
"units": [ | |
{ | |
"enabled": true, | |
"name": "iptables-restore.service" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment