views:

490

answers:

4

What are the advantages and disadvantages of using knockd vs. using dynamic DNS based authentication for ssh or VPN logins from a dynamic IP address or while travelling (i.e. some random hotel IP)? Ideally, any device with ssh/VPN client capability should be able to use whatever additional client software is necessary.

(The alternative, keeping the ssh / VPN ports open for everyone, isn't very attractive.)

I tend to favor knockd (or other port knocking daemons) because it does not rely on a 3rd party keeping its stuff uncompromised ...

A: 

Well, unless you use DNSSEC, DNS-based authentication is a rather bad idea. DNS is not secure and hotel providers very often munge with DNS.

bortzmeyer
A: 

Myself, I use ssh on a non-standard port, accepting only user logins with key files.

When I ran ssh on port 22, there was a lot of dictionary attacks, but they all used the 'root' user (who was not allowed to log in over ssh anyway).

gnud
+3  A: 

Are you really afraid of keeping your SSH port open? What's going to happen?

You've denied root access, you've installed something like BFD or denyhosts, you only use public key authentication... do you really think that this is not secure?

The addition of something like knockd is, IMHO, likely to introduce a false sense of security.

Mikeage
What's going to happen? Something like the recent Debian OpenSSL/SSH desaster ...
mjy
And knockd puts a nice layer of obscurity on top of it. I understand your concern, but I'd suspect that knockd is less secure (i.e., more likely to have a bug) than openssl; the debian debacle notwithstanding. Layered security is not bad, but you also have to make sure that your remote access method
Mikeage
[cont] allows you to connect on those ports; I've seen hotspots and hotels that block many ports (even including 22, sometimes); what are the odds that your knock won't be possible? Do you know your remote environment well enough to ensure that it will allow what you need?
Mikeage
+1 good point. See comments of http://stackoverflow.com/questions/487737. 9 down, 6 to go (1 per day) – VonC
VonC
A: 

Even if you keep SSH port closed, you could only leave openvpn's port open (and let openssh listen only on a vpn interface).

MatthieuP