{"id":16387,"date":"2023-11-15T20:04:48","date_gmt":"2023-11-15T12:04:48","guid":{"rendered":"https:\/\/www.linuxcool.com\/psypmllqrnfy"},"modified":"2023-11-15T20:04:48","modified_gmt":"2023-11-15T12:04:48","slug":"psypmllqrnfy","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/psypmllqrnfy","title":{"rendered":"ping\u4f7f\u7528ping\u547d\u4ee4\u6765\u786e\u8ba4\u80fd\u5426\u4e0e\u7f51\u5173\u901a\u4fe1\uff1a\u80fdping\u901a"},"content":{"rendered":"<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>route<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>route<a style='color:#0000CC;font-size:16px' href='https:\/\/www.linuxcool.com\/' target='_blank' rel=\"noopener\">\u547d\u4ee4<\/a>\u53ef\u4ee5\u67e5\u770b\u5f53\u524d<a style='color:#0000CC;font-size:16px' href='https:\/\/www.linuxdown.com\/' target='_blank' rel=\"noopener\">\u7cfb\u7edf<\/a>\u7684\u8def\u7531\u8868\u4fe1\u606f<strong>linux \u67e5\u770b\u7f51\u7edc \u547d\u4ee4<\/strong>\uff0c\u5305\u62ec\u9ed8\u8ba4\u7f51\u6bb5\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# route -n\nKernel IP routing table\nDestination Gateway Genmask Flags Metric Ref Use Iface\n0.0.0.0 192.10.23.2 0.0.0.0 UG 100 0 0 ens33\n192.10.12.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0\n192.10.23.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>route\u540e\u7684-n\u9009\u9879\u4e0d\u4f1a\u5c1d\u8bd5\u5c06\u8fd9\u79cdIP\u5730\u5740\u89e3\u6790\u6210\u4e3b\u673a\u540d,\u5217\u4e3e\u901f\u7387\u4f1a\u6bd4route\u5feb\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>ping<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4f7f\u7528ping\u547d\u4ee4\u6765\u786e\u8ba4\u80fd\u591f\u4e0e\u7f51\u6bb5\u901a\u8baf\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# ping -c 5 10.12.13.1 \nPING 10.1.1.1 (10.1.1.1) 56(84) bytes of data. \n64 bytes from 10.12.13.1: icmp_seq=1 ttl=64 time=3.13 ms \n64 bytes from 10.12.13.1: icmp_seq=2 ttl=64 time=1.43 ms \n64 bytes from 10.12.13.1: icmp_seq=3 ttl=64 time=1.79 ms \n64 bytes from 10.12.13.1: icmp_seq=5 ttl=64 time=1.50 ms --- 10.1.1.1 ping statistics --- 5 packets transmitted, 4 received, 20% packet loss, time 4020ms rtt min\/avg\/max\/mdev = 1.436\/1.966\/3.132\/0.686 ms\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u80fdping\u901a\u8bf4\u660e\u672c\u673a\u548c10.12.13.1\u7f51\u8def\u662f\u901a\u7684\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4e5f\u53ef\u4ee5ping\u57df\u540d\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# ping -c 4 www.baidu.com\nPING www.a.shifen.com (110.242.68.4) 56(84) bytes of data.\n64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=1 ttl=128 time=9.89 ms\n64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=2 ttl=128 time=10.4 ms\n64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=3 ttl=128 time=10.3 ms\n64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=4 ttl=128 time=10.4 ms\n--- www.a.shifen.com ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3005ms\nrtt min\/avg\/max\/mdev = 9.899\/10.284\/10.471\/0.253 ms\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>dig<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>Dig\u662f\u4e00\u4e2a\u5728\u7c7bUnix\u547d\u4ee4\u884c\u6a21\u5f0f\u4e0b\u67e5\u8be2DNS\u5305\u62ecNS\u8bb0\u5f55\uff0cA\u8bb0\u5f55\uff0cMX\u8bb0\u5f55\u7b49\u76f8\u5173\u4fe1\u606f\u7684\u5de5\u5177\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># dig www.baidu.com\n; &lt;&gt; DiG 9.11.4-P2-RedHat-9.11.4-9.P2.el7 &lt;&gt; www.baidu.com\n;; global options: +cmd\n;; Got answer:\n;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 23430\n;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0\n;; QUESTION SECTION:\n;www.baidu.com. IN A\n;; ANSWER SECTION:\nwww.baidu.com. 706 IN CNAME www.a.shifen.com.\nwww.a.shifen.com. 110 IN A 110.242.68.4\nwww.a.shifen.com. 110 IN A 110.242.68.3\n;; Query time: 3 msec\n;; SERVER: 202.106.0.20#53(202.106.0.20)\n;; WHEN: Sat Jan 22 10:18:55 CST 2022\n;; MSG SIZE rcvd: 90\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>nslookup<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>nslookup\u7528\u4e8e\u67e5\u8be2DNS\u7684\u8bb0\u5f55\uff0c\u67e5\u8be2\u57df\u540d\u89e3\u6790\u662f\u5426\u6b63\u5e38\uff0c\u5728\u7f51\u8def\u6545\u969c\u65f6\u62ff\u6765\u786e\u8bca\u7f51\u8def\u95ee\u9898\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# nslookup www.baidu.com\nServer: 202.106.0.20\nAddress: 202.106.0.20#53\nNon-authoritative answer:\nwww.baidu.com canonical name = www.a.shifen.com.\nName: www.a.shifen.com\nAddress: 110.242.68.4\nName: www.a.shifen.com\nAddress: 110.242.68.3\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>traceroute<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u901a\u8fc7traceroute\u6211\u4eec\u53ef\u4ee5\u6653\u5f97\u4fe1\u606f\u4ece\u4f60\u7684\u8ba1\u7b97\u673a\u5230\u4e92\u8054\u7f51\u53e6\u4e00\u7aef\u7684\u4e3b\u673a\u662f\u8d70\u7684\u54ea\u4e9b\u8def\u5f84\u3002\u5176\u5b9e\u6bcf\u6b21\u6570\u636e\u5305\u7531\u67d0\u4e00\u540c\u6837\u7684\u51fa\u53d1\u70b9\uff08source\uff09\u62b5\u8fbe\u67d0\u4e00\u540c\u6837\u7684\u76ee\u7684\u5730(destination)\u8d70\u7684\u8def\u5f84\u53ef\u80fd\u4f1a\u4e0d\u4e00\u6837\uff0c\u4f46\u57fa\u672c\u4e0a\u6765\u8bf4\u5927\u90e8\u4efd\u65f6\u4faf\u6240\u8d70\u7684\u8def\u7531\u662f\u76f8\u540c\u7684\u3002linux\u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u79f0\u4e4b\u4e3atraceroute,\u5728MSWindows\u4e2d\u4e3atracert\u3002traceroute\u901a\u8fc7\u53d1\u9001\u5c0f\u7684\u6570\u636e\u5305\u5230\u76ee\u7684\u8bbe\u5907\u76f4\u81f3\u5176\u8fd4\u56de\uff0c\u6765\u68c0\u6d4b\u5176\u987b\u8981\u591a\u957f\u65f6\u95f4\u3002\u4e00\u6761\u8def\u5f84\u4e0a\u7684\u6bcf\u4f4d\u8bbe\u5907traceroute\u8981\u6d4b3\u6b21\u3002\u8f93\u51fa\u7ed3\u679c\u4e2d\u5305\u62ec\u6bcf\u6b21\u6d4b\u8bd5\u7684\u65f6\u95f4(ms)\u548c\u8bbe\u5907\u7684\u540d\u79f0\uff08\u5982\u6709\u7684\u8bdd\uff09\u53ca\u5176IP\u5730\u5740\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u4f1a\u5728linux\u4e3b\u673a\u7cfb\u7edf\u4e0blinux\u4e0b\u8f7d\uff0c\u76f4\u63a5\u6267\u884c\u547d\u4ee4\u884c\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>traceroutehostname<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><img style='max-height:500px;max-width:80%;margin: 10px auto' src='https:\/\/www.linuxcool.com\/wp-content\/uploads\/2023\/11\/1700049887213_0.jpg' alt='linux \u67e5\u770b\u7f51\u7edc \u547d\u4ee4_\u547d\u4ee4\u67e5\u770b\u7f51\u7edc\u4fe1\u606f_\u547d\u4ee4\u67e5\u770b\u7f51\u7edc\u914d\u7f6e' \/><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u800c\u5728Windows\u7cfb\u7edf\u4e0b\u662f\u6267\u884ctracert\u7684\u547d\u4ee4\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tracerthostname<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# traceroute www.baidu.com\ntraceroute to www.baidu.com (61.135.169.125), 30 hops max, 40 byte packets\n1 192.168.74.2 (192.168.74.2) 2.606 ms 2.771 ms 2.950 ms\n2 211.151.56.57 (211.151.56.57) 0.596 ms 0.598 ms 0.591 ms\n3 211.151.227.206 (211.151.227.206) 0.546 ms 0.544 ms 0.538 ms\n4 210.77.139.145 (210.77.139.145) 0.710 ms 0.748 ms 0.801 ms\n5 202.106.42.101 (202.106.42.101) 6.759 ms 6.945 ms 7.107 ms\n6 61.148.154.97 (61.148.154.97) 718.908 ms * bt-228-025.bta.net.cn (202.106.228.25) 5.177 ms\n7 124.65.58.213 (124.65.58.213) 4.343 ms 4.336 ms 4.367 ms\n8 202.106.35.190 (202.106.35.190) 1.795 ms 61.148.156.138 (61.148.156.138) 1.899 ms 1.951 ms\n9 * * *\n30 * * *\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u8bf4\u660e\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u8bb0\u5f55\u6309\u5e8f\u5217\u53f7\u4ece1\u5f00\u59cb\uff0c\u6bcf\u4f4d\u7eaa\u5f55\u5c31\u662f\u4e00\u8df3\uff0c\u6bcf\u8df3\u8868\u793a\u4e00\u4e2a\u7f51\u6bb5\uff0c\u6211\u4eec\u770b\u89c1\u6bcf\u884c\u6709\u4e09\u4e2a\u65f6\u95f4\uff0c\u5355\u4f4d\u662fms\uff0c\u867d\u7136\u5c31\u662f-q\u7684\u9ed8\u8ba4\u53c2\u6570\u3002\u4fa6\u6d4b\u6570\u636e\u5305\u5411\u6bcf\u4f4d\u7f51\u6bb5\u53d1\u9001\u4e09\u4e2a\u6570\u636e\u5305\u540e\uff0c\u7f51\u6bb5\u54cd\u5e94\u540e\u8fd4\u56de\u7684\u65f6\u95f4\uff1b\u5018\u82e5\u60a8\u7528traceroute-q4\uff0c\u8868\u793a\u5411\u6bcf\u4f4d\u7f51\u6bb5\u53d1\u90014\u4e2a\u6570\u636e\u5305\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6709\u65f6\u6211\u4eectraceroute\u4e00\u53f0\u4e3b\u673a\u65f6\uff0c\u4f1a\u542c\u5230\u6709\u4e00\u4e9b\u884c\u662f\u4ee5*\u8868\u793a\u7684\u3002\u51fa\u73b0\u8fd9\u6837\u7684\u60c5\u51b5\uff0c\u53ef\u80fd\u662f\u9632\u706b\u5899\u5c01\u6389\u4e86ICMP\u7684\u8fd4\u56de\u4fe1\u606f\uff0c\u6240\u4ee5\u6211\u4eec\u5f97\u4e0d\u5230\u54ea\u4e9b\u76f8\u5173\u7684\u6570\u636e\u5305\u8fd4\u56de\u6570\u636e\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6709\u65f6\u6211\u4eec\u5728\u67d0\u4e00\u7f51\u6bb5\u5904\u5ef6\u65f6\u6bd4\u8f83\u957f\uff0c\u6709\u53ef\u80fd\u662f\u67d0\u53f0\u7f51\u6bb5\u6bd4\u8f83\u963b\u585e\uff0c\u4e5f\u53ef\u80fd\u662f\u5316\u5b66\u8bbe\u5907\u672c\u8eab\u7684\u8bf1\u56e0\u3002\u5176\u5b9e\u82e5\u679c\u67d0\u53f0DNS\u51fa\u73b0\u95ee\u9898\u65f6\uff0c\u4e0d\u80fd\u89e3\u6790\u4e3b\u673a\u540d\u3001\u57df\u540d\u65f6\uff0c\u4e5f\u4f1a\u6709\u5ef6\u65f6\u957f\u7684\u73b0\u8c61\uff1b\u60a8\u53ef\u4ee5\u52a0-n\u53c2\u6570\u6765\u9632\u6b62DNS\u89e3\u6790\uff0c\u4ee5IP\u683c\u5f0f\u8f93\u51fa\u6570\u636e\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5047\u5982\u5728\u5c40\u57df\u7f51\u4e2d\u7684\u4e0d\u540c\u7f51\u5173\u4e4b\u95f4\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7traceroute\u6765\u6392\u67e5\u95ee\u9898\u6240\u5728\uff0c\u662f\u4e3b\u673a\u7684\u95ee\u9898\u8fd8\u662f\u7f51\u6bb5\u7684\u95ee\u9898\u3002\u5047\u5982\u6211\u4eec\u901a\u8fc7\u8fdc\u7a0b\u6765\u8bbf\u95ee\u67d0\u53f0\u670d\u52a1\u5668\u78b0\u5230\u95ee\u9898\u65f6\uff0c\u6211\u4eec\u7528\u5230traceroute\u8ffd\u8e2a\u6570\u636e\u5305\u6240\u7ecf\u8fc7\u7684\u7f51\u6bb5\uff0c\u9012\u4ea4IDC\u670d\u52a1\u5546\uff0c\u4e5f\u6709\u52a9\u4e8e\u89e3\u51b3\u95ee\u9898\uff1b<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>telnet\/nmap<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>telnet\u5408\u540c\u662fTCP\/IP\u5408\u540c\u65cf\u4e2d\u7684\u4e00\u5458\uff0c\u662fInternet\u8fdc\u7a0b\u767b\u5f55\u670d\u52a1\u7684\u6807\u51c6\u5408\u540c\u548c\u4e3b\u8981\u5f62\u5f0f\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5177\u4f53\u7528\u6cd5\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># telnet serverIP port<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6bd4\u5982\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n\/\/\u8fde\u63a5\u4e00\u4e2a\u5b58\u5728\u7684\u7aef\u53e3\uff0c\u8fde\u63a5\u6210\u529f\n# telnet 10.198.25.126 5546\nTrying 10.198.25.126...\nConnected to 10.198.25.126.\nEscape character is &#039;^]&#039;.\n\/\/\u8fde\u63a5\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u7aef\u53e3,\u8fde\u63a5\u88ab\u62d2\u7edd\n# telnet 10.198.25.126 1234\nTrying 10.198.25.126...\ntelnet: connect to address 10.198.25.126: Connection refused\n\/\/\u8fde\u63a5\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u7f51\u7edc\uff0c\u51fa\u73b0\u8d85\u65f6\n# telnet 10.198.25.13 6\nTrying 10.198.25.13...\ntelnet\uff1aconnected to 10.198.25.126: Connection timed out\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>Nmap\uff0c\u4e5f\u5c31\u662fNetworkMapper\uff0c\u82f1\u6587\u4e3a\u201c\u7f51\u7edc\u6620\u5c04\u5668\u201d\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>Nmap\u662f\u4e0d\u5c40\u9650\u4e8e\u4ec5\u4ec5\u641c\u96c6\u4fe1\u606f\u548c\u679a\u4e3e\uff0c\u540c\u65f6\u53ef\u4ee5\u62ff\u6765\u4f5c\u4e3a\u4e00\u4e2a\u6f0f\u6d1e\u4fa6\u6d4b\u5668\u6216\u5b89\u5168\u626b\u63cf\u5668\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>Nmap\u662f\u4e00\u6b3e\u5341\u5206\u5f3a\u608d\u7684\u5b9e\u7528\u5de5\u5177,\u53ef\u7528\u4e8e\uff1a\u68c0\u67e5\u6d3b\u5728\u7f51\u8def\u4e0a\u7684\u4e3b\u673a\uff08\u4e3b\u673a\u53d1\u89c9\uff09\u3001\u68c0\u6d4b\u4e3b\u673a\u4e0a\u5f00\u653e\u7684\u7aef\u53e3\uff08\u7aef\u53e3\u53d1\u89c9\u6216\u679a\u4e3e\uff09\u3001\u68c0\u6d4b\u5230\u76f8\u5e94\u7684\u7aef\u53e3\uff08\u670d\u52a1\u53d1\u89c9\uff09\u7684\u8f6f\u4ef6\u548c\u7248\u672c\u6d4b\u91cf\u64cd\u4f5c\u7cfb\u7edf\uff0c\u786c\u4ef6\u5730\u5740\uff0c\u4ee5\u53ca\u8f6f\u4ef6\u7248\u672c\u6d4b\u91cf\u8106\u5f31\u6027\u7684\u6f0f\u6d1e\uff08Nmap\u7684\u811a\u672c\uff09\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>&#8220;PT&#8221;\u9009\u9879\u53ef\u4ee5\u5bf9\u7f51\u8def\u4e0a\u6307\u5b9a\u7aef\u53e3\u8fdb\u884c\u626b\u63cf(\u672c\u6587\u4e8b\u4f8b\u624b\u6307\u7684\u7f3a\u7701\u7aef\u53e3\u662f80\uff08http\uff09\u53f7\u7aef\u53e3)\uff0c\u5b83\u5c06\u53ef\u80fd\u901a\u8fc7\u76ee\u6807\u8fb9\u754c\u8def\u7531\u5668\u751a\u81f3\u662f\u9632\u706b\u5899\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><img style='max-height:500px;max-width:80%;margin: 10px auto' src='https:\/\/www.linuxcool.com\/wp-content\/uploads\/2023\/11\/1700049887213_1.jpg' alt='linux \u67e5\u770b\u7f51\u7edc \u547d\u4ee4_\u547d\u4ee4\u67e5\u770b\u7f51\u7edc\u914d\u7f6e_\u547d\u4ee4\u67e5\u770b\u7f51\u7edc\u4fe1\u606f' \/><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># nmap -sP -PT80 192.168.7.0\/24\nTCP probe port is 80\nStarting nmap V. 2.12 by Fyodor (fyodor@dhp.com, www.insecure.org\/nmap\/)\nHost (192.168.7.11) appears to be up.\nHost (192.168.7.12) appears to be up.\nHost (192.168.7.76) appears to be up.\nNmap run completed -- 256 IP addresses (3 hosts up) scanned in 1 second\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>netstat<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>netstat\u547d\u4ee4\u7528\u4e8e\u663e\u793a\u4e0eIP\u3001TCP\u3001UDP\u548cICMP\u5408\u540c\u76f8\u5173\u7684\u7edf\u8ba1\u6570\u636e\uff0c\u901a\u5e38\u7528\u4e8e\u68c0\u9a8c\u672c\u673a\u5404\u7aef\u53e3\u7684\u7f51\u8def\u8054\u63a5\u60c5\u51b5\u3002netstat\u662f\u5728\u5185\u6838\u4e2d\u8bbf\u95ee\u7f51\u8def\u53ca\u76f8\u5173\u4fe1\u606f\u7684\u7a0b\u5e8f\uff0c\u5b83\u80fd\u63d0\u4f9bTCP\u8054\u63a5\uff0cTCP\u548cUDP\u7a83\u542c\uff0c\u8fdb\u7a0b\u663e\u5b58\u7ba1\u7406\u7684\u76f8\u5173\u62a5\u544a\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4f8b\u5982\u67e5\u770b\u67d0\u4e2a\u7aef\u6807\u8bed\u662f\u5426\u6253\u5f00\uff0c\u82e5\u670d\u52a1\u7aef\u53e3\u6ca1\u6709\u6253\u5f00\uff0c\u81ea\u7136client\u4e5f\u5c31\u8054\u63a5\u4e0d\u4e0a\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# netstat -tunlp | grep 22\ntcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1109\/sshd\ntcp6 0 0 :::22 :::* LISTEN 1109\/sshd\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>iptables<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>netfilter\/iptables\uff08\u7b80\u79f0\u4e3aiptables\uff09\u7ec4\u6210<a style='color:#0000CC;font-size:16px' href='https:\/\/www.linuxprobe.com\/' target='_blank' rel=\"noopener\">Linux<\/a>\u5e73\u53f0\u4e0b\u7684\u5305\u8fc7\u6ee4\u9632\u706b\u5899\uff0c\u4e0e\u5927\u591a\u6570\u7684Linux\u8f6f\u4ef6\u4e00\u6837\uff0c\u8fd9\u4e2a\u5305\u8fc7\u6ee4\u9632\u706b\u5899\u662f\u514d\u8d39\u7684\uff0c\u5b83\u53ef\u4ee5\u53d6\u4ee3\u9ad8\u6602\u7684\u5546\u4e1a\u9632\u706b\u5899\u89e3\u51b3\u65b9\u6848\uff0c\u5b8c\u6210\u5c01\u5305\u8fc7\u6ee4\u3001\u5c01\u5305\u548c\u91cd\u5b9a\u5411\u4ee5\u53ca\u7f51\u8def\u5730\u5740\u8f6c\u6362\uff08NAT\uff09\u7b49\u529f\u80fd\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u8be5\u547d\u4ee4\u4f1a\u4ee5\u5217\u8868\u7684\u65b9\u5f0f\u663e\u793a\u51fa\u5f53\u524d\u4f7f\u7528\u7684iptables\u89c4\u5219<strong>linux \u67e5\u770b\u7f51\u7edc \u547d\u4ee4<\/strong>\uff0c\u5e76\u4e0d\u505a\u89e3\u6790adobe air linux\uff0c\u6bcf\u4e00\u6761\u89c4\u5219\u540e\u9762\u7684\u7f16\u53f7\u53ef\u4ee5\u62ff\u6765\u505a\u4e3a\u5176\u5b83\u64cd\u4f5c\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n# iptables -n -L\nChain INPUT (policy ACCEPT)\ntarget prot opt source destination\nACCEPT udp -- anywhere anywhere udp dpt:domain\nACCEPT tcp -- anywhere anywhere tcp dpt:domain\nACCEPT udp -- anywhere anywhere udp dpt:bootps\nACCEPT tcp -- anywhere anywhere tcp dpt:bootps\n...\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tcpdump<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5f53\u987b\u8981\u6d4b\u8bd5\u62a5\u6587\u662f\u5426\u53d1\u9001\u5230\u5bf9\u7aef\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528tcpdump\u547d\u4ee4\u8fdb\u884c\u6293\u5305\u5256\u6790\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4e00\u822c\u4f7f\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7tcpdump\u547d\u4ee4\u6293\u53d6\u6570\u636e\u5305\uff0c\u4e4b\u540e\u901a\u8fc7wireshake\u5de5\u5177\u8fdb\u884c\u5256\u6790\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4f7f\u7528\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code>\n\/\/\u76d1\u89c6\u6307\u5b9a\u7f51\u7edc\u63a5\u53e3\u3001\u67d0\u4e2a\u5177\u4f53\u7aef\u53e3\u53f7\u63a5\u6536\u7684tcp\u62a5\u6587\u7684\u6570\u636e\u5305\n# tcpdump -i eth0 -n tcp port 2443\n\/\/\u4e5f\u53ef\u4ee5\u6307\u5b9aip\uff0c \u4f8b\u5982\u83b7\u53d6\u6240\u6709210.27.48.1 \u7684\u4e3b\u673a\u6536\u5230\u7684\u548c\u53d1\u51fa\u7684\u6240\u6709\u6570\u636e\u5305\n# tcpdump host 210.27.48.1 \n\/\/\u4e5f\u53ef\u4ee5\u628a\u6293\u53d6\u7684\u6570\u636e\u5305\u4fdd\u5b58\u5230cap\u683c\u5f0f\u7684\u6587\u4ef6\u4e2d\uff0c\u901a\u8fc7\u4f7f\u7528wireshark\u8fdb\u884c\u5206\u6790\n# tcpdump tcp -i eth0 -w \/test.cap\n<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5047\u5982\u60f3\u6355\u6349\u5230\u6240\u6709\u6d41\u7ecf\u7aef\u53e380\u6216\u7aef\u53e3443\u7684Web\u6d41\u91cf\uff0c\u53ef\u4ee5\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># tcpdump -n port 80 or port 443<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u628a\u6293\u5305\u7ed3\u679c\u91cd\u5b9a\u5230\u6587\u4ef6\u4e2d\u8fdb\u884c\u4fdd\u5b58<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># tcpdump -n host 110.242.68.4 &gt; outfile<\/code><\/pre>\n<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4e5f\u53ef\u4ee5\u4fdd\u5b58\u4f7f\u7528-w\u628a\u6570\u636e\u7ed3\u679c\u4fdd\u5b58\u5230pcap\u683c\u5f0f\u7684\u6587\u4ef6\u4e2d\uff0c\u4e4b\u540e\u901a\u8fc7Wireshark\u6253\u5f00\u8be5\u6587\u4ef6\u5bf9\u6570\u636e\u5305\u8fdb\u884c\u5256\u6790\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\n<pre><code># tcpdump -n host 110.242.68.4 -w output.pcap\n<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>route\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7684\u8def\u7531\u8868\u4fe1\u606f\uff0c\u5305\u62ec\u9ed8\u8ba4\u7f51\u5173\u3002Dig\u662f\u4e00\u4e2a\u5728\u7c7bUnix\u547d\u4ee4\u884c\u6a21\u5f0f\u4e0b\u67e5\u8be2DNS\u5305\u62ecNS\u8bb0\u5f55\uff0cA\u8bb0\u5f55\uff0cMX\u8bb0\u5f55\u7b49\u76f8\u5173\u4fe1\u606f\u7684\u5de5\u5177\u3002nslookup\u7528\u4e8e\u67e5\u8be2DNS\u7684\u8bb0\u5f55\uff0c\u67e5\u8be2\u57df\u540d\u89e3\u6790\u662f\u5426\u6b63\u5e38\uff0c\u5728\u7f51\u7edc\u6545\u969c\u65f6\u7528\u6765\u8bca\u65ad\u7f51\u7edc\u95ee\u9898\u3002\u6765\u6392\u67e5\u95ee\u9898\u6240\u5728\uff0c\u662f\u4e3b\u673a\u7684\u95ee\u9898\u8fd8\u662f\u7f51\u5173\u7684\u95ee\u9898\u3002<\/p>\n","protected":false},"author":1,"featured_media":16388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[79,325,62,608,290],"class_list":["post-16387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-zj","tag-ym-2","tag-dk","tag-wg","tag-fhq"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/16387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=16387"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/16387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media\/16388"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=16387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=16387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=16387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}