{"id":755,"date":"2013-10-10T19:29:47","date_gmt":"2013-10-10T19:29:47","guid":{"rendered":"http:\/\/scunster.co.uk\/?p=755"},"modified":"2013-10-10T19:29:47","modified_gmt":"2013-10-10T19:29:47","slug":"update-edit-firewall-iptables-on-ubuntu-mint-centos","status":"publish","type":"post","link":"https:\/\/scunster.co.uk\/?p=755","title":{"rendered":"update \/ edit firewall &#038; iptables on ubuntu, mint, centos"},"content":{"rendered":"<p>There are several ways to edit, add or change the linux firewall by using iptables:<\/p>\n<p>1) edit \/etc\/sysconfig\/iptables<br \/>\nmanually add, change or delete lines and resave the file.<\/p>\n<p>2) add rules through the terminal as follows:<\/p>\n<p>eg. The following command will allow \/ open port 80 (ie. a web server)<br \/>\nsudo iptables -A INPUT -p tcp &#8211;dport 80 -j ACCEPT<\/p>\n<p>eg. These two commands will alllow port 80 access only from the specified IP address (111.111.111.111) and deny port 80 for all other requests. Useful for securing SFTP, SSH or Web Access on various ports.<br \/>\niptables -A INPUT -p tcp &#8211;dport 8000 -s 1.2.3.4 -s 111.111.111.111-j ACCEPT<br \/>\niptables -A INPUT -p tcp &#8211;dport 8000\u00a0 -j DROP<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are several ways to edit, add or change the linux firewall by using iptables: 1) edit \/etc\/sysconfig\/iptables manually add, change or delete lines and resave the file. 2) add rules through the terminal as follows: eg. The following command will allow \/ open port 80 (ie. a web server) sudo iptables -A INPUT -p [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[164,3,131],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-ubuntu-linux"],"_links":{"self":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=755"}],"version-history":[{"count":1,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":756,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/755\/revisions\/756"}],"wp:attachment":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}