I want to use tcpprobe to record the state of a TCP connections but I cannot find tcpprobe in /proc/net. Is tcpprobe not present by default?
tcpprobe
- 277
3 Answers
You have to load the kernel module tcp_probe with the command:
sudo modprobe tcp_probe
If you don't do this, the file doesn't exist.
- 33,815
If loading it with modprobe still does not work for you (as it didn't for me with Ubuntu 18.4.4 LTS using Kernel 5.3.0-59-generic), you should know that at some point, tcpprobe was removed from the kernel. Check out this answer.
tcp_probe functionality has been removed from the kernel. I believe, but am not certain, that its removal and the associated removal of some of the required infrastructure got out of sync. I am saying that even though the module is still present for
/lib/modules/4.15.0-55-generic/kernel/net/ipv4/tcp_probe.ko, it doesn't work.
It is included. When you follow the referenced procedure the /proc/net/tcppdump gets created (checked Ubuntu 14.04.4 LTS, Ubuntu 15.10):
$ ls -l /proc/net/tcppdump
ls: cannot access /proc/self/net/tcppdump: No such file or directory
$ sudo modprobe tcp_probe port=5001
$ ls -l /proc/net/tcpprobe
-r-------- 1 root root 0 Apr 17 02:29 /proc/net/tcpprobe
$
- 3,316