You are not logged in.

#1 2022-05-25 17:31:31

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

What data does arch send and recive by the Internet after booting?

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

#2 2022-05-25 17:37:31

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: What data does arch send and recive by the Internet after booting?

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


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-05-25 17:41:38

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

@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

#4 2022-05-25 17:56:07

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: What data does arch send and recive by the Internet after booting?

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?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2022-05-25 18:12:08

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

$ 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

https://i.ibb.co/C6ywMSk/2022-05-25-23-11-07.png

Offline

#6 2022-05-25 18:14:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,351

Re: What data does arch send and recive by the Internet after booting?

So it's very likely snap

Offline

#7 2022-05-25 18:17:08

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

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

#8 2022-05-25 18:38:07

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: What data does arch send and recive by the Internet after booting?

Windscribe is probably using some data. Is it configured to automatically connect to a VPN?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2022-05-25 18:53:14

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: What data does arch send and recive by the Internet after booting?

Two useful tools:

1. sudo bandwhich
2. sudo lsof -i

Offline

#10 2022-05-25 18:53:43

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

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

Log: https://disk.yandex.ru/d/e8p9LF4u5Z9Bsg

Offline

#11 2022-05-25 19:00:27

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

@tucuxi thanks but it it seems  to be impossible to see the output of that commands while booting.

Offline

#12 2022-05-25 19:01:57

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: What data does arch send and recive by the Internet after booting?

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

#13 2022-05-25 19:08:49

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

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

#14 2022-05-25 19:09:22

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

@progandy boot to multi-user.target? What does that mean?

Offline

#15 2022-05-25 19:10:25

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: What data does arch send and recive by the Internet after booting?

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?

Offline

#16 2022-05-25 19:15:35

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: What data does arch send and recive by the Internet after booting?

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.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#17 2022-05-25 19:29:03

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

tucuxi wrote:
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

#18 2022-05-25 19:36:52

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

progandy wrote:
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

#19 2022-05-25 19:39:40

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: What data does arch send and recive by the Internet after booting?

busy beaver wrote:

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

#20 2022-05-25 19:48:01

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

progandy wrote:

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

#21 2022-05-25 19:48:35

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

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

#22 2022-05-25 19:52:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: What data does arch send and recive by the Internet after booting?

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

#23 2022-05-25 19:54:03

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: What data does arch send and recive by the Internet after booting?

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

#24 2022-05-25 19:57:09

seth
Member
Registered: 2012-09-03
Posts: 60,896

Re: What data does arch send and recive by the Internet after booting?

Since it's not the boot you could also https://wiki.archlinux.org/title/Wireshark the system from the console before logging in.

Offline

#25 2022-05-25 20:07:17

busy beaver
Member
From: Russia
Registered: 2022-05-25
Posts: 29

Re: What data does arch send and recive by the Internet after booting?

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

Board footer

Powered by FluxBB