knockd 敲敲门,开后门

[撰文/hmy]

如果你直接在一个联网的机器上开一个类似 21 这样不安全的端口,是不是感觉很不安心呢?用 knockd 可以解决这个问题。

简单说来就是暗号敲门。按你设定好的顺序连续敲一系列端口,服务器那边就会执行一个你定义的脚本,比如开放 ftp 服务器。按另一个顺序敲门,就可以把 ftp 服务器关闭。

enjoy!

knock 项目主页:http://www.zeroflux.org/cgi-bin/cvstrac.cgi/knock/wiki(需翻墙访问)

Read More:

  • » No related posts

17 Comments

  1. 1 matri Commented @ 2008-08-16 20:16Reply to this comment

    哦,这个实在是很有趣的东西。

  2. 2 hmy Commented @ 2008-08-16 20:16Reply to this comment

    debian和ubuntu都自带,其他系统不清楚

  3. 3 rainy Commented @ 2008-08-16 20:20Reply to this comment

    @hmy

    Archlinux官方仓库和Gentoo Portage也有。

  4. 4 shellex Commented @ 2008-08-16 20:51Reply to this comment

    呃。。。。

  5. 5 xiws Commented @ 2008-08-16 21:07Reply to this comment

    有趣。。不错。。

  6. 6 希罗 Commented @ 2008-08-16 21:15Reply to this comment

    So Cool!

  7. 7 proguru Commented @ 2008-08-16 22:45Reply to this comment

    帅呆了,好注意!

  8. 8 Proguru Commented @ 2008-08-16 22:46Reply to this comment

    帅呆了!

  9. 9 test Commented @ 2008-08-17 7:26Reply to this comment

    要是别人成天敲你门试验怎么办? 有没有这样的,服务器定时pop3收取某个信箱的的某个地址的来信,然后根据里边的密令打开某个端口上的ssh, 这样比较安全吧。

  10. 10 hmy Commented @ 2008-08-17 8:00Reply to this comment

    通过邮件的方法自己都可以用脚本实行,简单.但是同时把25端口给暴露了. 没有绝对的安全,只能是说增加一些难度. 另外ssh用证书加密,禁止口令登录,已经是足够安全了. knockd可以把敲门序列弄的复杂一些,并且增加一个时间限制,比如在2s之内完成下面的敲门 9/tcp , 6000/udp , 200/tcp, 2/udp ,1023/udp

  11. 11 tangooricha Commented @ 2008-08-17 11:37Reply to this comment

    改进型的守护进程?

  12. 12 Noxide Commented @ 2008-08-17 11:58Reply to this comment

    有趣的东东

  13. 13 fcicq Commented @ 2008-08-17 23:16Reply to this comment

    shimmer 好像更强大一些. http://shimmer.sourceforge.net/

  14. 14 bones7456 Commented @ 2008-08-18 9:34Reply to this comment

    其实不要是弱密码的话,开着21也无所谓啦~~~

  15. 15 自由天堂 Commented @ 2008-08-19 1:58Reply to this comment

    为什么不直接用ssh,还可以有公钥支持,既安全又方便

  16. 16 Tony Zhou Commented @ 2008-08-19 4:30Reply to this comment

    这样的设置和密码貌似没有什么区别, 还是注意密码的安全性和FTP协议的安全性比较可靠. FTP协议的FTPS/TLS和FTPS/SSL是很安全的, 因为密码及FTP命令都是加密的, 只需注意密码的选择就好了. 如果对安全有更高的要求, 注意使用server cert和client cert来验证, 并且对TLS加密层选择AES256 cipher就极可靠安全了. sftp/ssh和系统命令绑定过紧, 常用的cipher强度较弱, 反而没这么安全.

  17. 17 sunny Commented @ 2008-08-25 12:53Reply to this comment

    有点意思,呵呵,适合黑客……