1
October
2024
17:40

Determination of processes that go on the Internet

1 October 2024 17:40

Noticed in netstat -a that the Internet connection from background processes. Then he found and deleted the package that went on the Internet.

List of processes that are connected to the Internet

Classical Netstat program:

netstat -tpn -W

or

netstat -tun -W

or

netstat -tUn -W

Where
p - отображение названия программы
t - TCP
u - UDP
n - отображение цифровых (numerIC) IP addresses instead of nodes
U - UDP lite
W - вывод информации в широком формате (Wide)

SS program - extended information:

ss -4 -e

or

ss -6 -e

or

ss -u -e

Where:
-4 (псевдоним -f inet) - выводить класс подключений Internet по протоколу IPv4
-6 (псевдоним -f inet6 - выводить класс подключений Internet по протоколу IPv6
-u - выводить UDP
-n - номера портов цифровые вместо буквенных (например, 67 вместо bootp)
-e - выводить расширенную информацию.

Определение имени пакета по названию процесса

Для программ контекста пользователя (user) часто можно определить название пакета по имени.

Поиск пакета по имени

Поиск пакета с помощью dpkg по шаблону

dpkg -l 'package_namE*'

Where
package_namE - Package name

The program will display the status of the package II - the package is installed, RP is deleted, the configuration file is left.

Removing a package by name (without deleting configuration files)

sudo dpkg -r 'package_namE '

CUTION REMOVE A PACKET NAME, with removal of configuration files

sudo dpkg -P 'package_namE '

Where
'package_namE 'is the exact name of the package.


Источник: ru.Linux-Console.net



Related publications