Last active
August 29, 2015 14:21
-
-
Save nkukard/a20906259e9a0cb3b03c to your computer and use it in GitHub Desktop.
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
# Create empty file | |
/etc/shorewall/rules: | |
file.managed: | |
- user: root | |
- group: root | |
- mode: 644 | |
- template: jinja | |
- source: salt://shorewall/rules.jinja2 | |
- replace: False | |
# Add managed rules block | |
/etc/shorewall/rules-block: | |
file.blockreplace: | |
- name: /etc/shorewall/rules | |
- marker_start: "### START SALT MANAGED SECTION ###" | |
- marker_end: "### END SALT MANAGED SECTION ###" | |
- append_if_not_found: True | |
/etc/shorewall/rules-block-allow-ssh: | |
file.accumulated: | |
- filename: /etc/shorewall/rules | |
- name: rules-block-accumulator | |
- text: | | |
?COMMENT Allow SSH traffic in at a rate of 3 per min | |
SSH(ACCEPT) net fw - - - - s:ssh:3/min:5 | |
- require_in: | |
- file: /etc/shorewall/rules-block | |
/etc/shorewall/rules-block-allow-ping: | |
file.accumulated: | |
- filename: /etc/shorewall/rules | |
- name: rules-block-accumulator | |
- text: | | |
?COMMENT Allow Ping traffic | |
Ping(ACCEPT) net fw | |
- require_in: | |
- file: /etc/shorewall/rules-block |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment