<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bizarre iptables issue, would like to resolve it. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082601#M83151</link>
    <description>&lt;!--!*#--&gt;Most of the attacks I see are brute force against ssh. I use the these rules to block and IP address if it hits ssh 4 times within a minute&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set&lt;BR /&gt;--name SSH_PROBER&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --rche&lt;BR /&gt;ck --seconds 60 --hitcount 4 --name SSH_PROBER --rsource -j LOG --log-prefix "SSH_brute_force "&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --rche&lt;BR /&gt;ck --seconds 60 --hitcount 4 --name SSH_PROBER -j DROP&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 08 Oct 2007 20:41:18 GMT</pubDate>
    <dc:creator>Jimmy Vance</dc:creator>
    <dc:date>2007-10-08T20:41:18Z</dc:date>
    <item>
      <title>Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082592#M83142</link>
      <description>I'm betting Stuart or Ivan can fix this pretty easily.&lt;BR /&gt;&lt;BR /&gt;I implemented fail2ban on a system.&lt;BR /&gt;&lt;BR /&gt;Basically it reacts to log entries with temporary bans based on ip address. Its great at thwarting DoS attacks. My firewalls, which are firestarter based have become much mores stable since implementing fail2ban.&lt;BR /&gt;&lt;BR /&gt;Internal systems don't have firestarter but implement a feature firestarter does not provide. ban lists.&lt;BR /&gt;&lt;BR /&gt;An IP address pisses me off, makes my feel blue, whatever the reason, I add it to the ban list.&lt;BR /&gt;&lt;BR /&gt;# Generated by iptables-save v1.2.11 on Mon Oct  8 04:07:20 2007&lt;BR /&gt;*filter&lt;BR /&gt;:INPUT ACCEPT [18971486:1251615142]&lt;BR /&gt;:FORWARD ACCEPT [0:0]&lt;BR /&gt;:OUTPUT ACCEPT [41127689:57413048430]&lt;BR /&gt;-A INPUT -s 58.50.213.173 -j DROP&lt;BR /&gt;-A INPUT -s 222.213.93.92 -j DROP&lt;BR /&gt;-A INPUT -s 218.0.168.179 -j DROP&lt;BR /&gt;-A INPUT -s 211.52.78.2 -j DROP&lt;BR /&gt;.....&lt;BR /&gt;-A OUTPUT -d 220.134.178.0/255.255.255.0 -j DROP&lt;BR /&gt;COMMIT&lt;BR /&gt;&lt;BR /&gt;Obviously this non-standard implementation is making fail2ban unhappy.&lt;BR /&gt;&lt;BR /&gt;I don't understand how these name tags that fail2ban wants to use should be implemented.&lt;BR /&gt;&lt;BR /&gt;I belive my configuration is not compatible with fail2ban and would like if possible to make my implementation compatible. I'm guessing a couple of simple commands and a service iptables save will do it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;fail2ban errors:&lt;BR /&gt;&lt;BR /&gt;2007-10-06 17:01:09,652 ERROR: 'iptables -D INPUT -p tcp --dport http -j fail2ban-Apache&lt;BR /&gt;iptables -F fail2ban-Apache&lt;BR /&gt;iptables -X fail2ban-Apache' returned 256&lt;BR /&gt;2007-10-06 17:01:09,667 ERROR: 'iptables -D INPUT -p tcp --dport ssh -j fail2ban-SSH&lt;BR /&gt;iptables -F fail2ban-SSH&lt;BR /&gt;iptables -X fail2ban-SSH' returned 256&lt;BR /&gt;2007-10-06 17:01:09,679 ERROR: 'iptables -D INPUT -p tcp --dport ftp -j fail2ban-VSFTPD&lt;BR /&gt;iptables -F fail2ban-VSFTPD&lt;BR /&gt;iptables -X fail2ban-VSFTPD' returned 256&lt;BR /&gt;&lt;BR /&gt;Who wants to earn a bunny?&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 04:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082592#M83142</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T04:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082593#M83143</link>
      <description>Interesting.&lt;BR /&gt;&lt;BR /&gt;The working firewall implementation has this:&lt;BR /&gt;&lt;BR /&gt;fail2ban-SSH  tcp  --  anywhere             anywhere            tcp dpt:ssh &lt;BR /&gt;Chain fail2ban-SSH (1 references)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chain, thats the term I was looking for.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 05:13:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082593#M83143</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T05:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082594#M83144</link>
      <description>I'm not sure if you already fixed the problem, but can you attach the output of service iptables status?&lt;BR /&gt;&lt;BR /&gt;I can't find a reference for the "256" exit code in the iptables source or man pages, maybe the chain does not exists. iptables -N could fix it.&lt;BR /&gt;&lt;BR /&gt;If you use clean iptables chains for each table, fail2ban works correctly?</description>
      <pubDate>Mon, 08 Oct 2007 07:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082594#M83144</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2007-10-08T07:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082595#M83145</link>
      <description>&lt;!--!*#--&gt;Shalom,&lt;BR /&gt;&lt;BR /&gt;Table: filter&lt;BR /&gt;Chain INPUT (policy ACCEPT)&lt;BR /&gt;target     prot opt source               destination         &lt;BR /&gt;DROP       all  --  58.50.213.173        0.0.0.0/0           &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.... lots and lost of entries.&lt;BR /&gt;&lt;BR /&gt;DROP       all  --  200.162.240.141      0.0.0.0/0           &lt;BR /&gt;&lt;BR /&gt;Chain FORWARD (policy ACCEPT)&lt;BR /&gt;target     prot opt source               destination         &lt;BR /&gt;&lt;BR /&gt;Chain OUTPUT (policy ACCEPT)&lt;BR /&gt;target     prot opt source               destination         &lt;BR /&gt;DROP       all  --  0.0.0.0/0            206.161.120.39      &lt;BR /&gt;DROP       all  --  0.0.0.0/0            202.101.165.136   &lt;BR /&gt;&lt;BR /&gt;... few more.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you restate this question, I don't understand it. Too much Hebrew in my brain.&lt;BR /&gt;&lt;BR /&gt;If you use clean iptables chains for each table, fail2ban works correctly?&lt;BR /&gt;&lt;BR /&gt;What I started out with was an empty iptables configuration.&lt;BR /&gt;&lt;BR /&gt;Then my scripts found some bad people and said:&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -s 1.1.1.1 -j DROP&lt;BR /&gt;&lt;BR /&gt;At the end of the day we did:&lt;BR /&gt;&lt;BR /&gt;service iptables save&lt;BR /&gt;&lt;BR /&gt;Thats how I ended up with this.&lt;BR /&gt;&lt;BR /&gt;I'm muttering about the error codes too, makes no sense. Here is what I think the codes mean.&lt;BR /&gt;&lt;BR /&gt;iptables -D    Delete chain ???&lt;BR /&gt;iptables -F    iptables [-t table] -[LFZ] [chain] [options]&lt;BR /&gt;iptables -X    Chain command (maybe I need to make the chain for fail2ban ?&lt;BR /&gt;&lt;BR /&gt;I don't understand -F, also deals with chains. Problem not solved. Perplexed.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 07:40:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082595#M83145</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T07:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082596#M83146</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Anybody undertand french?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.dedibox-news.com/sujet-1810-fail2ban-probleme-lancement" target="_blank"&gt;http://www.dedibox-news.com/sujet-1810-fail2ban-probleme-lancement&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 07:43:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082596#M83146</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T07:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082597#M83147</link>
      <description>&lt;!--!*#--&gt;Reading the configuration file is always helpful.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# NOTE: Interpolations&lt;BR /&gt;#&lt;BR /&gt;# fwstart, as well as fwend, fwcheck, fwban, fwunban, use interpolations&lt;BR /&gt;# so %(__name__)s  will be substituted by a name of each section&lt;BR /&gt;# (unless the option is overriden in a section).&lt;BR /&gt;# If you are going to use interpolations in your setup, please make&lt;BR /&gt;# sure that you specified options port and protocol (which also has&lt;BR /&gt;# an option in DEFAULT).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Option:  fwstart&lt;BR /&gt;# Notes.:  command executed once at the start of Fail2Ban.&lt;BR /&gt;# Values:  CMD  Default:&lt;BR /&gt;#&lt;BR /&gt;fwstart = iptables -N fail2ban-%(__name__)s&lt;BR /&gt;          iptables -A fail2ban-%(__name__)s -j RETURN&lt;BR /&gt;          iptables -I INPUT -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s&lt;BR /&gt;&lt;BR /&gt;# Option:  fwend&lt;BR /&gt;# Notes.:  command executed once at the end of Fail2Ban&lt;BR /&gt;# Values:  CMD  Default:&lt;BR /&gt;#&lt;BR /&gt;fwend = iptables -D INPUT -p %(protocol)s --dport %(port)s -j fail2ban-%(__name__)s&lt;BR /&gt;        iptables -F fail2ban-%(__name__)s&lt;BR /&gt;        iptables -X fail2ban-%(__name__)s&lt;BR /&gt;&lt;BR /&gt;Still hard to know why this is happening. Looks like the fwend sequence is failing.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 07:51:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082597#M83147</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T07:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082598#M83148</link>
      <description>This thread may be a red herring.&lt;BR /&gt;&lt;BR /&gt;[root@shalom1 ~]# service iptables status | grep fail2ban&lt;BR /&gt;fail2ban-VSFTPD  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21 &lt;BR /&gt;fail2ban-SSH  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 &lt;BR /&gt;Chain fail2ban-Apache (0 references)&lt;BR /&gt;Chain fail2ban-SSH (1 references)&lt;BR /&gt;Chain fail2ban-VSFTPD (1 references)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Seems to be operating normally.&lt;BR /&gt;&lt;BR /&gt;I didn't do anything.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 08 Oct 2007 07:58:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082598#M83148</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-08T07:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082599#M83149</link>
      <description>Hi SEP,&lt;BR /&gt;&lt;BR /&gt;the "french" URL simply says:&lt;BR /&gt;&lt;BR /&gt;try fail2ban 0.7.2&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;try to start with only SSH enabled and them open the other required services one by one...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Anyway, i am sure you have already tried these...&lt;BR /&gt;&lt;BR /&gt;good luck!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Mon, 08 Oct 2007 08:10:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082599#M83149</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-10-08T08:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082600#M83150</link>
      <description>Ah, another tool to do this!  The last one I tried wasn't terribly successful, and would create new chains which had obscenely long names!&lt;BR /&gt;&lt;BR /&gt;*shuffles off to take a look into it further*</description>
      <pubDate>Mon, 08 Oct 2007 20:12:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082600#M83150</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2007-10-08T20:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082601#M83151</link>
      <description>&lt;!--!*#--&gt;Most of the attacks I see are brute force against ssh. I use the these rules to block and IP address if it hits ssh 4 times within a minute&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set&lt;BR /&gt;--name SSH_PROBER&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --rche&lt;BR /&gt;ck --seconds 60 --hitcount 4 --name SSH_PROBER --rsource -j LOG --log-prefix "SSH_brute_force "&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --rche&lt;BR /&gt;ck --seconds 60 --hitcount 4 --name SSH_PROBER -j DROP&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Oct 2007 20:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082601#M83151</guid>
      <dc:creator>Jimmy Vance</dc:creator>
      <dc:date>2007-10-08T20:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre iptables issue, would like to resolve it.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082602#M83152</link>
      <description>Jimmy, I was aware of your option.&lt;BR /&gt;&lt;BR /&gt;These systems are not vulnerable to ssh attacks because they lie behind a firewall that accepts and deals with all ssh traffic. I have a few odd numbered ports forwarded to ssh but as yet in three years have yet to see a single bad login from the outside that was not a traced to myself or one of my customers.&lt;BR /&gt;&lt;BR /&gt;You do remind me however that I don't need to use fail2ban at all for my vsftpd problem. vsfptd is forwarde from the firewall and attacks are frequent and involve sometimes over 100,000 login attempts. A few nice lines of firewall code would fix that and I'm going to do that tonight (afternoon us time).&lt;BR /&gt;&lt;BR /&gt;I do appreciate you reinitializing my brain pathway, I've got the code sitting in an email right now.&lt;BR /&gt;&lt;BR /&gt;Stuart, fail2ban is a pretty good tool, configurable and you can even have it monitor custom log files and customize the sequences it is looking for to deal with new attacks. On my firewalls it works seamlessly with firestarter and has annoyed the ssh script kiddes very nicely. I rarely see the same IP address in the fail2ban log more than once or twice. The get frustrated and go away while on timeout. I choose that last language deliberately.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 09 Oct 2007 01:45:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bizarre-iptables-issue-would-like-to-resolve-it/m-p/4082602#M83152</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-09T01:45:40Z</dc:date>
    </item>
  </channel>
</rss>

