{"id":1379,"date":"2014-12-04T17:56:45","date_gmt":"2014-12-04T17:56:45","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=1379"},"modified":"2014-12-04T17:56:45","modified_gmt":"2014-12-04T17:56:45","slug":"block-ip-iptables","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/12\/04\/block-ip-iptables\/","title":{"rendered":"Block IP with iptables"},"content":{"rendered":"<p>Block Incoming Request From IP 1.2.3.4<\/p>\n<p>The following command will drop any packet coming from the IP address 1.2.3.4:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/sbin\/iptables -I INPUT -s {IP-HERE} -j DROP\n# \/sbin\/iptables -I INPUT -s 1.2.3.4 -j DROP\n\n<\/pre>\n<p>Finally, the last thing we need to do is save our rules so that next time we reboot our computer our rules are automatically reloaded:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# \/sbin\/service iptables save\n\n<\/pre>\n<p>Check to see if it is added:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# iptables --list -n | grep 37.233.38.46\nDROP       all  --  37.233.38.46         0.0.0.0\/0\n<\/pre>\n<p>Other good info to check out:<\/p>\n<p><a href=\"http:\/\/wiki.centos.org\/HowTos\/Network\/IPTables\" target=\"_blank\" rel=\"noopener\">http:\/\/wiki.centos.org\/HowTos\/Network\/IPTables<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Block Incoming Request From IP 1.2.3.4 The following command will drop any packet coming from the IP address 1.2.3.4: # \/sbin\/iptables -I INPUT -s {IP-HERE} -j DROP # \/sbin\/iptables -I INPUT -s 1.2.3.4 -j DROP Finally, the last thing we need to do is save our rules so that next time we reboot our computer &#8230; <a title=\"Block IP with iptables\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/12\/04\/block-ip-iptables\/\" aria-label=\"Read more about Block IP with iptables\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,52],"tags":[],"class_list":["post-1379","post","type-post","status-publish","format-standard","hentry","category-administration","category-iptables"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}