IPTables rules and hosts that use DHCP



I have a set of IPTables rules to keep SSH attacks at bay - you
know, to prevent script kiddies from hammering my servers with oodles of
password authentication requests with all sorts of passwords and/or
usernames. Essentially, the rules blacklist hosts that attempt to connect
more than three times within a 30 second time interval. I also have an
IPTables rule that exempts some hosts from such constraints - that is,
SSH connections from such hosts are accepted at any connection rate.

The proble that I have is that one of those hosts uses DHCP, and
its IP address changes with time. I use DynDNS services so that I can use
the same name (let's call it A) for that host, with the guarantee that it
will always resolve to the right IP address. However, I notice that when
I use the name A in my IPTables rule, when checking out the rule with
iptables -L the name actually used is the one assigned to the particular
IP address in use at the time the rule was defined - which is fine until
the host I am interested in changes its IP address.

Is there a way around this? Unfortunately, reconfiguring my SSH
servers so that password authentication is not accepted is not an option.

.



Relevant Pages

  • Re: IPTables rules and hosts that use DHCP
    ... I also have an IPTables rule that exempts some hosts from such constraints - that is, SSH connections from such hosts are accepted at any connection rate. ... reconfiguring my SSH servers so that password authentication is not accepted is not an option. ...
    (comp.os.linux.misc)
  • Re: IPTables rules and hosts that use DHCP
    ... IPTables rule that exempts some hosts from such constraints - that is, ... is that you have to install knock or its 'Doze equivalent on the client ... It's interactive sessions all right, ...
    (comp.os.linux.misc)
  • Re: IPTables rules and hosts that use DHCP
    ... of password authentication requests with all sorts of passwords and/or ... the rules blacklist hosts that attempt to ... have an IPTables rule that exempts some hosts from such constraints - ...
    (comp.os.linux.misc)
  • Re: delay after sshing into a server
    ... those servers don't have this problem. ... try ssh -vv user@wherever to see where the hang is happening. ... debug1: Connecting to aa port 22. ... I then restarted network just to make sure the hosts file ...
    (RedHat)
  • Re: Perl <-> Expect
    ... I dont think the ssh option is always available to everyone. ... servers by default. ... >>I need to telnet some hosts automatically without supplying password. ...
    (perl.beginners)