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

Posted October 29, 2014 4.3k 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

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