Networking – Is there a tool to limit data usage per day on a specific & essential network interface?

My phone provides an ESSID "MobileHotspot", which I can connect to from Ubuntu.
Now, since the connection is measured, I want to limit the data consumption by DAY (local time) to a certain volume.

Is there a way to limit the daily data quota (not throttle the connection speed)?

Also, can I block download of some programs (not ports)?

Note: Only on this ESSID (aka only when the internet goes on the phone).
Not on other essids.
And the limitation should be made on the Ubuntu machine, not on the Android phone.