I'm using raspberry Pis with raspbian lite for a project that requires them to be out in the streets with a 4G dongle to get internet access. As you can imagine, I want to keep the device's data consumption the lowest possible and doing some research plus some practical experiments (ifconfig data traffic measures) I've found that raspbian alone has around 243 KiB/hr of Rx data and 58 KiB/hr of Tx data. Which is kind of a lot given that i'm sure none of that is being used for my project.

Does anybody have an idea of what the OS is using that data for, and how can I decrease it? I've thought about putting the interface down and only bringing it up when I absolutely need it ( ifconfig "interface" down and ifconfig "interface" up), would that be a good idea?

  • 2
    The brute force/manual way to find out is to run tcpdump on the Pi and capture all of the traffic to a file and then use a tool like wireshark to review the traffic.
    – Craig
    Jan 9, 2019 at 19:56

2 Answers 2


Perhaps a simpler option to try first before having to sniff traffic like other users have suggested: try using a firewall like ufw (apt install). Then block off all incoming and outgoing connections.

sudo ufw default deny incoming & sudo ufw default deny outgoing

Then allow only the ports you need, maybe ssh sudo ufw allow ssh or a web server etc. Refer to the man page here for more options.


For my feeling 243/58 KiB/hr RX/TX is not very much for an online network connection. There are some protocols to keep it online, for example "keep alives" or routing informations. On Raspbian IPv4 and IPv6 are both enabled so it may also double the connection informations. It may also depend on your provider what it sends to get the connection up.

You can look with tcpdump exactly what protocols and data is going to the uplink. Then you can decide what you really need and suppress unneeded traffic with rules for iptables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.