How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?



The closest and fastest way I know is ConfigServer's CSF-LFD but it's not in the repositories and if I'm going to use a utility I would most prefer something in the repositories (it seems I cannot create a Debian/Ubuntu repository for it because of licensing/legal reasons).



Another solution than CSF-LFD is Fail2ban but it seems to me that the Fail2ban configuration requires firm knowledge in IPS software architecture as well as deep knowledge of Perl compatible regex (PCRE), which both I currently lack (I have some basic PCRE knowledge but not as deep as I think one needs for Fail2ban). It doesn't seem straight forward as CSF-LFD to me.



Thus I wonder if there is a "smoother" way, maybe manually via IP tables, maybe via some utility I could install directly from the Debian/Ubuntu repositories that could prevent BFAs besides the issue of using SSH keys.







share|improve this question






















  • Do you mean for SSH specifically or more generally for some other server / any server program?
    – ilkkachu
    Jan 9 at 14:29











  • Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
    – Arcticooling
    Jan 9 at 14:39














up vote
1
down vote

favorite
1












How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?



The closest and fastest way I know is ConfigServer's CSF-LFD but it's not in the repositories and if I'm going to use a utility I would most prefer something in the repositories (it seems I cannot create a Debian/Ubuntu repository for it because of licensing/legal reasons).



Another solution than CSF-LFD is Fail2ban but it seems to me that the Fail2ban configuration requires firm knowledge in IPS software architecture as well as deep knowledge of Perl compatible regex (PCRE), which both I currently lack (I have some basic PCRE knowledge but not as deep as I think one needs for Fail2ban). It doesn't seem straight forward as CSF-LFD to me.



Thus I wonder if there is a "smoother" way, maybe manually via IP tables, maybe via some utility I could install directly from the Debian/Ubuntu repositories that could prevent BFAs besides the issue of using SSH keys.







share|improve this question






















  • Do you mean for SSH specifically or more generally for some other server / any server program?
    – ilkkachu
    Jan 9 at 14:29











  • Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
    – Arcticooling
    Jan 9 at 14:39












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?



The closest and fastest way I know is ConfigServer's CSF-LFD but it's not in the repositories and if I'm going to use a utility I would most prefer something in the repositories (it seems I cannot create a Debian/Ubuntu repository for it because of licensing/legal reasons).



Another solution than CSF-LFD is Fail2ban but it seems to me that the Fail2ban configuration requires firm knowledge in IPS software architecture as well as deep knowledge of Perl compatible regex (PCRE), which both I currently lack (I have some basic PCRE knowledge but not as deep as I think one needs for Fail2ban). It doesn't seem straight forward as CSF-LFD to me.



Thus I wonder if there is a "smoother" way, maybe manually via IP tables, maybe via some utility I could install directly from the Debian/Ubuntu repositories that could prevent BFAs besides the issue of using SSH keys.







share|improve this question














How to prevent Brute force attacks in Debian systems without fail2ban or CSF-LFD?



The closest and fastest way I know is ConfigServer's CSF-LFD but it's not in the repositories and if I'm going to use a utility I would most prefer something in the repositories (it seems I cannot create a Debian/Ubuntu repository for it because of licensing/legal reasons).



Another solution than CSF-LFD is Fail2ban but it seems to me that the Fail2ban configuration requires firm knowledge in IPS software architecture as well as deep knowledge of Perl compatible regex (PCRE), which both I currently lack (I have some basic PCRE knowledge but not as deep as I think one needs for Fail2ban). It doesn't seem straight forward as CSF-LFD to me.



Thus I wonder if there is a "smoother" way, maybe manually via IP tables, maybe via some utility I could install directly from the Debian/Ubuntu repositories that could prevent BFAs besides the issue of using SSH keys.









share|improve this question













share|improve this question




share|improve this question








edited Jan 6 at 22:33

























asked Jan 5 at 2:48









Arcticooling

83123




