Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Conversation

thuiop
Copy link
Collaborator

@thuiop thuiop commented Mar 14, 2019

Description

Added a firewall role which can be used to deploy port blocking configuration on servers, using iptables.

Fixes #73

Checklist

  • Molecule tests are passing
  • Extended the README / documentation, if necessary
  • Test for the feature added

slf added 2 commits February 8, 2019 15:33
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
src: "{{ firewall_name }}/rules.v4.j2"
src: rules.v4.j2

@@ -0,0 +1,11 @@
---
ports: #Ports to be opened
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#Opens the selected ports in input
# Open the selected ports in input


do_query(database_address, ADD_ALIAS_DOMAIN_QUERY, alias_domains)


Copy link
Collaborator

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

@hugoShaka hugoShaka self-requested a review March 20, 2019 14:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants