Managing and monitoring network activity is essential for maintaining control over your system's traffic. With the darkstat package, combined with just a couple of commands, you can easily keep track of what's happening on your network. Additionally, you can clean your browser at startup to prevent unwanted connections. Below is a step-by-step guide to setting this up.
First, you need to install darkstat and a couple of other useful packages to monitor network traffic:
sudo apt install darkstat net-tools iftop
Once installed, you can monitor your network using these simple commands:
lsof
:
watch -n 2 lsof -i -P -n
This command runs every 2 seconds, displaying a list of active network connections in real-time.
iftop
:
iftop
This provides a visual display of network bandwidth usage, showing the IP addresses and transfer rates.
Darkstat requires some configuration to suit your network. Open the Darkstat configuration file at /etc/darkstat/init.cfg
and adjust the following settings:
# /etc/darkstat/init.cfg
INTERFACE="-i enp4s0"
DIR="/var/lib/darkstat"
PORT="-p 666"
BINDIP="-b 0.0.0.0"
DAYLOG="--daylog darkstat.log"
enp4s0
with the name of your network interface (check it using ip addr
).Once configured, start Darkstat using:
sudo service darkstat start
You can now access network statistics by navigating to http://localhost:666
in your browser.
To prevent Firefox from making automatic connections and improve privacy, follow this guide from Mozilla Support. It provides steps to stop Firefox from initiating background connections, which can be especially useful when you want full control over your network traffic.
By using darkstat and simple monitoring commands like lsof
and iftop
, you can easily keep track of your network activity in real-time. Combined with cleaning your browser at startup, this setup ensures you maintain full control over your system’s connections and traffic.
```