当前位置: 首页 > news >正文

Linux机器网络检查

查看DNS file:

dian@TestLRSSnapshot:~$ cat /etc/resolv.conf

# This file is managed by man:systemd-resolved(8). Do not edit.

#

# This is a dynamic resolv.conf file for connecting local clients to the

# internal DNS stub resolver of systemd-resolved. This file lists all

# configured search domains.

#

# Run "systemd-resolve --status" to see details about the uplink DNS servers

# currently in use.

#

# Third party programs must not access this file directly, but only through the

# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

# replace this symlink by a static file or a different symlink.

#

# See man:systemd-resolved.service(8) for details about the supported modes of

# operation for /etc/resolv.conf.

nameserver 127.0.0.53

options edns0

search 4baqgnrc2zverab0oks4co0vjd.ix.internal.cloudapp.net

用Nping测试连接

需要先下载nmap:

sudo apt install nmap

Nping

dian@TestLRSSnapshot:~$ nping login.microsoftonline.com -p 443

Starting Nping 0.7.60 ( Nping — Network packet generation tool & ping utility ) at 2023-07-05 04:19 UTC

SENT (0.0050s) Starting TCP Handshake > login.microsoftonline.com:443 (20.190.148.164:443)

RCVD (0.0725s) Handshake with login.microsoftonline.com:443 (20.190.148.164:443) completed

SENT (1.0078s) Starting TCP Handshake > login.microsoftonline.com:443 (20.190.148.164:443)

RCVD (1.0742s) Handshake with login.microsoftonline.com:443 (20.190.148.164:443) completed

SENT (2.0104s) Starting TCP Handshake > login.microsoftonline.com:443 (20.190.148.164:443)

RCVD (2.0769s) Handshake with login.microsoftonline.com:443 (20.190.148.164:443) completed

SENT (3.0131s) Starting TCP Handshake > login.microsoftonline.com:443 (20.190.148.164:443)

RCVD (3.0797s) Handshake with login.microsoftonline.com:443 (20.190.148.164:443) completed

SENT (4.0159s) Starting TCP Handshake > login.microsoftonline.com:443 (20.190.148.164:443)

RCVD (4.0822s) Handshake with login.microsoftonline.com:443 (20.190.148.164:443) completed

Max rtt: 67.511ms | Min rtt: 66.360ms | Avg rtt: 66.668ms

TCP connection attempts: 5 | Successful connections: 5 | Failed: 0 (0.00%)

Nping done: 1 IP address pinged in 4.08 seconds

dian@TestLRSSnapshot:~$

Route table in Linux

netstat -rn

dian@TestLRSSnapshot:~$ netstat -rn

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

0.0.0.0         10.2.0.1        0.0.0.0         UG        0 0          0 eth0

10.2.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0

168.63.129.16   10.2.0.1        255.255.255.255 UGH       0 0          0 eth0

169.254.169.254 10.2.0.1        255.255.255.255 UGH       0 0          0 eth0

dian@TestLRSSnapshot:~$

Listening port:

-n -> numeric value (do not resolve service names).

-t -> TCP sockets.

-u -> UDP sockets.

-p -> Processes.

-l -> Listening

dian@TestLRSSnapshot:~$ netstat -ntplu

(Not all processes could be identified, non-owned process info

 will not be shown, you would have to be root to see it all.)

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -

tcp        0      0 0.0.0.0:25324           0.0.0.0:*               LISTEN      -

tcp6       0      0 :::22                   :::*                    LISTEN      -

udp        0      0 127.0.0.53:53           0.0.0.0:*                           -

udp        0      0 10.2.0.4:68             0.0.0.0:*                           -

udp        0      0 127.0.0.1:25224         0.0.0.0:*                           -

TCP traceroute

Need to install it firstly: sudo apt install traceroute

dian@TestLRSSnapshot:~$ sudo traceroute -T 40.126.16.166

traceroute to 40.126.16.166 (40.126.16.166), 30 hops max, 60 byte packets

 1  * * *

 2  * * *

 3  * * *

 4  * * *

 5  * * *

 6  * * *

 7  * * *

 8  * * *

 9  * * *

10  * * *

11  * * *

12  * * *

13  * * *

14  * * *

15  * * *

16  * * *

17  * * *

18  * * *

19  * * *

20  * * *

21  * * *

22  * * *

23  40.126.16.166 (40.126.16.166)  65.304 ms *  65.508 ms

NC测连接

dian@TestLRSSnapshot:~$ nc -zv 40.126.16.166 443

Connection to 40.126.16.166 443 port [tcp/https] succeeded!

http://www.lryc.cn/news/212888.html

相关文章:

  • 使用示例和应用程序全面了解高效数据管理的Golang MySQL数据库
  • ubuntu 22.04 源码安装 apollo 8.0
  • RK3588编译MXNet框架
  • 港府Web3宣言周年思考:合规困境中的“隐患”
  • vue点击按钮跳转页面
  • 大中小企业对CRM系统的需求
  • .net core iis 发布后登入的时候请求不到方法报错502
  • 知识图谱实战应用30-知识图谱在反欺诈情报分析项目中的应用实践
  • [云原生1. ] 使用Docker-compose一键部署Wordpress平台
  • springboot--基本特性--自定义 Banner
  • Vue3:checkbox使用及限制选中数量
  • ​如何选择更快更稳定的存储服务器​
  • AcWing89. a^b
  • 【推荐系统】推荐算法:冷启动-召回-粗排-精排-重排 解读
  • NB-IOT的粮库挡粮门异动监测装置
  • 六、【图像去水印】
  • 电子电器架构 —— 车载网关初入门(二)
  • AT32固件库外设使用,ArduinoAPI接口移植,模块化
  • 【Postgres】Postgres常用命令
  • pthread 读写锁使用详解
  • MySQL扩展语句
  • 阿里云号码认证服务(一键登录)在连接wifi的情况下部分机型下存在的问题
  • 电脑屏幕监控软件,能够帮助企业完成哪些事情?
  • java--方法的其他形式
  • IDEA配置类、方法注释模板
  • PowerDesigner 16数据库(mysql)逆向生成pdm
  • Spring Cloud 之Feign
  • 通用开源自动化测试框架 - Robot Framework
  • css position属性与js滚动
  • python内置模块hashlib对于字符串的加密解密加盐