Take the 2-minute tour ×

I have an OpenWrt router where I installed knockd:

    logfile = /var/log/knockd.log

    sequence    = 7000,8000,9000
    seq_timeout = 5
    command     = /usr/sbin/iptables -I INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
    tcpflags    = syn

    sequence    = 9000,8000,7000
    seq_timeout = 5
    tcpflags    = syn

and I'm having a notebook with Scientific Linux 6.1 from where I want to knock.. but seems there isn't any "knock" package for SL 6.1..

Where can I get the RPM for the knock binary? (Or are there any alternatives for knock? A perl script maybe?)

share|improve this question
Security by obscurity :D –  Jiri Xichtkniha Jun 17 '12 at 21:25
@JiriXichtkniha, well, it's extra-security measure, so why not. ;-) –  poige Jun 19 '12 at 3:30
So you trust more some perl script based portknocking than openssh which is developted by OpenBSD guys with security in mind? :D Is not great portknocking l33t tool running under root? LOL. –  Jiri Xichtkniha Jun 19 '12 at 9:02
add comment

1 Answer

up vote 2 down vote accepted

This can be done with either bash's /dev/tcp/host/port or netcat.

share|improve this answer
IPA=; nc -z -w 1 $IPA 7000; nc -z -w 1 $IPA 8000; nc -z -w 1 $IPA 9000 –  gasko peter Jun 20 '12 at 11:31
add comment

Your Answer


