forked from MariamSaab/info_command
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ip_info.sh
53 lines (38 loc) · 1.4 KB
/
ip_info.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# разрешить програаме работать через определенный интерфейс
https://unix.stackexchange.com/questions/210982/bind-unix-program-to-specific-network-interface
# metric приоритет
nmcli connection
sudo nmcli connection modify "Wired connection 1" ipv4.route-metric 102
nmcli connection up "Wired connection 1"
nmcli -t -f NAME,DEVICE con
route -n
sudo systemctl restart NetworkManager
# Отключить eth0 навсегда
# https://askubuntu.com/questions/427922/disable-network-permanently
sudo vim /etc/network/interfaces
iface eth0 inet manual
# ping через интерфейс
ping -c1 -I enp0s8 8.8.8.8
ip link | awk -F: '$0 !~ "lo|vir|wl|^[^0-9]"{print $2;getline}'
iw dev | awk '$1=="Interface"{print $2}'
# nmcli
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_nmcli
# найти сетевой интерфейс
lspci -vnnk | grep -i eth
lshw -C network
# network
/etc/init.d/networking restart
# socket: too many open files
ss -s
ss -t -a
ss -t -a | grep CLOSE-WAIT | wc -l
netstat -ao|grep 5000
netstat -ao|grep 7777 | wc -l
netstat -atunp 5000|
lsof -i -a
ls /proc/7285/fd/
sudo systemclt stop daemon_remote_ssh_v2.service
sudo ping -s 1300 -f 192.168.88.1
ping size=1300 interval=0.1 79.174.188.193
# Светалан - омега интернет
89219313709