update
This commit is contained in:
@ -169,8 +169,8 @@ id=RATE_CLIENT_ADDR
|
||||
id=BLOCK_MSG_RCPT
|
||||
&&INCOMING
|
||||
&&SASL_AUTH
|
||||
recipient_count=50
|
||||
action=REJECT Too many recipients, please reduce to less than 50 or consider using a mailing list. Error: BLOCK_MSG_RCPT
|
||||
recipient_count=90
|
||||
action=REJECT Too many recipients, please reduce to less than 90 or consider using a mailing list. Error: BLOCK_MSG_RCPT
|
||||
|
||||
# Block users sending more than 50 messages/hour
|
||||
id=RATE_MSG
|
||||
|
@ -99,67 +99,153 @@
|
||||
# ===
|
||||
|
||||
# ---
|
||||
# Add additional SMTP ports (OUT and IN)
|
||||
# Add support for MNDP and mDNS Traffic
|
||||
# ---
|
||||
|
||||
- name: Check if String 'smtpd_additional_listen_ports=..' is present
|
||||
shell: grep -q -E "^smtpd_additional_listen_ports=" /etc/ipt-firewall/main_ipv4.conf
|
||||
register: smtpd_additional_listen_ports_ipv4_present
|
||||
- name: Check if String 'drop_mndp=..' is present
|
||||
shell: grep -q -E "^drop_mndp=" /etc/ipt-firewall/main_ipv4.conf
|
||||
register: drop_mndp_ipv4_present
|
||||
when: main_ipv4_exists.stat.exists
|
||||
failed_when: "smtpd_additional_listen_ports_ipv4_present.rc > 1"
|
||||
changed_when: "smtpd_additional_listen_ports_ipv4_present.rc > 0"
|
||||
failed_when: "drop_mndp_ipv4_present.rc > 1"
|
||||
changed_when: "drop_mndp_ipv4_present.rc > 0"
|
||||
|
||||
- name: Adjust file '/etc/ipt-firewall/main_ipv4.conf' (smtpd_additional_listen_ports)
|
||||
- name: Adjust file '/etc/ipt-firewall/main_ipv4.conf' (drop_mndp)
|
||||
blockinfile:
|
||||
path: /etc/ipt-firewall/main_ipv4.conf
|
||||
insertafter: '^#?\s*forward_smtpd_ips'
|
||||
insertafter: '^#?\s*drop_icmp'
|
||||
block: |
|
||||
# Additional Ports on which SMTP Service should lsiten
|
||||
#
|
||||
# blank separated list of ports
|
||||
#
|
||||
smtpd_additional_listen_ports=""
|
||||
|
||||
# Additional Ports for outgoing smtp traffic
|
||||
# -------------
|
||||
# --- Drop Mikrotik RouterOS Neighbor Discovery Protocol (MNDP) Traffic
|
||||
# --- Drop Tinc VPN Traffic
|
||||
# -------------
|
||||
|
||||
# Tinc VPN Traffic / Mikrotik RouterOS Neighbor Discovery Protocol (MNDP) Traffic
|
||||
#
|
||||
# blank separated list of ports
|
||||
# Der UDP-Port 5678 wird üblicherweise von Tinc VPN verwendet. Tinc ist ein
|
||||
# Open-Source-VPN-Softwarepaket, das für die Erstellung von Virtual Private
|
||||
# Networks (VPNs) eingesetzt wird, bei denen Netzwerke über das Internet oder
|
||||
# andere unsichere Netzwerke miteinander verbunden werden. Es nutzt diesen
|
||||
# Port, um Verbindungen zwischen den Knoten (Nodes) des VPNs zu ermöglichen.
|
||||
#
|
||||
smtpd_additional_outgoung_ports=""
|
||||
marker: "# Marker set by modify-ipt-server.yml (smtpd_additional_listen_ports)"
|
||||
# Der UDP-Port 5678 wird auch von MikroTik RouterOS Neighbor Discovery Protocol
|
||||
# (NDP) verwendet. Dieses Protokoll wird von MikroTik-Routern eingesetzt, um
|
||||
# benachbarte Geräte im Netzwerk zu entdecken und automatisch zu erkennen. Es
|
||||
# hilft dabei, die Kommunikation zwischen MikroTik-Geräten zu erleichtern, ohne
|
||||
# dass eine manuelle IP-Konfiguration erforderlich ist.
|
||||
#
|
||||
# MikroTik Neighbor Discovery über UDP-Port 5678 ist speziell darauf ausgelegt,
|
||||
# Router und Geräte im selben lokalen Netzwerk (LAN) zu identifizieren und
|
||||
# Informationen über benachbarte MikroTik-Geräte auszutauschen. Dies ist besonders
|
||||
# nützlich für die Verwaltung und Konfiguration von MikroTik-Geräten im Netzwerk.
|
||||
#
|
||||
# Zusammengefasst:
|
||||
# Der UDP-Port 5678 wird sowohl für MikroTik RouterOS Neighbor Discovery als auch
|
||||
# für Tinc VPN verwendet, je nachdem, welche Technologie zum Einsatz kommt.
|
||||
#
|
||||
drop_mndp=true
|
||||
|
||||
|
||||
# -------------
|
||||
# --- Drop Multicast DNS Traffic
|
||||
# -------------
|
||||
|
||||
# Multicast Domain Name System (mDNS) protocol
|
||||
#
|
||||
# UDP Port 5353/
|
||||
#
|
||||
# Der UDP-Port 5353 wird hauptsächlich für Multicast DNS (mDNS) verwendet.
|
||||
# mDNS ist ein Protokoll, das es Geräten ermöglicht, sich im lokalen Netzwerk
|
||||
# selbst zu identifizieren und ohne zentrale DNS-Server Namen zu registrieren
|
||||
# und aufzulösen. Dies wird häufig in lokalen Netzwerken eingesetzt, z.B. bei
|
||||
# Geräten, die mit Apple's Bonjour oder Avahi (einer Open-Source-Implementierung
|
||||
# von mDNS) kommunizieren.
|
||||
#
|
||||
# UDP port 5353 is mainly used for multicast DNS (mDNS). mDNS is a protocol that
|
||||
# allows devices to identify themselves on the local network and register and
|
||||
# resolve names without central DNS servers. This is often used in local
|
||||
# networks, e.g. for devices that communicate using Apple's Bonjour or Avahi
|
||||
# (an open-source implementation of mDNS).
|
||||
#
|
||||
drop_mdns=true
|
||||
marker: "# Marker set by modify-ipt-server.yml (drop_mndp)"
|
||||
when:
|
||||
- main_ipv4_exists.stat.exists
|
||||
- smtpd_additional_listen_ports_ipv4_present is changed
|
||||
- drop_mndp_ipv4_present is changed
|
||||
notify:
|
||||
- Restart IPv4 Firewall
|
||||
|
||||
|
||||
- name: Check if String 'smtpd_additional_listen_ports=..' is present
|
||||
shell: grep -q -E "^smtpd_additional_listen_ports=" /etc/ipt-firewall/main_ipv6.conf
|
||||
register: smtpd_additional_listen_ports_ipv6_present
|
||||
- name: Check if String 'drop_mndp=..' is present
|
||||
shell: grep -q -E "^drop_mndp=" /etc/ipt-firewall/main_ipv6.conf
|
||||
register: drop_mndp_ipv6_present
|
||||
when: main_ipv6_exists.stat.exists
|
||||
failed_when: "smtpd_additional_listen_ports_ipv6_present.rc > 1"
|
||||
changed_when: "smtpd_additional_listen_ports_ipv6_present.rc > 0"
|
||||
failed_when: "drop_mndp_ipv6_present.rc > 1"
|
||||
changed_when: "drop_mndp_ipv6_present.rc > 0"
|
||||
|
||||
- name: Adjust file '/etc/ipt-firewall/main_ipv6.conf' (smtpd_additional_listen_ports)
|
||||
- name: Adjust file '/etc/ipt-firewall/main_ipv6.conf' (drop_mndp)
|
||||
blockinfile:
|
||||
path: /etc/ipt-firewall/main_ipv6.conf
|
||||
insertafter: '^#?\s*forward_smtpd_ips'
|
||||
insertafter: '^#?\s*drop_icmp'
|
||||
block: |
|
||||
# Additional Ports on which SMTP Service should lsiten
|
||||
#
|
||||
# blank separated list of ports
|
||||
#
|
||||
smtpd_additional_listen_ports=""
|
||||
|
||||
# Additional Ports for outgoing smtp traffic
|
||||
# -------------
|
||||
# --- Drop Mikrotik RouterOS Neighbor Discovery Protocol (MNDP) Traffic
|
||||
# --- Drop Tinc VPN Traffic
|
||||
# -------------
|
||||
|
||||
# Tinc VPN Traffic / Mikrotik RouterOS Neighbor Discovery Protocol (MNDP) Traffic
|
||||
#
|
||||
# blank separated list of ports
|
||||
# Der UDP-Port 5678 wird üblicherweise von Tinc VPN verwendet. Tinc ist ein
|
||||
# Open-Source-VPN-Softwarepaket, das für die Erstellung von Virtual Private
|
||||
# Networks (VPNs) eingesetzt wird, bei denen Netzwerke über das Internet oder
|
||||
# andere unsichere Netzwerke miteinander verbunden werden. Es nutzt diesen
|
||||
# Port, um Verbindungen zwischen den Knoten (Nodes) des VPNs zu ermöglichen.
|
||||
#
|
||||
smtpd_additional_outgoung_ports=""
|
||||
marker: "# Marker set by modify-ipt-server.yml (smtpd_additional_listen_ports)"
|
||||
# Der UDP-Port 5678 wird auch von MikroTik RouterOS Neighbor Discovery Protocol
|
||||
# (NDP) verwendet. Dieses Protokoll wird von MikroTik-Routern eingesetzt, um
|
||||
# benachbarte Geräte im Netzwerk zu entdecken und automatisch zu erkennen. Es
|
||||
# hilft dabei, die Kommunikation zwischen MikroTik-Geräten zu erleichtern, ohne
|
||||
# dass eine manuelle IP-Konfiguration erforderlich ist.
|
||||
#
|
||||
# MikroTik Neighbor Discovery über UDP-Port 5678 ist speziell darauf ausgelegt,
|
||||
# Router und Geräte im selben lokalen Netzwerk (LAN) zu identifizieren und
|
||||
# Informationen über benachbarte MikroTik-Geräte auszutauschen. Dies ist besonders
|
||||
# nützlich für die Verwaltung und Konfiguration von MikroTik-Geräten im Netzwerk.
|
||||
#
|
||||
# Zusammengefasst:
|
||||
# Der UDP-Port 5678 wird sowohl für MikroTik RouterOS Neighbor Discovery als auch
|
||||
# für Tinc VPN verwendet, je nachdem, welche Technologie zum Einsatz kommt.
|
||||
#
|
||||
drop_mndp=true
|
||||
|
||||
|
||||
# -------------
|
||||
# --- Drop Multicast DNS Traffic
|
||||
# -------------
|
||||
|
||||
# Multicast Domain Name System (mDNS) protocol
|
||||
#
|
||||
# UDP Port 5353/
|
||||
#
|
||||
# Der UDP-Port 5353 wird hauptsächlich für Multicast DNS (mDNS) verwendet.
|
||||
# mDNS ist ein Protokoll, das es Geräten ermöglicht, sich im lokalen Netzwerk
|
||||
# selbst zu identifizieren und ohne zentrale DNS-Server Namen zu registrieren
|
||||
# und aufzulösen. Dies wird häufig in lokalen Netzwerken eingesetzt, z.B. bei
|
||||
# Geräten, die mit Apple's Bonjour oder Avahi (einer Open-Source-Implementierung
|
||||
# von mDNS) kommunizieren.
|
||||
#
|
||||
# UDP port 5353 is mainly used for multicast DNS (mDNS). mDNS is a protocol that
|
||||
# allows devices to identify themselves on the local network and register and
|
||||
# resolve names without central DNS servers. This is often used in local
|
||||
# networks, e.g. for devices that communicate using Apple's Bonjour or Avahi
|
||||
# (an open-source implementation of mDNS).
|
||||
#
|
||||
drop_mdns=true
|
||||
marker: "# Marker set by modify-ipt-server.yml (drop_mndp)"
|
||||
when:
|
||||
- main_ipv6_exists.stat.exists
|
||||
- smtpd_additional_listen_ports_ipv6_present is changed
|
||||
- drop_mndp_ipv6_present is changed
|
||||
notify:
|
||||
- Restart IPv6 Firewall
|
||||
|
||||
|
Reference in New Issue
Block a user