Skip to content

Commit

Permalink
docs: fix talosctl pcap example indentation
Browse files Browse the repository at this point in the history
Fixes whitespaces in examples.

Signed-off-by: Oscar Utbult <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
oscr authored and smira committed Nov 20, 2023
1 parent de6caf5 commit 0eb245e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions cmd/talosctl/cmd/talos/pcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ var pcapCmd = &cobra.Command{
Default behavior is to decode the packets with internal decoder to stdout:
talosctl pcap -i eth0
talosctl pcap -i eth0
Raw pcap file can be saved with --output flag:
talosctl pcap -i eth0 --output eth0.pcap
talosctl pcap -i eth0 --output eth0.pcap
Output can be piped to tcpdump:
talosctl pcap -i eth0 -o - | tcpdump -vvv -r -
talosctl pcap -i eth0 -o - | tcpdump -vvv -r -
BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels:
BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels:
talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"
talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"
talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"
talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"
As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic,
e.g. by excluding packets with the port 50000.
Expand Down
16 changes: 8 additions & 8 deletions website/content/v1.6/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2421,23 +2421,23 @@ The command launches packet capture on the node and streams back the packets as

Default behavior is to decode the packets with internal decoder to stdout:

talosctl pcap -i eth0
talosctl pcap -i eth0

Raw pcap file can be saved with --output flag:

talosctl pcap -i eth0 --output eth0.pcap
talosctl pcap -i eth0 --output eth0.pcap

Output can be piped to tcpdump:

talosctl pcap -i eth0 -o - | tcpdump -vvv -r -
talosctl pcap -i eth0 -o - | tcpdump -vvv -r -

BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels:
BPF filter can be applied, but it has to compiled to BPF instructions first using tcpdump.
Correct link type should be specified for the tcpdump: EN10MB for Ethernet links and RAW
for e.g. Wireguard tunnels:

talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"
talosctl pcap -i eth0 --bpf-filter "$(tcpdump -dd -y EN10MB 'tcp and dst port 80')"

talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"
talosctl pcap -i kubespan --bpf-filter "$(tcpdump -dd -y RAW 'port 50000')"

As packet capture is transmitted over the network, it is recommended to filter out the Talos API traffic,
e.g. by excluding packets with the port 50000.
Expand Down

0 comments on commit 0eb245e

Please sign in to comment.