{"id":1986,"date":"2009-06-19T20:46:43","date_gmt":"2009-06-20T00:46:43","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=1986"},"modified":"2009-06-19T20:46:43","modified_gmt":"2009-06-20T00:46:43","slug":"iptables","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/06\/19\/iptables\/","title":{"rendered":"iptables"},"content":{"rendered":"<p>iptables, the Linux firewall engine, is capable of a lot more than I&#8217;d previously given it credit for. It seems like it has native support for things like OS fingerprinting and port-scan detection, plus analysis of low-level TCP headers that mere mortals like me probably shouldn&#8217;t touch. Tarpitting and ECN support, too.<\/p>\n<p>It also turns out that in addition to commands like <tt>\/etc\/init.d iptables {start, stop, restart...}<\/tt>, there&#8217;s a <tt>panic<\/tt> that will restart iptables with a policy of dropping all traffic. Kind of a neat thing for the back of your head &#8212; just don&#8217;t do it over ssh! \ud83d\ude42<\/p>\n<p>Of course, as with a lot of advanced firewall tools, things get complicated very quickly. I just tried allowing NTP traffic to my machine and it&#8217;s still being refused. If I disable iptables momentarily, traffic goes right through. I need to look more into it, but suspect it involves the &#8220;custom&#8221; chains that CentOS (probably derived from RHEL) includes.<\/p>\n<p>Edit: Ha. They want you to use the &#8220;RH-Firewall-1-INPUT&#8221; chain instead of just &#8220;INPUT,&#8221; and the rule I was adding was getting put at the bottom &#8212; right after the default deny rule. <tt>iptables -I RH-Firewall-1-INPUT 9 -p udp --dport 123 -j ACCEPT<\/tt> (don&#8217;t run without understanding: it refers to a specific position in your rules) put it right <em>before<\/em> the deny; -I lets you specify the position (9th in the RH-Firewall-1-INPUT chain) to put the rule into, as opposed to -A (add to the bottom).<\/p>","protected":false},"excerpt":{"rendered":"<p>iptables, the Linux firewall engine, is capable of a lot more than I&#8217;d previously given it credit for. It seems like it has native support for things like OS fingerprinting and port-scan detection, plus analysis of low-level TCP headers that &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2009\/06\/19\/iptables\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1986","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=1986"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/1986\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=1986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=1986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=1986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}