Re:Port knocking
by polishdude20 on Thursday May 14, 2020 @10:51PM
(#23188328)
So with poet knocking, if I only have an ssh port open and a couple of ports my servers server content on like an http and https server, I'm assuming id use port knocking to get inside my ssh port right? I don't need to do port knocking for my http and https ports because they're open but not as an ssh service?
Yes, that's right - you'd leave your public services open by default and the knock would simply open up tcp22 ...
Re:Port knocking
by TedDoesntTalk on Thursday May 14, 2020 @10:57PM
(#23188370)
> So with poet knocking
Knocking a poet is bound to get you into trouble. Poets fight back, and hard. Just don't do it.
Re:Port knocking
by polishdude20 on Friday May 15, 2020 @11:05AM
(#23192997)
But they're just so damn eloquent all the time. It drives me nuts.
The command that gets run when the (correct) knock comes in is an ipfw command:
... so now the knocking IP can see TCP 22 and 443 (and nothing else).I then have a cron job that runs every night at midnight that deletes those rules:
... so I am required to knock daily.The following is a little lame, but I want to see who has knocked so far today (should just be me and my own IPs) so I do this every minute:
... and then cat that list to myself every time I log in ...