Differences
This shows you the differences between two versions of the page.
linux_wiki:nc [2018/02/06 11:39] billdozor [Useful Arguments] |
linux_wiki:nc [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== NC (netcat) ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | nc or netcat "is a feature-packed networking utility which reads and writes data across networks from the command line." | ||
- | |||
- | **Checklist** | ||
- | * Distro(s): Any | ||
- | |||
- | ---- | ||
- | |||
- | ====== Useful Arguments ====== | ||
- | |||
- | **EL6** | ||
- | * -n → do not perform DNS lookups | ||
- | * -u → use UDP instead of default TCP | ||
- | * -v → verbose | ||
- | * -w 3 → wait 3 seconds before timeout of initial connection | ||
- | * -z → Scan only | ||
- | |||
- | |||
- | **EL7** | ||
- | * -n → do not perform DNS lookups | ||
- | * -u → use UDP instead of default TCP | ||
- | * -i → Idle read/write timeout (disconnect after successful connection) | ||
- | * -v → verbose | ||
- | * -w 3 → wait 3 seconds before timeout of initial connection | ||
- | |||
- | ---- | ||
- | |||
- | ====== Examples ====== | ||
- | |||
- | Netcat examples. | ||
- | |||
- | ===== Test Port Reachability ===== | ||
- | |||
- | Test to see if you can open a connection to a port on a remote system.\\ | ||
- | This is useful to see if a firewall has correct rules. | ||
- | |||
- | Example: Check the remote system (192.168.1.1) for an open 443/tcp connection | ||
- | * EL6<code bash>nc -zvw 3 192.168.1.1 443</ | ||
- | * EL7<code bash>nc -i 3 -vw 3 192.168.1.1 443</ | ||
- | |||
- | ---- | ||