Hi all, Thank you Dominic and Nick for your help. To answer some quick questions:
*Dominic*: I will switch and install postfix. Thanks for the guidance. Regarding Ubuntu 16 vs 18, the machine is part of a research lab at my school and some software (e.g., for programming robots) require Ubuntu 16. We'll upgrade to Ubuntu 18 as soon as we can. *Nick*: I had sent this email a few seconds after I had posted on AskUbuntu. :) Indeed I have now followed-up on the question, and Terrance's comment seems to have resolved my issue. To all: concretely, at the time I asked my question, I had this as lines 15 through 26 of my `/etc/fail2ban/jail.local` file: 15 # # Provide customizations in a jail.local file or a jail.d/customisation.local. 16 # # For example to change the default bantime for all jails and to enable the 17 # # ssh-iptables jail the following (uncommented) would appear in the .local file. 18 # # See man 5 jail.conf for details. 19 # # 20 # # [DEFAULT] 21 # # bantime = 3600 22 # # 23 # # [sshd] 24 # # enabled = true 25 # # 26 # # See jail.conf(5) man page for more information Indeed the lines are uncommented. So, I changed to: 15 # # Provide customizations in a jail.local file or a jail.d/customisation.local. 16 # # For example to change the default bantime for all jails and to enable the 17 # # ssh-iptables jail the following (uncommented) would appear in the .local file. 18 # # See man 5 jail.conf for details. 19 # # 20 [DEFAULT] 21 bantime = 3600 22 23 [sshd] 24 enabled = true 25 # # 26 # # See jail.conf(5) man page for more information And then it seems to work! I am able to run `sudo service fail2ban start` with no errors. In addition I can see: $ sudo fail2ban-client status Status |- Number of jail: 1 `- Jail list: sshd Presumably, this now means I can stop ssh attacks. To test, I went into another one of my lab machines and repeatedly did an ssh into my machine with bad passwords. On my fifth attempt, I now get "Connection refused". And on my original machine with fail2ban I see: $ sudo fail2ban-client status sshd Status for the jail: sshd |- Filter | |- Currently failed: 1 | |- Total failed: 4 | `- File list: /var/log/auth.log `- Actions |- Currently banned: 1 |- Total banned: 1 `- Banned IP list: [BANNEDIP] Where `[BANNEDIP]` is indeed the IP of the computer I was using to ssh into the one with fail2ban. And I got an email address. :) (In my spam filter but I'll fix that.) So far so good. On Sat, Dec 8, 2018 at 12:33 AM Nick Howitt <[email protected]> wrote: > Hello Daniel, > > Any reason for not following up on askubuntu? > There is a clear error in your jail.local and you were given a couple of > pointers, so what does it contain? Have you tried removing the file to see > if f2b will start? > > Nick > > On 08/12/2018 01:42, Daniel Seita wrote: > > Hi everyone, > > I am new to fail2ban and am trying to get it installed on one of my > systems. My goal is to limit how often others can ssh into the machine with > incorrect passwords. > > I posted my question on AskUbuntu: > > > https://askubuntu.com/questions/1099306/job-for-fail2ban-service-failed-because-the-control-process-exited-with-error > > since I thought it would be easier to visualize/format over there rather > than email, and since this can help others. But, since the GitHub suggests > that this mailing list is better for questions, I am also asking here. > > As shown in my question, I cannot start the service. There is an > interesting error message about the lack of a header in the jail.local > file, but I don't know if that is the issue. > > If you need any more information about my system and setup, I am happy to > provide them. > > Daniel > > > _______________________________________________ > Fail2ban-users mailing > [email protected]https://lists.sourceforge.net/lists/listinfo/fail2ban-users > > > _______________________________________________ > Fail2ban-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fail2ban-users >
_______________________________________________ Fail2ban-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fail2ban-users
