From 0ae9d9c4b9fee821b68b2d3bc700c9324a50a107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 12 Jul 2020 15:01:08 +0200 Subject: sentinel-minipot: also provide port 25 (not only SMTP submission) --- sentinel-minipot/Makefile | 2 +- sentinel-minipot/files/sentinel-firewall.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sentinel-minipot') diff --git a/sentinel-minipot/Makefile b/sentinel-minipot/Makefile index d63a4b0..d210e9a 100644 --- a/sentinel-minipot/Makefile +++ b/sentinel-minipot/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sentinel-minipot PKG_VERSION:=2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/sentinel/minipot.git PKG_SOURCE_VERSION:=7daf3f92cf47b4aaf65e27f597aa8d9be35f4c90 diff --git a/sentinel-minipot/files/sentinel-firewall.sh b/sentinel-minipot/files/sentinel-firewall.sh index 40c584b..e4a69b1 100644 --- a/sentinel-minipot/files/sentinel-firewall.sh +++ b/sentinel-minipot/files/sentinel-firewall.sh @@ -27,8 +27,10 @@ port_redirect_zone() { iptables_redirect "$zone" 21 "$ftp_port" "Minipot FTP" [ "$http_port" = "0" ] || \ iptables_redirect "$zone" 80 "$http_port" "Minipot HTTP" - [ "$smtp_port" = "0" ] || \ + [ "$smtp_port" = "0" ] || { + iptables_redirect "$zone" 25 "$smtp_port" "Minipot SMTP" iptables_redirect "$zone" 587 "$smtp_port" "Minipot SMTP submission" + } [ "$telnet_port" = "0" ] || \ iptables_redirect "$zone" 23 "$telnet_port" "Minipot Telnet" } @@ -42,8 +44,10 @@ if source_if_exists "$SF_DIR/dynfw-utils.sh"; then bypass_dynamic_firewall "tcp" "21" "Minipot FTP" [ "$http_port" = "0" ] || \ bypass_dynamic_firewall "tcp" "23" "Minipot HTTP" - [ "$smtp_port" = "0" ] || \ + [ "$smtp_port" = "0" ] || { + bypass_dynamic_firewall "tcp" "25" "Minipot SMTP" bypass_dynamic_firewall "tcp" "587" "Minipot SMTP submission" + } [ "$telnet_port" = "0" ] || \ bypass_dynamic_firewall "tcp" "23" "Minipot Telnet" fi -- cgit v1.2.3