{"id":1159,"date":"2022-10-24T22:58:54","date_gmt":"2022-10-24T14:58:54","guid":{"rendered":"https:\/\/qaqaq.top\/?p=1159"},"modified":"2022-11-27T12:41:51","modified_gmt":"2022-11-27T04:41:51","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%8f%af%e4%bb%a5ping%ef%bc%8c%e4%bd%86%e6%98%aftelnet%e7%ab%af%e5%8f%a3%e8%b6%85%e6%97%b6%ef%bc%8c%e7%bd%91%e7%ab%99wget%e8%b6%85%e6%97%b6%ef%bc%8c%e8%ae%bf%e9%97%ae","status":"publish","type":"post","link":"https:\/\/qaqaq.top\/?p=1159","title":{"rendered":"Linux\u670d\u52a1\u5668\u53ef\u4ee5ping\uff0c\u4f46\u662ftelnet\u7aef\u53e3\u8d85\u65f6\uff0c\u7f51\u7ad9wget\u8d85\u65f6\uff0c\u8bbf\u95ee\u8d85\u65f6\u7684\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"\n<p>\u6700\u8fd1\u65e0\u6cd5\u901a\u8fc7SSH\u8fde\u63a5Linux\u670d\u52a1\u5668\uff0c\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e0a\u7684HTTP\u670d\u52a1\u4e5f\u51fa\u73b0\u5f02\u5e38\u3002\u53ef\u4ee5ping\uff0c\u4f46\u662ftelnet\u7aef\u53e3\u8d85\u65f6\uff0c\u7f51\u7ad9wget\u8d85\u65f6\uff0c\u8bbf\u95ee\u8d85\u65f6\u3002<\/p>\n\n\n\n<p>\u6700\u540e\u6392\u67e5\u662f\u5185\u6838\u914d\u7f6e\u95ee\u9898<\/p>\n\n\n\n<p>\u539f\u6765\u662f net.ipv4.tcp_timestamps \u8bbe\u7f6e\u4e86\u4e3a 1 \uff0c\u5373\u542f\u7528\u65f6\u95f4\u6233<\/p>\n\n\n\n<p>cat \/proc\/sys\/net\/ipv4\/tcp_timestamps<\/p>\n\n\n\n<p>\u8fd9\u65f6\u5c06\u5176\u5173\u95ed<\/p>\n\n\n\n<p>\u4fee\u6539 \/etc\/sysctl.conf \u4e2d<\/p>\n\n\n\n<p>net.ipv4.tcp_timestamps = 0<\/p>\n\n\n\n<p>sysctl -p<\/p>\n\n\n\n<p>\u751f\u6548<\/p>\n\n\n\n<p>\u539f\u7406\uff1a<\/p>\n\n\n\n<p>\u95ee\u9898\u51fa\u5728\u4e86 tcp \u4e09\u6b21\u63e1\u624b\uff0cping \u7684\u901a icmp ok \uff0chttp ssh mysql \u90fd\u4e0d ok<\/p>\n\n\n\n<p>\u7ecf\u8fc7nat\u4e4b\u540e\uff0c\u5982\u679c\u524d\u9762\u76f8\u540c\u7684\u7aef\u53e3\u88ab\u4f7f\u7528\u8fc7\uff0c\u4e14\u65f6\u95f4\u6233\u5927\u4e8e\u8fd9\u4e2a\u94fe\u63a5\u53d1\u51fa\u7684syn\u4e2d\u7684\u65f6\u95f4\u6233\uff0c\u670d\u52a1\u5668\u4e0a\u5c31\u4f1a\u5ffd\u7565\u6389\u8fd9\u4e2asyn\uff0c\u4e0d\u8fd4\u4f1asyn-ack\u6d88\u606f\uff0c\u8868\u73b0\u4e3a\u7528\u6237\u65e0\u6cd5\u6b63\u5e38\u5b8c\u6210tcp3\u6b21\u63e1\u624b\uff0c\u4ece\u800c\u4e0d\u80fd\u6253\u5f00web\u9875\u9762\u3002\u5728\u4e1a\u52a1\u95f2\u65f6\uff0c\u5982\u679c\u7528\u6237nat\u7684\u7aef\u53e3\u6ca1\u6709\u88ab\u4f7f\u7528\u8fc7\u65f6\uff0c\u5c31\u53ef\u4ee5\u6b63\u5e38\u6253\u5f00\uff1b\u4e1a\u52a1\u5fd9\u65f6\uff0cnat\u7aef\u53e3\u91cd\u590d\u4f7f\u7528\u7684\u9891\u7387\u9ad8\uff0c\u5f88\u96be\u5206\u5230\u6ca1\u6709\u88ab\u4f7f\u7528\u7684\u7aef\u53e3\uff0c\u4ece\u800c\u4ea7\u751f\u8fd9\u79cd\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u53ea\u6709\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u90fd\u5f00\u542f\u65f6\u95f4\u6233\u7684\u60c5\u51b5\u4e0b\uff0c\u624d\u4f1a\u51fa\u73b0\u80fdping\u901a\u4e0d\u80fd\u5efa\u7acbtcp\u4e09\u6b21\u63e1\u624b\u7684\u60c5\u51b5<\/p>\n\n\n\n<p>netstat -s | grep timestamp<\/p>\n\n\n\n<p>\u5728\u540c\u4e00\u4e2a\u5185\u7f51\u73af\u5883\u4e0b\uff0c\u591a\u4eba\u4f7f\u7528\u540c\u4e00\u4e2a\u516c\u7f51IP\u8fdb\u884c\u4e0a\u7f51\uff0c\u8fd9\u6837NAT\u4e4b\u540e\u662f\u5927\u5927\u589e\u52a0\u4e86\u7aef\u53e3\u7684\u91cd\u590d\u4f7f\u7528\u7684\u6982\u7387\uff0cCentos7\u9ed8\u8ba4\u5f00\u8d77\u4e86TCP\/IP\u5efa\u7acb\u7684timestamp\uff0c\u6240\u6709\u5bfc\u81f4TCP\u4e09\u6b21\u63e1\u624b\u5931\u8d25\u3002<br><\/p>\n\n\n\n<p>cat \/proc\/sys\/net\/ipv4\/tcp_tw_recycle<br>cat \/proc\/sys\/net\/ipv4\/tcp_timestamps<\/p>\n\n\n\n<p>net.ipv4.tcp_tw_recycle=0<br>net.ipv4.tcp_timestamps=0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u65e0\u6cd5\u901a\u8fc7SSH\u8fde\u63a5Linux\u670d\u52a1\u5668\uff0c\u8bbf\u95ee\u8be5\u670d\u52a1\u5668\u4e0a\u7684HTTP\u670d\u52a1\u4e5f\u51fa\u73b0\u5f02\u5e38\u3002\u53ef\u4ee5ping\uff0c\u4f46\u662ftelnet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[51],"class_list":["post-1159","post","type-post","status-publish","format-standard","hentry","category-linux-","tag-linux"],"_links":{"self":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/1159"}],"collection":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1159"}],"version-history":[{"count":1,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions"}],"predecessor-version":[{"id":1160,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions\/1160"}],"wp:attachment":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}