{"id":6107,"date":"2016-07-31T16:26:48","date_gmt":"2016-07-31T08:26:48","guid":{"rendered":"http:\/\/rmohan.com\/?p=6107"},"modified":"2016-07-31T16:26:48","modified_gmt":"2016-07-31T08:26:48","slug":"restricting-network-access-with-iptables","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6107","title":{"rendered":"RESTRICTING NETWORK ACCESS WITH IPTABLES"},"content":{"rendered":"<p>The first thing is to install the iptables-services.x86_64 package.<\/p>\n<p>[root@slave ~]# yum -y install iptables-services.x86_64<br \/>\nIn this example, we will be blocking traffic from the 10.10.0.0\/8 network.<\/p>\n<p>[root@slave ~]# iptables -A INPUT -s 10.10.0.0\/8 -j REJECT<br \/>\n[root@slave ~]# service iptables restart<br \/>\nRedirecting to \/bin\/systemctl restart  iptables.service<br \/>\nVerify that the network is being blocked by issuing the following command:<\/p>\n<p>[root@slave ~]# iptables -L<br \/>\nChain INPUT (policy ACCEPT)<br \/>\ntarget     prot opt source               destination<br \/>\nREJECT     all  &#8212;  10.0.0.0\/8           anywhere             reject-with icmp-port-unreachable<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first thing is to install the iptables-services.x86_64 package.<\/p>\n<p>[root@slave ~]# yum -y install iptables-services.x86_64 In this example, we will be blocking traffic from the 10.10.0.0\/8 network.<\/p>\n<p>[root@slave ~]# iptables -A INPUT -s 10.10.0.0\/8 -j REJECT [root@slave ~]# service iptables restart Redirecting to \/bin\/systemctl restart iptables.service Verify that the network is being blocked by issuing [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6107"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6107"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6107\/revisions"}],"predecessor-version":[{"id":6108,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6107\/revisions\/6108"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}