Network#
HTTP#
Command |
Action |
|---|---|
|
GET |
|
HEAD (headers only) |
|
fail-on-error, silent, show errors, follow redirects |
|
POST form |
|
JSON |
|
basic auth |
|
|
|
save to file |
|
save with remote filename |
|
override DNS for one request |
|
timing |
|
skip TLS verify (don’t in prod) |
|
alternative downloader |
|
mirror site |
HTTPie alternative:
$ http GET https://api.example.com/users/1
$ http POST https://api.example.com/users name=operator
$ http -A bearer -a TOKEN GET https://...
DNS#
Command |
Action |
|---|---|
|
use system resolver (recommended) |
|
detailed lookup |
|
just answers |
|
IPv6 |
|
|
|
TXT records |
|
specific server |
|
full delegation trace |
|
reverse DNS |
|
concise lookup |
|
classic |
|
systemd-resolved view |
|
flush |
Sockets and Ports#
Command |
Action |
|---|---|
|
listening TCP/UDP with PID |
|
all TCP |
|
|
|
summary stats |
|
older equivalent |
|
who has the port |
|
|
|
TCP probe |
|
UDP probe |
|
listen |
|
connect (chat) |
Reachability#
Command |
Action |
|---|---|
|
|
|
|
|
|
|
interactive trace + ping |
|
no root needed |
|
SYN probe (root) |
SSH#
Command |
Action |
|---|---|
|
|
|
|
|
|
|
local port forward |
|
remote forward |
|
SOCKS proxy |
|
agent forwarding (use carefully) |
|
|
|
new key |
|
hardware-backed key (FIDO2) |
|
install pubkey |
|
list agent keys |
|
fetch host keys |
Useful ~/.ssh/config:
Host bastion
HostName bastion.example.com
User operator
Host prod-*
ProxyJump bastion
User ops
IdentityFile ~/.ssh/prod_ed25519
ServerAliveInterval 60
File Transfer#
Command |
Action |
|---|---|
|
|
|
|
|
pull |
|
incremental, progress |
|
|
|
explicit ssh |
|
interactive |
TLS / Certificates#
Command |
Action |
|---|---|
|
|
|
|
|
inspect cert |
|
validity dates |
|
|
|
full chain |
|
|
|
script-based TLS audit |
Packet Capture#
Command |
Action |
|---|---|
|
|
|
|
|
|
|
Networking Tools by Distro#
ip(iproute2), modern; preferred overifconfig.ss, modern; preferred overnetstat.nmcli, NetworkManager CLI.iw/iwctl, wireless.firewall-cmd, firewalld (RHEL).ufw, Uncomplicated Firewall (Ubuntu).iptables/nft, low-level firewall rules.