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

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 -

TCP_IN = “53,80” TCP_OUT = “53,80,113,443” UDP_IN = “53” UDP_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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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