Subject: bpf on tun
To: None <current-users@NetBSD.ORG>
From: Roland McGrath <firstname.lastname@example.org>
Date: 03/19/1995 00:34:30
Has anyone used the `tun' interface driver recently?
It appears to work fine (packets I send appear on /dev/tun0 anyway),
but bpf does not seem to work properly on the tun0 interface: tcpdump
does not filter out the packets I ask it to.
To repeat (with "pseudo-device tun" in your kernel config):
# ifconfig tun0 up `hostname` 220.127.116.11
# dd if=/dev/tun0 of=/dev/null & # Keep the device open so net is "up".
# tcpdump -i tun0 not icmp
now do "ping 18.104.22.168" in another job and tcpdump prints the echo request
packets which should have been filtered out by "not icmp".
Using "tcpdump -i ppp0 not icmp" correctly filters out ICMP packets on
that interface, so I think bpf and tcpdump are working in general.