mirror of https://github.com/fail2ban/fail2ban
BF: adjusted for new IP of example.com
parent
4bd929ffa8
commit
9deafe6355
|
@ -1,2 +1,2 @@
|
||||||
Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2
|
Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2
|
||||||
Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.119 port 51332 ssh2
|
Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.34 port 51332 ssh2
|
||||||
|
|
|
@ -717,12 +717,12 @@ class GetFailures(unittest.TestCase):
|
||||||
|
|
||||||
def testGetFailuresUseDNS(self):
|
def testGetFailuresUseDNS(self):
|
||||||
# We should still catch failures with usedns = no ;-)
|
# We should still catch failures with usedns = no ;-)
|
||||||
output_yes = ('93.184.216.119', 2, 1124013539.0,
|
output_yes = ('93.184.216.34', 2, 1124013539.0,
|
||||||
['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2\n',
|
['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2\n',
|
||||||
'Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.119 port 51332 ssh2\n'])
|
'Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.34 port 51332 ssh2\n'])
|
||||||
|
|
||||||
output_no = ('93.184.216.119', 1, 1124013539.0,
|
output_no = ('93.184.216.34', 1, 1124013539.0,
|
||||||
['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.119 port 51332 ssh2\n'])
|
['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.216.34 port 51332 ssh2\n'])
|
||||||
|
|
||||||
# Actually no exception would be raised -- it will be just set to 'no'
|
# Actually no exception would be raised -- it will be just set to 'no'
|
||||||
#self.assertRaises(ValueError,
|
#self.assertRaises(ValueError,
|
||||||
|
@ -769,9 +769,9 @@ class DNSUtilsTests(unittest.TestCase):
|
||||||
res = DNSUtils.textToIp('www.example.com', 'no')
|
res = DNSUtils.textToIp('www.example.com', 'no')
|
||||||
self.assertEqual(res, [])
|
self.assertEqual(res, [])
|
||||||
res = DNSUtils.textToIp('www.example.com', 'warn')
|
res = DNSUtils.textToIp('www.example.com', 'warn')
|
||||||
self.assertEqual(res, ['93.184.216.119'])
|
self.assertEqual(res, ['93.184.216.34'])
|
||||||
res = DNSUtils.textToIp('www.example.com', 'yes')
|
res = DNSUtils.textToIp('www.example.com', 'yes')
|
||||||
self.assertEqual(res, ['93.184.216.119'])
|
self.assertEqual(res, ['93.184.216.34'])
|
||||||
|
|
||||||
def testTextToIp(self):
|
def testTextToIp(self):
|
||||||
# Test hostnames
|
# Test hostnames
|
||||||
|
@ -783,7 +783,7 @@ class DNSUtilsTests(unittest.TestCase):
|
||||||
for s in hostnames:
|
for s in hostnames:
|
||||||
res = DNSUtils.textToIp(s, 'yes')
|
res = DNSUtils.textToIp(s, 'yes')
|
||||||
if s == 'www.example.com':
|
if s == 'www.example.com':
|
||||||
self.assertEqual(res, ['93.184.216.119'])
|
self.assertEqual(res, ['93.184.216.34'])
|
||||||
else:
|
else:
|
||||||
self.assertEqual(res, [])
|
self.assertEqual(res, [])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue