3 ms·
Port knocking is stupid. The only possible real reason anyone should have for actually using it is if they really don’t want their logs to be flooded with the
by teddyh 7y ago
Port knocking is stupid. The only possible real reason anyone should have for actually using it is if they really don’t want their logs to be flooded with the normal internet attacks. Logs which the SSH daemon really shouldn’t (by default) be creating in the first place, since what’s the use? It’s like having a weather station on your roof which always says “it’s raining”, since you live on the ocean floor. It’s the internet, SSH will be attacked; there’s (by default) no purpose to logging this.
For actual security, though, it’s also woefully inadequate:
1. It adds very little security. How many bits are in a “secret knock”?
2. The security it does add is bad: It’s sent in cleartext, and easily brute-forced.
3. It complicates access, since it’s non-standard.
- blauditore 7y agoI agree with 1. and 3., but not 2.: It's basically like a password where ports are your alphabet. Assuming you use most of the 2^16 ports, and a typical text password is based on an alphabet of ~70 characters, each knocking step is roughly equivalent to log_70(2^16) ≃ 2.61 traditional password characters. For example, 5 steps of knocking already entail (2^16)^5 ≃ 1.2*10^24 steps to check. With 1000 attempts per second, that still means trying > 10^13 years until all combinations have been tried.
- teddyh 7y agoI’m unconvinced that most people use such complicated knocking schemes to contain that many bits. It’s still trivially sniffed, since it’s sent in the clear. And it’s hard to change, since you have to change all the places which needs it.