Files
cheatsheet-tldr/tldr/linux/knock
2025-04-20 00:20:58 +00:00

26 lines
560 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# knock
> Port knocking client to open specific ports on firewall.
> More information: <https://manned.org/knock>.
- Knock on ports using different protocols:
`knock {{hostname}} {{portnumber}}:{{protocol}}`
- Knock on port using UDP:
`knock {{[-u|--udp]}} {{hostname}} {{portnumber}}`
- Force usage of IPv4/IPv6:
`knock {{-4|-6}} {{hostname}} {{portnumber}}`
- Display errors and details of connection:
`knock {{[-v|--verbose]}} {{hostname}} {{portnumber}}`