You are not logged in.
Hello, everyone.
I installed Arch with Cinnamon desktop. For the Internet connection I use my Android phone in usb-modem mode.
After booting I constantly see in my gnome-system-monitor something like this:
https://i.ibb.co/rsWftWY/2022-05-25-21-49-37-r.png
It means that 48 kib of data has been received and 26 kib of data has been sent. My goal is to find out what is that data. I found a command named "tcpdump" from so-called package that shows all incoming and outgoing internet packets. Then I wrote a python script that saves the output of that command to a file and made it to be started by systemd.
/etc/systemd/system/inet-log.service :
[Service]
ExecStart=/home/username/inet-log
[Install]
WantedBy=multi-user.target
/home/username/inet-log :
#!/bin/python
import subprocess, time
p = subprocess.Popen('tcpdump', shell=True, text=True, encoding='utf-8', stdout=subprocess.PIPE)
with open('/home/username/inet-log.txt', 'w') as f:
for line in p.stdout:
f.write(line)
$ sudo chmod +x /home/username/inet-log
$ sudo systemctl enable inet-log
The output:
/home/username/inet-log.txt
As you can see, there are some real ip's like 172.67.17.175, 104.20.26.217, 185.125.188.54, 185.125.188.58, 185.125.188.60 and a real url "redirect.archlinux.org".
What are those and how can I disable that data sending?
Maybe anyone know how to see what process does that requests?
p.s. sorry for my english
Mod Edit - Replaced oversized image with link.
CoC - Pasting pictures and code
Last edited by busy beaver (2022-05-25 17:36:38)
Offline
Do you use NetworkManager to control your networking?
If so then the archlinux.org URL is probably just the online check that it makes to verify if you are connected to the internet.
https://github.com/archlinux/svntogit-p … BUILD#L124
Offline
@Slithery Thanks for replay. Yes I do use NetworkManager. But https://ping.archlinux.org/nm-check.txt is a lot smaller than 48 kib. And what about that ip's?
Offline
Did you look up the IP's? They all either belong to Cloudflare or Canonical.
What services and applications are you starting when you boot the system?
Offline
$ systemctl list-unit-files | grep enabled
var-lib-snapd-snap-code-96.mount enabled disabled
var-lib-snapd-snap-code-97.mount enabled disabled
var-lib-snapd-snap-core-12834.mount enabled disabled
var-lib-snapd-snap-core-13250.mount enabled disabled
getty@.service enabled enabled
inet-log.service enabled disabled
lightdm.service enabled disabled
NetworkManager-dispatcher.service enabled disabled
NetworkManager-wait-online.service enabled disabled
NetworkManager.service enabled disabled
snapd.service enabled disabled
systemd-boot-update.service disabled enabled
systemd-fsck-root.service enabled-runtime disabled
systemd-homed.service disabled enabled
systemd-network-generator.service disabled enabled
systemd-networkd.service disabled enabled
systemd-pstore.service disabled enabled
systemd-remount-fs.service enabled-runtime disabled
systemd-resolved.service enabled enabled
systemd-timesyncd.service disabled enabled
windscribe.service enabled disabled
snapd.socket enabled disabled
systemd-userdbd.socket disabled enabled
machines.target disabled enabled
reboot.target disabled enabled
remote-cryptsetup.target disabled enabled
remote-fs.target enabled enabled
pamac-cleancache.timer enabled disabled
Offline
So it's very likely snap
Offline
I tried disabling snapd and the amount of received data slightly decreased, but it's not completely gone. So there is some other apps that use the Internet.
Last edited by busy beaver (2022-05-25 18:18:51)
Offline
Windscribe is probably using some data. Is it configured to automatically connect to a VPN?
Offline
Two useful tools:
1. sudo bandwhich
2. sudo lsof -i
Offline
I disabled all snap-related services and windscribe. Now it's sending around 7 kib and receiving around 6 kib.
$ systemctl list-unit-files | grep enabled
getty@.service enabled enabled
inet-log.service enabled disabled
lightdm.service enabled disabled
NetworkManager-dispatcher.service enabled disabled
NetworkManager-wait-online.service enabled disabled
NetworkManager.service enabled disabled
systemd-boot-update.service disabled enabled
systemd-fsck-root.service enabled-runtime disabled
systemd-homed.service disabled enabled
systemd-network-generator.service disabled enabled
systemd-networkd.service disabled enabled
systemd-pstore.service disabled enabled
systemd-remount-fs.service enabled-runtime disabled
systemd-resolved.service enabled enabled
systemd-timesyncd.service disabled enabled
systemd-userdbd.socket disabled enabled
machines.target disabled enabled
reboot.target disabled enabled
remote-cryptsetup.target disabled enabled
remote-fs.target enabled enabled
pamac-cleancache.timer enabled disabled
Offline
@tucuxi thanks but it it seems to be impossible to see the output of that commands while booting.
Offline
I'd guess about 1 kib is recieved as part of the tls handshake (the certificate). maybe more if ocsp is queried as well.
I suggest you also try to boot to multi-user.target and skip the GUI to check if that is creating some connections as well.
Last edited by progandy (2022-05-25 19:05:05)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I found out that it still sends and receives some data after boot. And I can see it in terminal with "sudo tcpdump" and in system monitor. But somehow it's not logged by my script (which uses the same command). When after that I open browser, my script continues to work. My be this is related to users? I don't know.
Offline
@progandy boot to multi-user.target? What does that mean?
Offline
@tucuxi thanks but it it seems to be impossible to see the output of that commands while booting.
Sure, but the gnome-system-monitor screenshot suggests that you see the same traffic pattern when you are in the graphical environment. Or did you capture it from a different machine?
Offline
@progandy boot to multi-user.target? What does that mean?
You add systemd.unit=multi-user.target to your kernel commandline, then your system will only boot to a console / terminal and the GUI (login manager/display manager, desktop environment, ...) does not start.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
busy beaver wrote:@tucuxi thanks but it it seems to be impossible to see the output of that commands while booting.
Sure, but the gnome-system-monitor screenshot suggests that you see the same traffic pattern when you are in the graphical environment. Or did you capture it from a different machine?
Yes, I am in GUI. But gnome system monitor shows the amount of data received and sent since boot (or since some demon start). And your commands show only currently transmitting data.
Last edited by busy beaver (2022-05-25 19:37:14)
Offline
busy beaver wrote:@progandy boot to multi-user.target? What does that mean?
You add systemd.unit=multi-user.target to your kernel commandline, then your system will only boot to a console / terminal and the GUI (login manager/display manager, desktop environment, ...) does not start.
I booted to the lightdm, then pressed ctrl+alt+f2 and went to the tty. Then I checked my log file, and it's empty! So that means that all that data sending happens after logging into GUI. I also tried selecting i3 in the lightdm menu instead of cinnamon, but it made no difference from the cinnamon. Is that enough or shall I still boot to multi-user.target?
Offline
I booted to the lightdm, then pressed ctrl+alt+f2 and went to the tty. Then I checked my log file, and it's empty! So that means that all that data sending happens after logging into GUI. I also tried selecting i3 in the lightdm menu instead of cinnamon, but it made no difference from the cinnamon. Is that enough or shall I still boot to multi-user.target?
That is enough.
Edit: Is your internet connection up when you are not logged in? If not, then nothing can be send before that.
Last edited by progandy (2022-05-25 19:41:05)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Edit: Is your internet connection up when you are not logged in? If not, then nothing can be send before that.
Yes. Pacman works.
Offline
I booted to multi-user.target, log still empty. Does that mean that this is cinnamon-related problem? Then why using i3 makes no difference?
Offline
No it means it's a GUI-related problem. There's something you are running in both cinnamon and i3 that is sending data. Or perhaps it's the display manager itself - sending data over a network would be an absurd thing for a DM to do, but most of what DMs do is absurd.
Last edited by Trilby (2022-05-25 19:54:07)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Now it depends on e.g. your user session startup. I have no idea what is common between i3 and cinnamon. Maybe you set up some autostart scripts in i3 that start the same as cinnamon, maybe something is in the systemd --user session that is only startet in a graphical environment, ...
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Since it's not the boot you could also https://wiki.archlinux.org/title/Wireshark the system from the console before logging in.
Offline
Sorry for misinformation. The log is not empty even in the multi-user.target. It is empty just for a couple of seconds. Then requests begin. The same works in i3.
Offline