{"id":659,"date":"2020-04-20T11:34:59","date_gmt":"2020-04-20T03:34:59","guid":{"rendered":"https:\/\/lox.im\/?p=659"},"modified":"2020-10-18T10:11:58","modified_gmt":"2020-10-18T02:11:58","slug":"padavan-%e8%bf%9c%e7%a8%8b%e8%ae%b0%e5%bd%95%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%bd%ac","status":"publish","type":"post","link":"https:\/\/lox.im\/index.php\/659.html","title":{"rendered":"Padavan \u8fdc\u7a0b\u8bb0\u5f55\u670d\u52a1\u5668[\u8f6c]"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\u81ea<a class=\"navbar-brand\" href=\"https:\/\/leeyr.com\/\" target=\"_blank\"  rel=\"nofollow\" >\u9ece\u8a18<\/a><\/p>\n<p>Padavan \u8def\u7531\u5668\u51fa\u73b0\u5947\u602a\u7684\u201c\u6b7b\u673a\u201d\u73b0\u8c61\u3002\u65e0\u7ebf WLAN \u6d88\u5931\uff0cLAN \u7f3a\u5931\u65e0\u6cd5\u8bc6\u522b\uff0c\u91cd\u542f\u8bbe\u5907\u65e5\u5fd7\u8361\u7136\u65e0\u5b58\u3002\u7528 Rsyslog \u65e5\u5fd7\u7ba1\u7406\u80fd\u4f20\u8f93\u5ba2\u6237\u7aef logs \u5230\u8fdc\u7a0b\u8bbe\u5907\u4fdd\u5b58\uff0c\u51fa\u73b0\u95ee\u9898\u65f6\u6709\u4f9d\u636e\u53ef\u5bfb\u3002<\/p>\n<h3>\u670d\u52a1\u5668\u5b89\u88c5 Rsyslog<\/h3>\n<pre><code>apt install rsyslog<\/code><\/pre>\n<h3>\u914d\u7f6e Rsyslog<\/h3>\n<p>MODULES \u533a\u57df<\/p>\n<pre><code># provides UDP syslog reception\nmodule(load=\"imudp\")\ninput(type=\"imudp\" port=\"514\")\n# provides TCP syslog reception\nmodule(load=\"imtcp\")\ninput(type=\"imtcp\" port=\"514\")<\/code><\/pre>\n<p>GLOBAL DIRECTIVES \u533a\u57df<\/p>\n<pre><code>$template RemoteLogs,\"\/var\/log\/%HOSTNAME%\/%PROGRAMNAME%.log\" *\n*.* ?RemoteLogs\n&amp; ~<\/code><\/pre>\n<h3>\u670d\u52a1\u5668\u4fdd\u5b58\u8def\u5f84<\/h3>\n<pre><code>\/var\/log\/%HOSTNAME%<\/code><\/pre>\n<h3>\u91cd\u542f rsyslog<\/h3>\n<pre><code>service rsyslog restart <\/code><\/pre>\n<h3>\u67e5\u770b\u7aef\u53e3<\/h3>\n<pre><code>netstat -tulpn | grep rsyslog \ntcp        0      0 0.0.0.0:514             0.0.0.0:*               LISTEN      4971\/rsyslogd\ntcp6       0      0 :::514                  :::*                    LISTEN      4971\/rsyslogd\nudp        0      0 0.0.0.0:514             0.0.0.0:*                           4971\/rsyslogd\nudp6       0      0 :::514                  :::*                                4971\/rsyslogd<\/code><\/pre>\n<h3>\u5ba2\u6237\u7aef\u8bbe\u7f6e<\/h3>\n<p>Padavan \u7cfb\u7edf\u7ba1\u7406 - \u7cfb\u7edf\u8bbe\u7f6e - \u8fdc\u7a0b\u8bb0\u5f55\u670d\u52a1\u5668:<\/p>\n<pre><code>192.168.0.100:514<\/code><\/pre>\n<p>\u91cd\u542f Padavan \u8bbe\u5907\u5373\u53ef\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u770b\u5230\u76f8\u5173\u65e5\u5fd7\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-700\" src=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/20191201.jpg\" width=\"917\" height=\"551\" alt=\"20191201\" title=\"20191201\" srcset=\"https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/20191201.jpg 917w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/20191201-300x180.jpg 300w, https:\/\/lox.im\/wp-content\/uploads\/2020\/05\/20191201-768x461.jpg 768w\" sizes=\"auto, (max-width: 917px) 100vw, 917px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Padavan \u8def\u7531\u5668\u51fa\u73b0\u5947\u602a\u7684\u201c\u6b7b\u673a\u201d\u73b0\u8c61\u3002\u65e0\u7ebf WLAN \u6d88\u5931\uff0cLAN \u7f3a\u5931\u65e0\u6cd5\u8bc6\u522b\uff0c\u91cd\u542f\u8bbe\u5907\u65e5\u5fd7\u8361\u7136\u65e0\u5b58\u3002\u7528 Rsyslog \u65e5\u5fd7\u7ba1\u7406\u80fd\u4f20\u8f93\u5ba2\u6237\u7aef logs \u5230\u8fdc\u7a0b\u8bbe\u5907\u4fdd\u5b58\uff0c\u51fa\u73b0\u95ee\u9898\u65f6\u6709\u4f9d\u636e\u53ef\u5bfb\u3002<\/p>\n","protected":false},"author":1,"featured_media":660,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[44,43],"class_list":["post-659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","tag-padavan","tag-43"],"_links":{"self":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":0,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media\/660"}],"wp:attachment":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}