How to config PORT KNOCKING on CSF and access it by linux?

October 29, 2014 1.6k views

I'm trying to run port knocking work on a CSF on a small VPS, i setup this:

1 - the result of csf first test ok

2 -

TCPIN = "53,80"
OUT = "53,80,113,443"
UDPIN = "53"
OUT = "53,113,123"
PORTKNOCKING = "3000;TCP;30;1000;1001;1002;1003" //dummy ports
3 - after csf -r

4 - after restarted the vps

5 - tryed to use knockd on pc to knock the server

knock -v 1000 1001 1002 1003 //dummy ip
6 - and less than 20 seconds use

ssh myuser@ -p 3000 //dummy ip
but cant connect, i never did it before, like a printf("HelloWorld"); for me. If someone could help me i will be really glad.

More info, my sshd_config:

PORT 3000
PermitRootLogin no
StrictModes yes
AllowUsers myuser

1 Answer

I hate asking, but did you save your firewall rule changes?

Have another answer? Share your knowledge.