83123











  • Do you mean for SSH specifically or more generally for some other server / any server program?
    – ilkkachu
    Jan 9 at 14:29











  • Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
    – Arcticooling
    Jan 9 at 14:39
















  • Do you mean for SSH specifically or more generally for some other server / any server program?
    – ilkkachu
    Jan 9 at 14:29











  • Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
    – Arcticooling
    Jan 9 at 14:39















Do you mean for SSH specifically or more generally for some other server / any server program?
– ilkkachu
Jan 9 at 14:29





Do you mean for SSH specifically or more generally for some other server / any server program?
– ilkkachu
Jan 9 at 14:29













Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
– Arcticooling
Jan 9 at 14:39




Good question dear @ilkkachu ! I think I mean only to SSH because my only unfiltered ports are 22, 80, 443, and 9000 (I would happy to have something that blocks BFAs on 80, 443 as well, but for now I'll stay only with 22 which should be good enough, I think).
– Arcticooling
Jan 9 at 14:39










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted
+50










I also didn't like Fail2ban's complexity much, so I looked into alternatives and found Sshguard, which is designed to work without any configuration fiddling.



Contrary to the name, Sshguard can handle more than just SSH brute force attacks; it comes standard with several filters for popular e-mail and FTP packages.



However, like mc0e said, Fail2ban doesn't really require that much setup, is more powerful and supports more daemons, and I think it comes with some SSH rules by default so you shouldn't really have to configure anything, really.



I, too, am partial to ferm as a much friendlier (and more powerful) pre-processing tool for setting up iptables rules, but that's not really directly related to automatically preventing brute force attacks.






share|improve this answer




















  • Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
    – Arcticooling
    Jan 9 at 1:59

















up vote
3
down vote













Fail2ban is a good tool, particularly for ssh logins, and is dead easy to set up for that purpose. I suggest you use it. You won't need to learn a lot of PCRE, as the ssh config you need is there by default.



Don't shy away from learning regex though. Whatever effort you spend there will be richly rewarded for many years to come.



You want a high level tool for specifying firewall rules. I use ferm. There are many others to choose from. Besides port blocking, firewall rules can rate limit connections, which is useful for brute force attack prevention.






share|improve this answer






















    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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f414903%2fhow-to-prevent-brute-force-attacks-in-debian-systems-without-fail2ban-or-csf-lfd%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted
    +50










    I also didn't like Fail2ban's complexity much, so I looked into alternatives and found Sshguard, which is designed to work without any configuration fiddling.



    Contrary to the name, Sshguard can handle more than just SSH brute force attacks; it comes standard with several filters for popular e-mail and FTP packages.



    However, like mc0e said, Fail2ban doesn't really require that much setup, is more powerful and supports more daemons, and I think it comes with some SSH rules by default so you shouldn't really have to configure anything, really.



    I, too, am partial to ferm as a much friendlier (and more powerful) pre-processing tool for setting up iptables rules, but that's not really directly related to automatically preventing brute force attacks.






    share|improve this answer




















    • Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
      – Arcticooling
      Jan 9 at 1:59














    up vote
    1
    down vote



    accepted
    +50










    I also didn't like Fail2ban's complexity much, so I looked into alternatives and found Sshguard, which is designed to work without any configuration fiddling.



    Contrary to the name, Sshguard can handle more than just SSH brute force attacks; it comes standard with several filters for popular e-mail and FTP packages.



    However, like mc0e said, Fail2ban doesn't really require that much setup, is more powerful and supports more daemons, and I think it comes with some SSH rules by default so you shouldn't really have to configure anything, really.



    I, too, am partial to ferm as a much friendlier (and more powerful) pre-processing tool for setting up iptables rules, but that's not really directly related to automatically preventing brute force attacks.






    share|improve this answer




















    • Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
      – Arcticooling
      Jan 9 at 1:59












    up vote
    1
    down vote



    accepted
    +50







    up vote
    1
    down vote



    accepted
    +50




    +50




    I also didn't like Fail2ban's complexity much, so I looked into alternatives and found Sshguard, which is designed to work without any configuration fiddling.



    Contrary to the name, Sshguard can handle more than just SSH brute force attacks; it comes standard with several filters for popular e-mail and FTP packages.



    However, like mc0e said, Fail2ban doesn't really require that much setup, is more powerful and supports more daemons, and I think it comes with some SSH rules by default so you shouldn't really have to configure anything, really.



    I, too, am partial to ferm as a much friendlier (and more powerful) pre-processing tool for setting up iptables rules, but that's not really directly related to automatically preventing brute force attacks.






    share|improve this answer












    I also didn't like Fail2ban's complexity much, so I looked into alternatives and found Sshguard, which is designed to work without any configuration fiddling.



    Contrary to the name, Sshguard can handle more than just SSH brute force attacks; it comes standard with several filters for popular e-mail and FTP packages.



    However, like mc0e said, Fail2ban doesn't really require that much setup, is more powerful and supports more daemons, and I think it comes with some SSH rules by default so you shouldn't really have to configure anything, really.



    I, too, am partial to ferm as a much friendlier (and more powerful) pre-processing tool for setting up iptables rules, but that's not really directly related to automatically preventing brute force attacks.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 8 at 19:33









    sjamaan

    1863




    1863











    • Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
      – Arcticooling
      Jan 9 at 1:59
















    • Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
      – Arcticooling
      Jan 9 at 1:59















    Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
    – Arcticooling
    Jan 9 at 1:59




    Thank you so much for this answer and acquainting me with sshguard. I thumbed up your answer. I strongly suggest editing the answer and cut everything that isn't relevant directly to the question like the last 3th and 4th passages.
    – Arcticooling
    Jan 9 at 1:59












    up vote
    3
    down vote













    Fail2ban is a good tool, particularly for ssh logins, and is dead easy to set up for that purpose. I suggest you use it. You won't need to learn a lot of PCRE, as the ssh config you need is there by default.



    Don't shy away from learning regex though. Whatever effort you spend there will be richly rewarded for many years to come.



    You want a high level tool for specifying firewall rules. I use ferm. There are many others to choose from. Besides port blocking, firewall rules can rate limit connections, which is useful for brute force attack prevention.






    share|improve this answer


























      up vote
      3
      down vote













      Fail2ban is a good tool, particularly for ssh logins, and is dead easy to set up for that purpose. I suggest you use it. You won't need to learn a lot of PCRE, as the ssh config you need is there by default.



      Don't shy away from learning regex though. Whatever effort you spend there will be richly rewarded for many years to come.



      You want a high level tool for specifying firewall rules. I use ferm. There are many others to choose from. Besides port blocking, firewall rules can rate limit connections, which is useful for brute force attack prevention.






      share|improve this answer
























        up vote
        3
        down vote










        up vote
        3
        down vote









        Fail2ban is a good tool, particularly for ssh logins, and is dead easy to set up for that purpose. I suggest you use it. You won't need to learn a lot of PCRE, as the ssh config you need is there by default.



        Don't shy away from learning regex though. Whatever effort you spend there will be richly rewarded for many years to come.



        You want a high level tool for specifying firewall rules. I use ferm. There are many others to choose from. Besides port blocking, firewall rules can rate limit connections, which is useful for brute force attack prevention.






        share|improve this answer














        Fail2ban is a good tool, particularly for ssh logins, and is dead easy to set up for that purpose. I suggest you use it. You won't need to learn a lot of PCRE, as the ssh config you need is there by default.



        Don't shy away from learning regex though. Whatever effort you spend there will be richly rewarded for many years to come.



        You want a high level tool for specifying firewall rules. I use ferm. There are many others to choose from. Besides port blocking, firewall rules can rate limit connections, which is useful for brute force attack prevention.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 5 at 5:47

























        answered Jan 5 at 5:37









        mc0e

        656512




        656512






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414903%2fhow-to-prevent-brute-force-attacks-in-debian-systems-without-fail2ban-or-csf-lfd%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay