pending changes
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m26s
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m26s
This commit is contained in:
@@ -25,6 +25,7 @@ physicalservers:
|
|||||||
hosts:
|
hosts:
|
||||||
frederica:
|
frederica:
|
||||||
serenor:
|
serenor:
|
||||||
|
ks3370405:
|
||||||
|
|
||||||
webservers:
|
webservers:
|
||||||
hosts:
|
hosts:
|
||||||
|
@@ -3,5 +3,4 @@
|
|||||||
- name: Install & configure the global SMTP relay
|
- name: Install & configure the global SMTP relay
|
||||||
hosts: ks3370405
|
hosts: ks3370405
|
||||||
roles:
|
roles:
|
||||||
- ufw
|
|
||||||
- global_smtp_relay
|
- global_smtp_relay
|
||||||
|
@@ -20,6 +20,8 @@
|
|||||||
import_playbook: mail.yml
|
import_playbook: mail.yml
|
||||||
- name: Run global_smtprelay playbook
|
- name: Run global_smtprelay playbook
|
||||||
import_playbook: global_smtprelay.yml
|
import_playbook: global_smtprelay.yml
|
||||||
|
- name: Run ufw plabook
|
||||||
|
import_playbook: ufw.yml
|
||||||
- name: Run xmpp playbook
|
- name: Run xmpp playbook
|
||||||
import_playbook: xmpp.yml
|
import_playbook: xmpp.yml
|
||||||
- name: Run webservers playbook
|
- name: Run webservers playbook
|
||||||
|
6
playbooks/ufw.yml
Normal file
6
playbooks/ufw.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install & configure UFW
|
||||||
|
hosts: ks3370405
|
||||||
|
roles:
|
||||||
|
- ufw
|
@@ -350,6 +350,53 @@ config redirect
|
|||||||
option dest_port '64738'
|
option dest_port '64738'
|
||||||
option target 'DNAT'
|
option target 'DNAT'
|
||||||
|
|
||||||
|
# Allow DNS traffic
|
||||||
|
config rule
|
||||||
|
option name 'Allow-INPUT-DNS'
|
||||||
|
option src 'wan'
|
||||||
|
list proto 'tcp'
|
||||||
|
list proto 'udp'
|
||||||
|
option dest 'dmz'
|
||||||
|
option dest_ip '{{ hostvars['dns1'].proxmox_net0.ip6 | ansible.utils.ipaddr('address') }}'
|
||||||
|
option dest_port '53'
|
||||||
|
option target 'ACCEPT'
|
||||||
|
option family 'ipv6'
|
||||||
|
|
||||||
|
config redirect
|
||||||
|
option name 'Allow-INPUT-DNS'
|
||||||
|
option src 'wan'
|
||||||
|
option src_dport '53'
|
||||||
|
list proto 'tcp'
|
||||||
|
list proto 'udp'
|
||||||
|
option dest 'dmz'
|
||||||
|
option dest_ip '{{ hostvars['dns1'].proxmox_net0.ip | ansible.utils.ipaddr('address') }}'
|
||||||
|
option dest_port '53'
|
||||||
|
option target 'DNAT'
|
||||||
|
|
||||||
|
config rule
|
||||||
|
option name 'Allow-OUTPUT-DNS'
|
||||||
|
option src 'dmz'
|
||||||
|
option src_ip '{{ hostvars['dns1'].proxmox_net0.ip | ansible.utils.ipaddr('address') }}'
|
||||||
|
list proto 'tcp'
|
||||||
|
list proto 'udp'
|
||||||
|
option dest 'wan'
|
||||||
|
option dest_port '53'
|
||||||
|
option dest_ip '{{ hostvars['ks3370405'].ansible_default_ipv4.address }}'
|
||||||
|
option target 'ACCEPT'
|
||||||
|
option family 'ipv4'
|
||||||
|
|
||||||
|
config rule
|
||||||
|
option name 'Allow-OUTPUT-DNS'
|
||||||
|
option src 'dmz'
|
||||||
|
option src_ip '{{ hostvars['dns1'].proxmox_net0.ip6 | ansible.utils.ipaddr('address') }}'
|
||||||
|
list proto 'tcp'
|
||||||
|
list proto 'udp'
|
||||||
|
option dest 'wan'
|
||||||
|
option dest_port '53'
|
||||||
|
option dest_ip '{{ hostvars['ks3370405'].ansible_default_ipv6.address }}'
|
||||||
|
option target 'ACCEPT'
|
||||||
|
option family 'ipv6'
|
||||||
|
|
||||||
# Allow mail traffic
|
# Allow mail traffic
|
||||||
config rule
|
config rule
|
||||||
option name 'Allow-OUTPUT-SMTP'
|
option name 'Allow-OUTPUT-SMTP'
|
||||||
|
@@ -34,6 +34,11 @@
|
|||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
loop: "{{ ufw_allowed_smtp_ips }}"
|
loop: "{{ ufw_allowed_smtp_ips }}"
|
||||||
|
|
||||||
|
- name: Allow incoming DNS
|
||||||
|
community.general.ufw:
|
||||||
|
rule: allow
|
||||||
|
port: domain
|
||||||
|
|
||||||
- name: Set logging
|
- name: Set logging
|
||||||
community.general.ufw:
|
community.general.ufw:
|
||||||
logging: "on"
|
logging: "on"
|
||||||
|
Reference in New Issue
Block a user