How to read all traffic received on one network interface using Erlang

Papa Tana papa.tana101@REDACTED
Tue Aug 11 17:42:25 CEST 2020

> Well, you could write to named pipe and read it on the other side of that
> pipe, alternatively you can use socat and write to the UNIX socket. This
> will allow you to run tcpdump as a privileged user without making Erlang
> running as one.
To make a direct pipe, I'm getting from 'tcpdump' and 'replay' on the other
side like below:

# tcdump -i eth0 -w -'..... | tcpreplay -i eth1 - ....

But with this, the traffic is just replayed and I watch passively.

When you say 'read it on the other side', are you talking about piping to
Erlang? If yes, How to do that please?

> You can however "hack it around" by using CAP_NET_RAW (if you run on
> Linux), either manually or via init system of your choice (ex. in systemd
> ).
 *systemd *
Really appreciated, I will check them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list