{"id":402,"date":"2016-01-26T17:13:28","date_gmt":"2016-01-26T17:13:28","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=402"},"modified":"2016-01-26T17:13:36","modified_gmt":"2016-01-26T17:13:36","slug":"adding-mail-ports-to-firewall","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/01\/26\/adding-mail-ports-to-firewall\/","title":{"rendered":"Adding mail ports to Linux firewall with iptables"},"content":{"rendered":"<p>So a customer had flushed his iptables rules, and sadly wasn&#8217;t able to use SMTP and POP. So I put together this basic tutorial explaining how to do it!<\/p>\n<pre>\r\n\r\nThe following ports are used for mail commonly:\r\n\r\nSMTP \t587\r\nPOP \t110\r\nPOPS \t995\r\nIMAP \t143\r\nIMAP3 \t993\r\n\r\nTo add these ports to the firewall rules;\r\n\r\n# Allows SMTP access\r\n\r\niptables -A INPUT -p tcp --dport 25 -j ACCEPT \r\n\r\n# Allows pop and pops connections \r\n\r\niptables -A INPUT -p tcp --dport 110 -j ACCEPT\r\niptables -A INPUT -p tcp --dport 995 -j ACCEPT\r\n\r\n# Allows imap and imaps connections \r\n\r\niptables -A INPUT -p tcp --dport 143 -j ACCEPT\r\niptables -A INPUT -p tcp --dport 993 -j ACCEPT\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So a customer had flushed his iptables rules, and sadly wasn&#8217;t able to use SMTP and POP. So I put together this basic tutorial explaining how to do it! The following ports are used for mail commonly: SMTP 587 POP &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/01\/26\/adding-mail-ports-to-firewall\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,9,7,3],"tags":[],"class_list":["post-402","post","type-post","status-publish","format-standard","hentry","category-iptables","category-linux","category-management-tools","category-security"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":2,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/402\/revisions\/404"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}