diff options
-rw-r--r-- | extensions/libxt_bpf.man | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extensions/libxt_bpf.man b/extensions/libxt_bpf.man index 5b1d0424..302e0103 100644 --- a/extensions/libxt_bpf.man +++ b/extensions/libxt_bpf.man @@ -31,4 +31,17 @@ Or instead, you can invoke the nfbpf_compile utility. .IP iptables \-A OUTPUT \-m bpf \-\-bytecode "`nfbpf_compile RAW 'ip proto 6'`" \-j ACCEPT .PP +Or use tcpdump -ddd. In that case, generate BPF targeting a device with the +same data link type as the xtables match. Iptables passes packets from the +network layer up, without mac layer. Select a device with data link type RAW, +such as a tun device: +.IP +ip tuntap add tun0 mode tun +.br +ip link set tun0 up +.br +tcpdump -ddd -i tun0 ip proto 6 +.PP +See tcpdump -L -i $dev for a list of known data link types for a given device. +.PP You may want to learn more about BPF from FreeBSD's bpf(4) manpage. |