|_&&']['20/22.#4[x3/2.|*#!1050|*#`/. gnu/linux; *nix. c 1 9 being redirected to /dev/null. issues to null@altair.uni.cx. *alt*.serving./at/.`{altair,algol,antares,arcturus,aldebaran,spica,ceti,vega,fomalhaut,rigel,sirius}./dot/.uni./dot/.cx'. ---- this blog still exists only for historical evidence (to my embarrassment). some of the non-laughable "articles" can be read at altair.uni.cx/growl/. :wq.

Wednesday, February 18, 2009

.knockd.

## (to) knock; knockd. however, that `d' comes from `daemon'.

% echo -e 'e.g.,\n'

% iptables -L -n
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- foo.bar.qux.def 0.0.0.0/0 tcp dpt:22
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22

% cat /etc/knockd.conf
[openSSH]
sequence = foobar,def,plugh,fred,xyzzy,thud
seq_timeout = 5
command = /sbin/iptables -I INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
tcpflags = syn

[closeSSH]
sequence = thud,def,fred,foobar,xyzzy,plugh
seq_timeout = 5
command = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
tcpflags = syn

% knock -v foo.bar.qux.quux foobar def plugh fred xyzzy thud

% echo 'however, knocks can be sent via netcat, hping, packit, etc.'

% echo 'open_port command executed @foo.bar.qux.def.'
% echo 'do sleep 16; while job_done; done...'

% knock -v foo.bar.qux.quux thud def fred foobar xyzzy plugh

% echo 'close_port command now executed @specific.host. all set. w00t!'

n.b.
#01. {def,foobar,fred,plugh,thud,xyzzy} == (tcp || udp) ports.
#02. use as many as you want... anyway, 3 should be just fine (read as `secure').
 .
..:

7 comments:

Anonymous said...

Oi. Start writing. Can't leave your blog dead and Identica frozen. Reach out and choke someone.

haha said...

心靈補手。休憩園地 ROM 兩性生活討論區 品味生活討論區 女人女人。玩美論壇 孤獨之詩★文學藝術論壇 cute99!可愛女人幫 Z頻道*戶外休閒論壇 亞特蘭提斯。ACG論壇 風流人生*男仕論壇 清境生活綜合討論區 左岸咖啡休閒網 168休閒館 流星花園生活情報網 Nt.Sec潮流網 歡樂天堂生活網 可愛女人家 男人味論壇 秋萍文學網 小丸子娛樂休閒網 夢想家休閒論壇 花花世界論壇 天上人間生活網 浪琴女人天地 伊勒生活網 潘妮女性休閒網 巴莎咪卡生活網 快樂媽媽討論區 ~斑鳩的家~休閒論壇 追夢人生休閒論壇 輝煌年代★創意生活網 日月星休閒網 雄霸天下☆休閒論壇 ⊕鳶尾花⊕生活休閒網 朵莉流行網 ☆星宿海☆生活秘笈網 e日茶休憩小站 麥克家族討論區 巴黎夢想家 幻想倉庫網 55888男性休閒論壇 永富人生網 酷炫潮流網 愛情派對交流網 微風頻道~居家討論區 訊息倉庫番 396生活資訊網 嘮嘮叨叨分享論壇 模範世家~生活休閒網 圓桌武士生活交流網 G頻道~數位論壇 易富網~財富論壇 858女性生活網 e時代新潮文化網 紫之海~葡萄網 伊達生活趣味網 樂活島生活休閒論壇 ☆殘酷天使☆生活論壇 奧雷特⊕活力補給站 永恆的優雅☆女性時尚論壇 硬漢人生★男士風格網 殺很大~生活休閒網 地球世界村文化交流網 關鍵報告~生活交流網 斷翼天使☆夢想交流網 HomeZ!網路交流網 科技時尚男性論壇 台灣新人類~生活論壇 長恨歌◇文學分享論壇 101女性風尚論壇 領導者商務生活網

Anonymous said...
This comment has been removed by a blog administrator.
rtfgvb7833 said...

IS VERY GOOD..............................

masaj erotic said...

Felicitari in primul rand pentru blog,este o munca depusa eficient,in al doilea rand pentru minunatele postari...mi se pare foarte interesant. succes si sa munciti cu cel putin acelasi simt de raspundere pe viitor

adirau said...

wtf jula, ti-au raspuns chinezii si curvele. fii atent (re, knockd): http://ingles.homeunix.net/software/ost/ noi fol. ostiary ptr ssh

Seth Williams said...

This tutorial on knockd was really informative Ionut. Thanks a lot for sharing it with us. We make some Python tutorials as well that may benefit your readers at https://www.linkedin.com/company/firebox-training

; about::fdd.

My Photo
twin peaks, 42 milky way, sol system, earth, United States
-----BEGIN GEEK CODE BLOCK----- GCS/E/IT/L/M/MU/P/S/TW/ dpu s:- a-- C++++(+++) UBHLSV++++ P---(P-) L+++++ E++(+++) W+++ N++++ o+++ K++++++ w O+ M-- V-- PS+++ PE/++ Y+++ PGP++++ t+++/* 5++>++++ X++++ R++@ !tv b++++ DI+++@ D++(+++) G+++++ e* h+>++ !r y**. ma+ k++ F3 X+++ ------END GEEK CODE BLOCK------

; blog.archive.

; labels.

Creative Commons Licence [Some Rights Reserved]Ionuț Jula :: licensed for reuse under this Creative Commons Licence.
                            Some rights reserved. | Creative Commons Attribution-Share Alike 3.0 Unported License.
 .
..: