> For the complete documentation index, see [llms.txt](https://kashz.gitbook.io/kashz-jewels/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kashz.gitbook.io/kashz-jewels/tricks/port-knocking.md).

# port knocking

## info

```bash
# service name
/usr/sbin/knockd

# config file
/etc/knockd.conf
```

## port knock

```bash
# knock tool
knock DOMAIN|IP PORT1 PORT2 PORT3 ...

# script
$ for i in PORT1 PORT2 PORT3; do
for> nmap -Pn --host-timeout 100 --max-retries 0 -p $i IP >/dev/null
for> done;
```
