From f9b6485f2271f6bacb6854a494a7aa9b20e4f546 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Fri, 5 May 2017 11:27:33 +0100 Subject: [PATCH] a little extra thing for iptables --- script/install/ubuntu1604.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script/install/ubuntu1604.sh b/script/install/ubuntu1604.sh index 715df84..9415264 100644 --- a/script/install/ubuntu1604.sh +++ b/script/install/ubuntu1604.sh @@ -67,6 +67,13 @@ mkdir /etc/nginx/ssl/ openssl req -x509 -newkey rsa:4096 -keyout /etc/nginx/ssl/postal.key -out /etc/nginx/ssl/postal.crt -days 365 -nodes -subj "/C=GB/ST=Example/L=Example/O=Example/CN=example.com" service nginx reload +# +# Configure SMTP on port 25 +# +iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525 +iptables -t nat -A OUTPUT -o lo -p tcp --dport 25 -j REDIRECT --to-port 2525 +iptables -I INPUT -p tcp -m tcp --dport 2525 -j ACCEPT + # # All done #