Files
tldr/pages.zh/linux/knock.md

20 lines
435 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# knock
> 端口敲击客户端,用于在防火墙上打开特定端口。
> 更多信息:<https://manned.org/knock>。
- 使用不同协议敲击端口:
`knock {{主机名}} {{端口号}}:{{协议}}`
- 使用UDP敲击端口
`knock -u {{主机名}} {{端口号}}`
- 强制使用IPv4/IPv6
`knock {{-4|-6}} {{主机名}} {{端口号}}`
- 显示连接的错误和详细信息:
`knock -v {{主机名}} {{端口号}}`