Fail2ban with firewalld The 2019 Stack Overflow Developer Survey Results Are InFirewalld: Reject All DestinationsFail2ban - send email with msmtpFirewalld forwarding between zones not workingBlock ESTABLISHED connections with firewalld/iptablestracking proxied TCP connectionFail2ban: cannot change default chainFail2Ban fails to ban!Fail2Ban fails to start on CentOS 7Block all IPs for SSH/SSHD with iptables/fail2ban or firewalld?Fail2ban Debian 9, freeswitch

Who coined the term "madman theory"?

What did it mean to "align" a radio?

One word riddle: Vowel in the middle

How technical should a Scrum Master be to effectively remove impediments?

Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?

Why is the maximum length of OpenWrt’s root password 8 characters?

Shouldn't "much" here be used instead of "more"?

Is a "Democratic" Oligarchy-Style System Possible?

Is "plugging out" electronic devices an American expression?

Can a flute soloist sit?

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

Are there any other methods to apply to solving simultaneous equations?

Is there a symbol for a right arrow with a square in the middle?

What is the most effective way of iterating a std::vector and why?

Can someone be penalized for an "unlawful" act if no penalty is specified?

Did Section 31 appear in Star Trek: The Next Generation?

A poker game description that does not feel gimmicky

Can one be advised by a professor who is very far away?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

How to type this arrow in math mode?

Apparent duplicates between Haynes service instructions and MOT

What is the meaning of the verb "bear" in this context?

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?



Fail2ban with firewalld



The 2019 Stack Overflow Developer Survey Results Are InFirewalld: Reject All DestinationsFail2ban - send email with msmtpFirewalld forwarding between zones not workingBlock ESTABLISHED connections with firewalld/iptablestracking proxied TCP connectionFail2ban: cannot change default chainFail2Ban fails to ban!Fail2Ban fails to start on CentOS 7Block all IPs for SSH/SSHD with iptables/fail2ban or firewalld?Fail2ban Debian 9, freeswitch



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to configure fail2ban to block ssh from a local hosts. Fail2ban is install on CentOS 7 with firewall (Linux 3.10.0-229.4.2.el7.x86_64 x86_64 ). I have copied the jail.conf to jail.local i have change the following parameters in jail.local:



banaction = firewallcmd-new
[sshd]
enabled = true
maxretry = 5
port = ssh
logpath = /var/log/secure
action = firewallcmd-ipset


And i have no results. Any idea ?



Some log info:



2ban.filter [2489]: INFO Added logfile = /var/log/secure
2015-06-23 07:21:33,439 fail2ban.filter [2489]: INFO Set maxRetry = 3
2015-06-23 07:21:33,440 fail2ban.filter [2489]: INFO Set jail log file encoding to UTF-8
2015-06-23 07:21:33,441 fail2ban.actions [2489]: INFO Set banTime = 86400
2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set findtime = 600
2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set maxlines = 10
2015-06-23 07:21:33,501 fail2ban.server [2489]: INFO Jail sshd is not a JournalFilter instance
2015-06-23 07:21:33,599 fail2ban.jail [2489]: INFO Jail 'sshd' started


And SELinux is disabled.



action.d/firewallcmd-ipset.conf file



[INCLUDES]

before = iptables-common.conf

[Definition]

actionstart = ipset create fail2ban-<name> hash:ip timeout <bantime>
firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>

actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
ipset flush fail2ban-<name>
ipset destroy fail2ban-<name>

actionban = ipset add fail2ban-<name> <ip> timeout <bantime> -exist

actionunban = ipset del fail2ban-<name> <ip> -exist

[Init]

# Option: chain
# Notes specifies the iptables chain to which the fail2ban rules should be
# added
# Values: [ STRING ]
#
chain = INPUT_direct

# Option: bantime
# Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
# Values: [ NUM ] Default: 600

bantime = 600


# DEV NOTES:
#
# Author: Edgar Hoch and Daniel Black
# firewallcmd-new / iptables-ipset-proto6 combined for maximium goodness









