Azathoth wrote:
No, the IP must be resolved as valid before sshd or any higher level protocol (higher than TCP three-way connection handshake) would log invalid attempts and thus reach fail2ban.
Then again YOU yourself could lock yourself out rather easily if you're not careful and have very strict banning rules.

Thanks for the quick reply and info! Maybe I'm not understanding it correctly, but the entries above are from my Linode in iptables and the log file, so wouldn't that mean the request is successfully getting through?
It seems like the attacker could alter whatever is being used to produce a log entry as follows:
Code:
Nov 27 12:07:54 ex sshd[29759]: reverse mapping checking getaddrinfo for anywhere [31.210.109.31] failed - POSSIBLE BREAK-IN ATTEMPT!
Nov 27 12:07:54 ex sshd[29759]: User root from 31.210.109.31 not allowed because not listed in AllowUsers
Nov 27 12:07:54 ex sshd[29760]: input_userauth_request: invalid user root
Nov 27 12:07:54 ex sshd[29760]: Received disconnect from 31.210.109.31: 11: Bye Bye
Assuming Fail2ban behaves as expected, it would produce an iptables entry as follows:
Code:
pkts bytes target prot opt in out source destination
18 1180 DROP all -- any any anywhere anywhere
Which would effectively block SSH access from everywhere, correct?