mirror of https://github.com/fail2ban/fail2ban
Revert "ENH: by default enable a single jail -- sshd"
This reverts commit 47a62b6072
.
Enabling any jail by default should be a prerogative of particular
distributions (thanks Fabian Wenk for the discussion)
Conflicts:
config/jail.conf
pull/185/head
parent
1d72a8265d
commit
62602a9ed0
|
@ -72,9 +72,8 @@ usedns = warn
|
||||||
logencoding = auto
|
logencoding = auto
|
||||||
|
|
||||||
# "enabled" enables the jails.
|
# "enabled" enables the jails.
|
||||||
# By default all (but sshd) jails are disabled.
|
# By default all jails are disabled, and it should stay this way.
|
||||||
# It is unlikely that the default value should ever be changed.
|
# Enable only relevant to your setup jails in your .local or jail.d/*.conf
|
||||||
# Enable only relevant to your setup jails in your .local or jail.d/*.conf
|
|
||||||
#
|
#
|
||||||
# true: jail will be enabled and log files will get monitored for changes
|
# true: jail will be enabled and log files will get monitored for changes
|
||||||
# false: jail is not enabled
|
# false: jail is not enabled
|
||||||
|
@ -149,7 +148,6 @@ action = %(action_)s
|
||||||
|
|
||||||
[sshd]
|
[sshd]
|
||||||
|
|
||||||
enabled = true
|
|
||||||
port = ssh
|
port = ssh
|
||||||
logpath = /var/log/auth.log
|
logpath = /var/log/auth.log
|
||||||
/var/log/sshd.log
|
/var/log/sshd.log
|
||||||
|
|
|
@ -141,7 +141,7 @@ class JailReaderTest(unittest.TestCase):
|
||||||
jail = JailReader('sshd', basedir=CONFIG_DIR) # we are running tests from root project dir atm
|
jail = JailReader('sshd', basedir=CONFIG_DIR) # we are running tests from root project dir atm
|
||||||
self.assertTrue(jail.read())
|
self.assertTrue(jail.read())
|
||||||
self.assertTrue(jail.getOptions())
|
self.assertTrue(jail.getOptions())
|
||||||
self.assertTrue(jail.isEnabled())
|
self.assertFalse(jail.isEnabled())
|
||||||
self.assertEqual(jail.getName(), 'sshd')
|
self.assertEqual(jail.getName(), 'sshd')
|
||||||
|
|
||||||
def testSplitOption(self):
|
def testSplitOption(self):
|
||||||
|
@ -207,12 +207,7 @@ class JailsReaderTest(unittest.TestCase):
|
||||||
comm_commands = jails.convert()
|
comm_commands = jails.convert()
|
||||||
# by default None of the jails is enabled and we get no
|
# by default None of the jails is enabled and we get no
|
||||||
# commands to communicate to the server
|
# commands to communicate to the server
|
||||||
#self.assertEqual(comm_commands, [])
|
self.assertEqual(comm_commands, [])
|
||||||
# by default now we have sshd jail enabled (only)
|
|
||||||
# so the list of commands should start with
|
|
||||||
self.assertEqual(comm_commands[0], ['add', 'sshd', 'auto'])
|
|
||||||
# and end with
|
|
||||||
self.assertEqual(comm_commands[-1], ['start', 'sshd'])
|
|
||||||
|
|
||||||
allFilters = set()
|
allFilters = set()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue