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
    command     = /usr/sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
    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?)

  • Security by obscurity :D – jirib 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. – jirib Jun 19 '12 at 9:02

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.