{"id":312341,"date":"2020-10-30T21:02:07","date_gmt":"2020-10-30T21:02:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312341"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312341","title":{"rendered":"\u0421\u0435\u0442\u0435\u0432\u0438\u043a\u0438 \u043d\u0443\u0436\u043d\u044b \u0438 \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/525694\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iu\/e8\/zm\/iue8zmuxi8i-mcnfduxocizgk78.png\"><\/div>\n<p><\/a><br \/>  <font color=\"#999999\"><sup>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u0442\u0435\u043b\u043d\u0435\u0442-\u0432\u0438\u0434\u0435\u043e \u00ab\u0417\u0432\u0451\u0437\u0434\u043d\u044b\u0445 \u0432\u043e\u0439\u043d\u00bb: <code>telnet towel.blinkenlights.nl<\/code><\/sup><\/font><\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b <a href=\"https:\/\/habr.com\/en\/post\/523514\/\">\u043f\u043e\u0441\u0442<\/a> \u043e \u0442\u043e\u043c, \u043d\u0443\u0436\u043d\u044b \u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0438. \u0414\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 tcp\/ip \u043f\u043e\u0440\u0442\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0411\u0414 \u0438 AD, \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0438 \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u044b. \u041e\u043d\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u043e\u0439 \u0432 \u043f\u0430\u0440\u043e\u0445\u043e\u0434.<\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u0430\u043b\u043e \u0437\u043d\u0430\u0442\u044c ping \u0438 traceroute \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u0441\u0435\u0442\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0437\u0432\u0435\u043d\u044c\u044f \u0432 \u0446\u0435\u043f\u0438, \u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043b\u0438\u0448\u044c \u0441\u0435\u0442\u0435\u0432\u0438\u043a. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<a name=\"habracut\"><\/a><\/p>\n<h2><font color=\"#3AC1EF\">\u0427\u0435\u043c Netcat \u043b\u0443\u0447\u0448\u0435 telnet?<\/font><\/h2>\n<p>  \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430, \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 TCP\/UDP \u043f\u043e\u0440\u0442\u0430 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 telnet \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Netcat. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0447\u0438\u043d, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c telnet \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442. \u0412\u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b.<\/p>\n<ul>\n<li>telnet \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0440\u0442\u0430. \u0412\u0441\u0435, \u0438\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u2014 connect, \u043b\u0438\u0431\u043e fail. Netcat \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 LISTENING \u043d\u0435\u0442.<\/li>\n<li>\u041d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432 UDP, SCTP \u0438 \u043f\u0440\u043e\u0447\u0438\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u043e\u043c\u0435 TCP.<\/li>\n<li>\u041d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0446\u0438\u0439 \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f -w \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f -z  <\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u0438 \u0437\u0430\u043a\u043e\u043f\u0430\u0439\u0442\u0435 \u043f\u043e\u0433\u043b\u0443\u0431\u0436\u0435 telnet.<\/p>\n<pre><code class=\"bash\">(1:1004)$ ncat -v -w3 -z some.server 1111 Ncat: Version 7.80 ( https:\/\/nmap.org\/ncat ) Ncat: Connection refused.<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0445\u043e\u0441\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u043f\u0438\u043d\u0433\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0434\u0435\u043b\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u0435, \u0430 telnet \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u0430, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438.<\/p>\n<pre><code class=\"bash\">(1:1005)$ ncat -v -w3 -z another.server 1521 Ncat: Version 7.80 ( https:\/\/nmap.org\/ncat ) Ncat: No route to host.<\/code><\/pre>\n<p>  \u0411\u044b\u0442\u0443\u0435\u0442 \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0430 Windows \u043d\u0435\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b telnet, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <i>\u0448\u0442\u0430\u0442\u043d\u0430\u044f<\/i> \u0443\u0442\u0438\u043b\u0438\u0442\u0430 Test-NetConnection, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0437 PowerShell.<\/p>\n<pre><code class=\"powershell\">Test-NetConnection -ComputerName &quot;www.contoso.com&quot; -Port 80<\/code><\/pre>\n<p>  \u041d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432 UDP, SCTP \u0438 \u043f\u0440\u043e\u0447\u0438\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u043a\u0440\u043e\u043c\u0435 TCP.<br \/>  \u041d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0446\u0438\u0439 \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f -w \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f -z.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u0438 \u0437\u0430\u043a\u043e\u043f\u0430\u0439\u0442\u0435 \u043f\u043e\u0433\u043b\u0443\u0431\u0436\u0435 telnet.<\/p>\n<h2><font color=\"#3AC1EF\">Linux MIB \u0432 \u043f\u043e\u043c\u043e\u0449\u044c<\/font><\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0434\u0440\u0443\u0433 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0438\u0442\u0435\u043b\u0438 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0438\u0441\u0430\u0442\u044c, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0432\u044b\u0434\u0435\u0440\u043d\u0443\u0442\u043e\u043c \u0441\u0435\u0442\u0435\u0432\u043e\u043c \u043a\u0430\u0431\u0435\u043b\u0435, \u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445 JBoss\/Tomcat. \u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0435\u0439\u0441 \u0432 \u0442\u0435\u0445-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 <a href=\"https:\/\/habr.com\/en\/post\/312710\/\">Linux MIB<\/a>. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u044f\u0434\u0440\u0430 Linux \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u043c SNMP. \u0421\u0430\u043c\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u0432\u0441\u0435 \u0435\u0449\u0435 netstat.<\/p>\n<pre><code class=\"bash\">(1:1006)$ netstat -s (1:1007)$ nstat -s<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u0430 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u044f <a href=\"https:\/\/habr.com\/en\/post\/320278\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. SNMP \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Linux \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0432\u0435\u0442\u0448\u0430\u043b\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0441\u0438\u043b\u0438\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0445, \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432. \u0414\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c buffer overrun.<\/p>\n<pre><code class=\"bash\">(1:1008)$ netstat -s |grep prune 873 packets pruned from receive queue because of socket buffer overrun (1:1009)$ nstat -s |grep Prune TcpExtPruneCalled   873 0.0<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0438 \u0431\u0443\u0444\u0435\u0440 \u0441\u043e\u043a\u0435\u0442\u0430 \u043f\u0435\u0440\u043c\u0430\u043d\u0435\u043d\u0442\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d, \u0442\u043e\u0433\u0434\u0430 \u044f\u0434\u0440\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438 \u043d\u0430 \u0433\u043b\u0430\u0437\u0430\u0445. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 sysctl.conf. \u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \/proc.<\/p>\n<pre><code class=\"bash\">(1:1010)$ cat \/proc\/sys\/net\/ipv4\/tcp_rmem 4096    16384   4194304 (1:1011)$ cat \/proc\/sys\/net\/ipv4\/wcp_rmem 4096    16384   4194304 (1:1012)$ grep -e tcp_rmem -e tcp_wmem \/etc\/sysctl.conf net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216<\/code><\/pre>\n<p>  \u0422\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 tcp_rmem\/tcp_wmem \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0431\u0435\u0437 \u0432\u0435\u0441\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0442\u0438 \u0441 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e 10 GiB\/s. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 sysctl.conf \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c systcl -p. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 setsockopt (SO_RCVBUF).<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u0443\u0444\u0435\u0440 setsockopt(SO_RCVBUF), \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 net.core.rmem_default \u0438 net.core.rmem_max \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0431\u0443\u0444\u0435\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1 \u043c\u0431, \u043d\u043e net.core.rmem_max \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 256 \u043a\u0431, \u0442\u043e \u0431\u0443\u0444\u0435\u0440 \u0441\u043e\u043a\u0435\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<h2><font color=\"#3AC1EF\">\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0441\u0435\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432<\/font><\/h2>\n<p>  \u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0430 WireShark \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u2014 \u0433\u043b\u0430\u0432\u043d\u044b\u0439. \u041d\u0435 \u0440\u0430\u0437 \u0438 \u043d\u0435 \u0434\u0432\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f WireShark \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043f\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041d\u043e \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 \u044f\u0434\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<br \/>  \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 tcpdump, \u0438\u043b\u0438 WireShark. \u0417\u0430\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tcpdrop \u0438\u0437 \u0441\u0435\u0442\u0430 bcc-tools. \u0423 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u043f\u0446\u0438\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 tcpdrop. \u0412\u044b\u0432\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043e\u043a\u0435\u0442\u0430, \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0444\u043b\u0430\u0433\u0430\u0445 TCP. \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0435\u043a\u0430 \u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0431\u0440\u043e\u0441\u0443 \u043f\u0430\u043a\u0435\u0442\u0430.<\/p>\n<pre><code class=\"bash\">(1:1013)$ \/usr\/share\/bcc\/tools\/tcpdrop TIME     PID    IP SADDR:SPORT\t  &gt; DADDR:DPORT\t  STATE (FLAGS) 16:31:07 3103   4  93.184.216.34:443       &gt; 192.168.11.32:36222   ESTABLISHED (PSH|ACK) \tb'tcp_drop+0x1' \tb'tcp_data_queue+0x1e7' \tb'tcp_rcv_established+0x1df' \tb'tcp_v4_do_rcv+0x131' \tb'tcp_v4_rcv+0xad3' \tb'ip_protocol_deliver_rcu+0x2b' \tb'ip_local_deliver_finish+0x55' \tb'ip_local_deliver+0xe8' \tb'ip_rcv+0xcf' \tb'__netif_receive_skb_core+0x429' \tb'__netif_receive_skb_list_core+0x10a' \tb'netif_receive_skb_list_internal+0x1bf' \tb'netif_receive_skb_list+0x26' \tb'iwl_pcie_rx_handle+0x447' \tb'iwl_pcie_irq_handler+0x4d5' \tb'irq_thread_fn+0x20' \tb'irq_thread+0xdc' \tb'kthread+0x113' \tb'ret_from_fork+0x35' <\/code><\/pre>\n<p>  \u0412 bcc-tools \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 tcplife, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b TCP \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0430\u043d\u0441\u0430. \u0423 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0446\u0438\u0438.<\/p>\n<pre><code class=\"bash\">(1:1014)$ \/usr\/share\/bcc\/tools\/tcplife -h ... examples:     .\/tcplife           # trace all TCP connect()s     .\/tcplife -T        # include time column (HH:MM:SS)     .\/tcplife -w        # wider columns (fit IPv6)     .\/tcplife -stT      # csv output, with times &amp; timestamps     .\/tcplife -p 181    # only trace PID 181     .\/tcplife -L 80     # only trace local port 80     .\/tcplife -L 80,81  # only trace local ports 80 and 81     .\/tcplife -D 80     # only trace remote port 80<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0435\u0441\u0441\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"bash\"># .\/tcplife -D 80 PID   COMM       LADDR           LPORT RADDR           RPORT TX_KB RX_KB MS 27448 curl       100.66.11.247   54146 54.154.224.174  80        0     1 263.85 27450 curl       100.66.11.247   20618 54.154.164.22   80        0     1 243.62 27452 curl       100.66.11.247   11480 54.154.43.103   80        0     1 231.16 27454 curl       100.66.11.247   31382 54.154.15.7     80        0     1 249.95<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043c\u0435\u0436\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d, \u043b\u0438\u0431\u043e IPS\/IDS \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e \u043e\u0431\u0440\u044b\u0432\u0443 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 TCP \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e \u043f\u0440\u043e\u0448\u0435\u0441\u0442\u0432\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0442\u044f\u043d\u0443\u0442\u0441\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0434\u043e\u043b\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u043f\u043e\u0439 \u0437\u043e\u043d\u0435, \u043a\u0430\u043a \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e, \u0442\u0430\u043a \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043d\u044f\u0442\u044c \u0432 \u0447\u0435\u043c\u0443 \u0442\u0443\u0442 \u0434\u0435\u043b\u043e, \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b <code>bcc-tools<\/code>.<\/p>\n<h2><font color=\"#3AC1EF\">\u041d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u043d\u0433<\/font><\/h2>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u0435\u043f\u044b\u043c \u043f\u044f\u0442\u043d\u043e\u043c \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d \u041e\u0421. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<pre><code class=\"bash\">getnameinfo(getaddrinfo(HOSTNAME)) = HOSTMANE<\/code><\/pre>\n<p>  \u0443\u043d\u043a\u0446\u0438\u0438 getnameinfo \u0438 getaddrinfo \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 gethostbyname \u0438 gethostbyaddr \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<pre><code class=\"cpp\">int getnameinfo(const struct sockaddr *addr, socklen_t addrlen,     char *host, socklen_t hostlen,     char *serv, socklen_t servlen, int flags);  int getaddrinfo(const char *node, const char *service,     const struct addrinfo *hints, struct addrinfo **res);<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 <a href=\"http:\/\/lib.ru\/\">lib.ru<\/a><\/p>\n<pre><code class=\"bash\">(1:1015)$ host lib.ru lib.ru has address 81.176.66.163 ... (1:1016)$ host 81.176.66.163 163.66.176.81.in-addr.arpa domain name pointer lib.ru.  \u041e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 - example.com. (1:1017)$ host example.com example.com has address 93.184.216.34 (1:1018)$ host 93.184.216.34 Host 34.216.184.93.in-addr.arpa. not found: 3(NXDOMAIN)<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b IP 93.184.216.34 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0435 \u043d\u0430 example.com, \u0430 \u043d\u0430 \u0438\u043d\u043e\u0439 \u0445\u043e\u0441\u0442, \u0442\u043e \u0438 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0422\u043e\u043b\u044c\u043a\u043e <b>\u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u043e<\/b> \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<br \/>  \u0412\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0443 host \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a dig \u0438 nslookup \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043b\u0438\u0448\u044c DNS \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/hosts. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 getent.<\/p>\n<pre><code class=\"bash\">(1:1019)$ strace -f -e trace=openat host my.router 2&gt;&amp;1 |grep -e &quot;^openat&quot; -e address openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libcrypto.so.1.1&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libuv.so.1&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libpthread.so.0&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libidn2.so.0&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libc.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libz.so.1&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libdl.so.2&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libunistring.so.2&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/proc\/self\/task\/7164\/comm&quot;, O_RDWR) = 3  (1:1020)$ strace -f -e trace=openat getent ahosts my.router  openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libc.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/locale\/locale-archive&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/gconv\/gconv-modules.cache&quot;, O_RDONLY) = 3 openat(AT_FDCWD, &quot;\/etc\/nsswitch.conf&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/etc\/host.conf&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/etc\/resolv.conf&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/lib64\/libnss_files.so.2&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/etc\/hosts&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/etc\/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libidn2.so.0&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/libunistring.so.2&quot;, O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, &quot;\/usr\/lib64\/charset.alias&quot;, O_RDONLY|O_NOFOLLOW) = -1 ENOENT (No such file or directory) 192.168.10.10    STREAM my.router 192.168.10.10    DGRAM   192.168.10.10    RAW     +++ exited with 0 +++<\/code><\/pre>\n<p>  \u0418\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e host \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0444\u0430\u0439\u043b\u0443 \/etc\/hosts \u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, getent \u0438\u0449\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<h2><font color=\"#3AC1EF\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/access.redhat.com\/solutions\/369563\">How can I tune the TCP Socket Buffers?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/en\/post\/352300\/\">Resolve IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 Linux: \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"http:\/\/www.brendangregg.com\/blog\/index.html\">Brendan Gregg&#8217;s Blog<\/a><\/li>\n<\/ul>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=onebigstep&amp;utm_content=seteviki_nuzhny_i_vot_pochemu#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub\/news\/read\/123?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=onebigstep&amp;utm_content=seteviki_nuzhny_i_vot_pochemu\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3p\/iw\/1j\/3piw1j3wd_cgmzq9sefgferaumu.png\"><\/div>\n<p><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/525694\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/525694\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/525694\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iu\/e8\/zm\/iue8zmuxi8i-mcnfduxocizgk78.png\"><\/div>\n<p><\/a><br \/>  <font color=\"#999999\"><sup>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u0442\u0435\u043b\u043d\u0435\u0442-\u0432\u0438\u0434\u0435\u043e \u00ab\u0417\u0432\u0451\u0437\u0434\u043d\u044b\u0445 \u0432\u043e\u0439\u043d\u00bb: <code>telnet towel.blinkenlights.nl<\/code><\/sup><\/font><\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b <a href=\"https:\/\/habr.com\/en\/post\/523514\/\">\u043f\u043e\u0441\u0442<\/a> \u043e \u0442\u043e\u043c, \u043d\u0443\u0436\u043d\u044b \u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0438. \u0414\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 tcp\/ip \u043f\u043e\u0440\u0442\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0411\u0414 \u0438 AD, \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u0438 \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u044b. \u041e\u043d\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u043e\u0439 \u0432 \u043f\u0430\u0440\u043e\u0445\u043e\u0434.<\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u0430\u043b\u043e \u0437\u043d\u0430\u0442\u044c ping \u0438 traceroute \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u0441\u0435\u0442\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0437\u0432\u0435\u043d\u044c\u044f \u0432 \u0446\u0435\u043f\u0438, \u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043b\u0438\u0448\u044c \u0441\u0435\u0442\u0435\u0432\u0438\u043a. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312341","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312341"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312341\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}