-
Notifications
You must be signed in to change notification settings - Fork 4
Adding firewall #95
base: master
Are you sure you want to change the base?
Adding firewall #95
Conversation
Added ADD_ALIASES_QUERY and corresponding python function insert_virtual_aliases in tools.py to allow the use of postfix aliases. Integrated this function in the test file test_smtp.py.
|
||
- name: Copy iptables rules | ||
template: | ||
src: "{{ firewall_name }}/rules.v4.j2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src: "{{ firewall_name }}/rules.v4.j2" | |
src: rules.v4.j2 |
@@ -0,0 +1,11 @@ | |||
--- | |||
ports: #Ports to be opened |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail molecule lint
@@ -0,0 +1,15 @@ | |||
--- | |||
- name: Install or update iptables-related packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Install or update iptables-related packages | |
- name: Install iptables-related packages |
(state: present
prevents any package update)
@@ -0,0 +1,43 @@ | |||
{# | |||
Test the result by typing: ansible all -i "localhost," -c local -m template -a "src=rules.v4.j2 dest=./rules.v4.testrender" --extra-vars=@../../vars/servers.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the --extra-vars=@../../vars/servers.yml
?
:FORWARD DROP [0:0] | ||
:OUTPUT ACCEPT [0:0] | ||
|
||
#Opens the selected ports in input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#Opens the selected ports in input | |
# Open the selected ports in input |
|
||
do_query(database_address, ADD_ALIAS_DOMAIN_QUERY, alias_domains) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail molecule lint
Description
Added a firewall role which can be used to deploy port blocking configuration on servers, using iptables.
Fixes #73
Checklist