{"id":73,"date":"2016-07-08T21:07:45","date_gmt":"2016-07-08T21:07:45","guid":{"rendered":"http:\/\/tst-amo.pp.ua\/blog\/?p=73"},"modified":"2018-09-07T09:42:05","modified_gmt":"2018-09-07T09:42:05","slug":"netstat","status":"publish","type":"post","link":"https:\/\/tst-amo.net.ua\/blog\/?p=73","title":{"rendered":"netstat"},"content":{"rendered":"<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 netstat<\/h4>\n<pre>#netstat -I em0 =&gt; \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\r\n#systat -ifstat =&gt; \u0432\u044b\u0432\u043e\u0434\r\n#netstat \u2013na =&gt; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432\r\n#netstat -w 1 -h -d =&gt; \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a\r\n#netstat -w 1 -h -d -I rl0 =&gt; \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 rl0\r\n#netstat \u2013nat \u2013 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0445 TCP-\u043f\u043e\u0440\u0442\u043e\u0432 \r\n#netstat \u2013nau \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0445 UDP-\u043f\u043e\u0440\u0442\u043e\u0432 \r\n#netstat \u2013npl \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435x \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432(TCP,UDP,unix-\u0441\u043e\u043a\u0435\u0442\u044b) \r\n#netstat \u2013nptl \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435x \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 TCP \r\n#netstat \u2013npul \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435x \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 UDP \r\n#netstat \u2013nplx \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435x \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 unix-\u0441\u043e\u043a\u0435\u0442\u043e\u0432 \r\n#netstat \u2013s =&gt; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432() \r\n#netstat \u2013st \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 TCP-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \r\n#netstat \u2013su \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 UDP-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \r\n#netstat \u2013r =&gt; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \r\n#netstat \u2013i =&gt; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \r\n<span style=\"color: #ff0000;\">#netstat -nid =&gt;<\/span> \r\n#netstat -ic 2 \u2013 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \r\n#netstat \u2013ie \u2013 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 (\u0430\u043d\u0430\u043b\u043e\u0433 ifconfig)<\/pre>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Netstat \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f DoS\/DDoS<\/h4>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 ESTABLISHED<\/p>\n<pre>netstat -naltp | grep ESTABLISHED | awk \u2018{print $5}\u2019 | awk -F: \u2018{print $1}\u2019 | sort -n | uniq -c<\/pre>\n<p>\u0438\u043b\u0438<\/p>\n<pre>netstat -nalpt | grep ESTABLISHED | awk \u2018{print $5}\u2019 | cut -d: -f1 | sort | uniq -c | sort -rn<\/pre>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 80 \u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0438\u0445 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439<br \/>\n\u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430(DoS)<\/p>\n<pre>netstat -na | grep :80 | sort<\/pre>\n<p>\u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e Ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 80-\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<pre>netstat -npla | grep :80 | awk \u2018{print $5}\u2019 | cut -d: -f1 | sort | uniq -c | sort \u2013rn<\/pre>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0438\u0437 \u0441\u0435\u0442\u0438<\/h4>\n<p>\u0427\u0438\u0441\u043b\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0438\u0437\u043a\u0438\u043c(\u043c\u0435\u043d\u0435\u0435 5).\u0412\u043e \u0432\u0440\u0435\u043c\u044f DoS\/DDoS-\u0430\u0442\u0430\u043a\u0438 \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.\u041e\u0434\u043d\u0430\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b(\u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c)<\/p>\n<pre>netstat -np | grep SYN_RECV | wc \u2013l<\/pre>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c SYN_RECV<\/p>\n<pre>netstat -np | grep SYN_RECV | awk \u2018{print $5}\u2019 | awk -F: \u2018{print $1}\u2019<\/pre>\n<p>\u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430<\/p>\n<pre>netstat -ntu | awk \u2018{print $5}\u2019 | cut -d: -f1 | sort | uniq -c | sort \u2013rn<\/pre>\n<p>\u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 TCP \u0438\u043b\u0438 UDP<\/p>\n<pre>netstat -nap | grep \u2018tcp\\|udp\u2019 | awk \u2018{print $5}\u2019 | cut -d: -f1| sort | uniq -c | sort \u2013rn<\/pre>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-bottom-right\"><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts73&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts73&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 netstat #netstat -I em0 =&gt; \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 #systat -ifstat =&gt; \u0432\u044b\u0432\u043e\u0434 #netstat \u2013na =&gt; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 #netstat -w 1 -h -d =&gt; \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a #netstat -w 1 -h -d -I rl0 =&gt; \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 rl0 #netstat \u2013nat \u2013 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0445 TCP-\u043f\u043e\u0440\u0442\u043e\u0432 #netstat \u2013nau \u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u043e\u0442\u043a\u0440\u044b\u0445 UDP-\u043f\u043e\u0440\u0442\u043e\u0432 #netstat &#8230;<\/p>\n<p><a href=\"https:\/\/tst-amo.net.ua\/blog\/?p=73\" class=\"more-link\">Continue reading &lsquo;netstat&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,69,52,165],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-netstat","category-utilites","category-165"],"_links":{"self":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/73"}],"collection":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":6,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":3116,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions\/3116"}],"wp:attachment":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}