share|improve this question






























    1















    I'm trying to configure fail2ban to block ssh from a local hosts. Fail2ban is install on CentOS 7 with firewall (Linux 3.10.0-229.4.2.el7.x86_64 x86_64 ). I have copied the jail.conf to jail.local i have change the following parameters in jail.local:



    banaction = firewallcmd-new
    [sshd]
    enabled = true
    maxretry = 5
    port = ssh
    logpath = /var/log/secure
    action = firewallcmd-ipset


    And i have no results. Any idea ?



    Some log info:



    2ban.filter [2489]: INFO Added logfile = /var/log/secure
    2015-06-23 07:21:33,439 fail2ban.filter [2489]: INFO Set maxRetry = 3
    2015-06-23 07:21:33,440 fail2ban.filter [2489]: INFO Set jail log file encoding to UTF-8
    2015-06-23 07:21:33,441 fail2ban.actions [2489]: INFO Set banTime = 86400
    2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set findtime = 600
    2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set maxlines = 10
    2015-06-23 07:21:33,501 fail2ban.server [2489]: INFO Jail sshd is not a JournalFilter instance
    2015-06-23 07:21:33,599 fail2ban.jail [2489]: INFO Jail 'sshd' started


    And SELinux is disabled.



    action.d/firewallcmd-ipset.conf file



    [INCLUDES]

    before = iptables-common.conf

    [Definition]

    actionstart = ipset create fail2ban-<name> hash:ip timeout <bantime>
    firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>

    actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
    ipset flush fail2ban-<name>
    ipset destroy fail2ban-<name>

    actionban = ipset add fail2ban-<name> <ip> timeout <bantime> -exist

    actionunban = ipset del fail2ban-<name> <ip> -exist

    [Init]

    # Option: chain
    # Notes specifies the iptables chain to which the fail2ban rules should be
    # added
    # Values: [ STRING ]
    #
    chain = INPUT_direct

    # Option: bantime
    # Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
    # Values: [ NUM ] Default: 600

    bantime = 600


    # DEV NOTES:
    #
    # Author: Edgar Hoch and Daniel Black
    # firewallcmd-new / iptables-ipset-proto6 combined for maximium goodness









    share|improve this question


























      1












      1








      1








      I'm trying to configure fail2ban to block ssh from a local hosts. Fail2ban is install on CentOS 7 with firewall (Linux 3.10.0-229.4.2.el7.x86_64 x86_64 ). I have copied the jail.conf to jail.local i have change the following parameters in jail.local:



      banaction = firewallcmd-new
      [sshd]
      enabled = true
      maxretry = 5
      port = ssh
      logpath = /var/log/secure
      action = firewallcmd-ipset


      And i have no results. Any idea ?



      Some log info:



      2ban.filter [2489]: INFO Added logfile = /var/log/secure
      2015-06-23 07:21:33,439 fail2ban.filter [2489]: INFO Set maxRetry = 3
      2015-06-23 07:21:33,440 fail2ban.filter [2489]: INFO Set jail log file encoding to UTF-8
      2015-06-23 07:21:33,441 fail2ban.actions [2489]: INFO Set banTime = 86400
      2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set findtime = 600
      2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set maxlines = 10
      2015-06-23 07:21:33,501 fail2ban.server [2489]: INFO Jail sshd is not a JournalFilter instance
      2015-06-23 07:21:33,599 fail2ban.jail [2489]: INFO Jail 'sshd' started


      And SELinux is disabled.



      action.d/firewallcmd-ipset.conf file



      [INCLUDES]

      before = iptables-common.conf

      [Definition]

      actionstart = ipset create fail2ban-<name> hash:ip timeout <bantime>
      firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>

      actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
      ipset flush fail2ban-<name>
      ipset destroy fail2ban-<name>

      actionban = ipset add fail2ban-<name> <ip> timeout <bantime> -exist

      actionunban = ipset del fail2ban-<name> <ip> -exist

      [Init]

      # Option: chain
      # Notes specifies the iptables chain to which the fail2ban rules should be
      # added
      # Values: [ STRING ]
      #
      chain = INPUT_direct

      # Option: bantime
      # Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
      # Values: [ NUM ] Default: 600

      bantime = 600


      # DEV NOTES:
      #
      # Author: Edgar Hoch and Daniel Black
      # firewallcmd-new / iptables-ipset-proto6 combined for maximium goodness









      share|improve this question
















      I'm trying to configure fail2ban to block ssh from a local hosts. Fail2ban is install on CentOS 7 with firewall (Linux 3.10.0-229.4.2.el7.x86_64 x86_64 ). I have copied the jail.conf to jail.local i have change the following parameters in jail.local:



      banaction = firewallcmd-new
      [sshd]
      enabled = true
      maxretry = 5
      port = ssh
      logpath = /var/log/secure
      action = firewallcmd-ipset


      And i have no results. Any idea ?



      Some log info:



      2ban.filter [2489]: INFO Added logfile = /var/log/secure
      2015-06-23 07:21:33,439 fail2ban.filter [2489]: INFO Set maxRetry = 3
      2015-06-23 07:21:33,440 fail2ban.filter [2489]: INFO Set jail log file encoding to UTF-8
      2015-06-23 07:21:33,441 fail2ban.actions [2489]: INFO Set banTime = 86400
      2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set findtime = 600
      2015-06-23 07:21:33,442 fail2ban.filter [2489]: INFO Set maxlines = 10
      2015-06-23 07:21:33,501 fail2ban.server [2489]: INFO Jail sshd is not a JournalFilter instance
      2015-06-23 07:21:33,599 fail2ban.jail [2489]: INFO Jail 'sshd' started


      And SELinux is disabled.



      action.d/firewallcmd-ipset.conf file



      [INCLUDES]

      before = iptables-common.conf

      [Definition]

      actionstart = ipset create fail2ban-<name> hash:ip timeout <bantime>
      firewall-cmd --direct --add-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>

      actionstop = firewall-cmd --direct --remove-rule ipv4 filter <chain> 0 -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
      ipset flush fail2ban-<name>
      ipset destroy fail2ban-<name>

      actionban = ipset add fail2ban-<name> <ip> timeout <bantime> -exist

      actionunban = ipset del fail2ban-<name> <ip> -exist

      [Init]

      # Option: chain
      # Notes specifies the iptables chain to which the fail2ban rules should be
      # added
      # Values: [ STRING ]
      #
      chain = INPUT_direct

      # Option: bantime
      # Notes: specifies the bantime in seconds (handled internally rather than by fail2ban)
      # Values: [ NUM ] Default: 600

      bantime = 600


      # DEV NOTES:
      #
      # Author: Edgar Hoch and Daniel Black
      # firewallcmd-new / iptables-ipset-proto6 combined for maximium goodness






      ssh firewalld fail2ban






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 29 '15 at 22:59







      user3523605

















      asked Jun 24 '15 at 11:51









      user3523605user3523605

      1241314




      1241314




















          1 Answer
          1






          active

          oldest

          votes


















          0














          I'm guessing here a bit because I don't have enough info to know what's going on. But I would try something like this:



          fail2ban-regex --print-all-missed /var/log/secure /etc/fail2ban/filter.d/sshd.conf


          to see if it finds something or what lines it might be missing. I'm assuming /var/log/secure is where sshd is printing out it's login failures. It's /var/log/auth.log on my debian based system.



          Also I have a bantime and findtime in my jail.local



          bantime = 86400
          findtime = 86400


          Maybe you are not getting anything because you haven't told it the window of time to look in?






          share|improve this answer























          • Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

            – user3523605
            Jun 25 '15 at 23:22











          • Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

            – Michael Grant
            Jun 26 '15 at 1:28











          • In the sshd.conf file i was not able to find ipset command ...

            – user3523605
            Jun 27 '15 at 17:28











          • No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

            – Michael Grant
            Jun 28 '15 at 20:19












          • I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

            – user3523605
            Jun 29 '15 at 23:00











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f211812%2ffail2ban-with-firewalld%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I'm guessing here a bit because I don't have enough info to know what's going on. But I would try something like this:



          fail2ban-regex --print-all-missed /var/log/secure /etc/fail2ban/filter.d/sshd.conf


          to see if it finds something or what lines it might be missing. I'm assuming /var/log/secure is where sshd is printing out it's login failures. It's /var/log/auth.log on my debian based system.



          Also I have a bantime and findtime in my jail.local



          bantime = 86400
          findtime = 86400


          Maybe you are not getting anything because you haven't told it the window of time to look in?






          share|improve this answer























          • Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

            – user3523605
            Jun 25 '15 at 23:22











          • Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

            – Michael Grant
            Jun 26 '15 at 1:28











          • In the sshd.conf file i was not able to find ipset command ...

            – user3523605
            Jun 27 '15 at 17:28











          • No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

            – Michael Grant
            Jun 28 '15 at 20:19












          • I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

            – user3523605
            Jun 29 '15 at 23:00















          0














          I'm guessing here a bit because I don't have enough info to know what's going on. But I would try something like this:



          fail2ban-regex --print-all-missed /var/log/secure /etc/fail2ban/filter.d/sshd.conf


          to see if it finds something or what lines it might be missing. I'm assuming /var/log/secure is where sshd is printing out it's login failures. It's /var/log/auth.log on my debian based system.



          Also I have a bantime and findtime in my jail.local



          bantime = 86400
          findtime = 86400


          Maybe you are not getting anything because you haven't told it the window of time to look in?






          share|improve this answer























          • Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

            – user3523605
            Jun 25 '15 at 23:22











          • Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

            – Michael Grant
            Jun 26 '15 at 1:28











          • In the sshd.conf file i was not able to find ipset command ...

            – user3523605
            Jun 27 '15 at 17:28











          • No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

            – Michael Grant
            Jun 28 '15 at 20:19












          • I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

            – user3523605
            Jun 29 '15 at 23:00













          0












          0








          0







          I'm guessing here a bit because I don't have enough info to know what's going on. But I would try something like this:



          fail2ban-regex --print-all-missed /var/log/secure /etc/fail2ban/filter.d/sshd.conf


          to see if it finds something or what lines it might be missing. I'm assuming /var/log/secure is where sshd is printing out it's login failures. It's /var/log/auth.log on my debian based system.



          Also I have a bantime and findtime in my jail.local



          bantime = 86400
          findtime = 86400


          Maybe you are not getting anything because you haven't told it the window of time to look in?






          share|improve this answer













          I'm guessing here a bit because I don't have enough info to know what's going on. But I would try something like this:



          fail2ban-regex --print-all-missed /var/log/secure /etc/fail2ban/filter.d/sshd.conf


          to see if it finds something or what lines it might be missing. I'm assuming /var/log/secure is where sshd is printing out it's login failures. It's /var/log/auth.log on my debian based system.



          Also I have a bantime and findtime in my jail.local



          bantime = 86400
          findtime = 86400


          Maybe you are not getting anything because you haven't told it the window of time to look in?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 24 '15 at 22:19









          Michael GrantMichael Grant

          34413




          34413












          • Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

            – user3523605
            Jun 25 '15 at 23:22











          • Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

            – Michael Grant
            Jun 26 '15 at 1:28











          • In the sshd.conf file i was not able to find ipset command ...

            – user3523605
            Jun 27 '15 at 17:28











          • No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

            – Michael Grant
            Jun 28 '15 at 20:19












          • I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

            – user3523605
            Jun 29 '15 at 23:00

















          • Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

            – user3523605
            Jun 25 '15 at 23:22











          • Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

            – Michael Grant
            Jun 26 '15 at 1:28











          • In the sshd.conf file i was not able to find ipset command ...

            – user3523605
            Jun 27 '15 at 17:28











          • No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

            – Michael Grant
            Jun 28 '15 at 20:19












          • I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

            – user3523605
            Jun 29 '15 at 23:00
















          Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

          – user3523605
          Jun 25 '15 at 23:22





          Hi Michael thanks for answer, from "fail2ban-regex --print-all-missed" i have the following output when i test ssh access (Jun 25 19:19:26 localhost sshd[3143]: Connection closed by 172.16.45.1 [preauth]) but there is no action from the firewall to block this ip address. I'm testing this on virtual machine with 172.x.x.x. ip. This virtual machine is on my laptop with 192.168.0.x ip using the VMware i have install the fial2ban on centos with 172.xxxx ip.

          – user3523605
          Jun 25 '15 at 23:22













          Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

          – Michael Grant
          Jun 26 '15 at 1:28





          Are there other lines that the filter.d/sshd.conf finds, maybe it's not finding enough lines to ban (6)? Is it able to find ipset command?

          – Michael Grant
          Jun 26 '15 at 1:28













          In the sshd.conf file i was not able to find ipset command ...

          – user3523605
          Jun 27 '15 at 17:28





          In the sshd.conf file i was not able to find ipset command ...

          – user3523605
          Jun 27 '15 at 17:28













          No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

          – Michael Grant
          Jun 28 '15 at 20:19






          No, sorry, that's confusing. Look at your action that you stated above, you have "action = firewallcmd-ipset". This action uses the file named "action.d/firewallcmd-ipset.conf" (relative to your fail2ban conf directory). This conf file uses the ipset command to tweak the firewall. Is fail2ban able to execute the ipset command? Can you execute it from the command line? Is there anything in the fail2ban log file that might give a clue as to why it's not doing anything?

          – Michael Grant
          Jun 28 '15 at 20:19














          I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

          – user3523605
          Jun 29 '15 at 23:00





          I have edit the question with the context of the file firewallcmd-ipset.conf ... im not quite sure what command to execute and what to change.

          – user3523605
          Jun 29 '15 at 23:00

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f211812%2ffail2ban-with-firewalld%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

          Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

          Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.