{"id":168333,"date":"2020-01-08T12:06:37","date_gmt":"2020-01-08T04:06:37","guid":{"rendered":"https:\/\/gulass.cn\/?p=168333"},"modified":"2019-12-30T11:09:02","modified_gmt":"2019-12-30T03:09:02","slug":"tcp-wrapper-centos","status":"publish","type":"post","link":"https:\/\/gulass.cn\/tcp-wrapper-centos.html","title":{"rendered":"CentOS \u4e2d TCP Wrappers\u8bbf\u95ee\u63a7\u5236"},"content":{"rendered":"
TCP Wrappers\u5c06TCP\u670d\u52a1\u7a0b\u5e8f\u201c\u5305\u88f9\u201d\u8d77\u6765\uff0c\u4ee3\u4e3a\u76d1\u542cTCP\u670d\u52a1\u7a0b\u5e8f\u7684\u7aef\u53e3\uff0c\u589e\u52a0\u4e86\u4e00\u4e2a\u5b89\u5168\u68c0\u6d4b\u8fc7\u7a0b\uff0c\u5916\u6765\u7684\u8fde\u63a5\u8bf7\u6c42\u5fc5\u987b\u5148\u901a\u8fc7\u8fd9\u5c42\u5b89\u5168\u68c0\u6d4b\uff0c\u83b7\u5f97\u8bb8\u53ef\u540e\u624d\u80fd\u8bbf\u95ee\u771f\u6b63\u7684\u670d\u52a1\u7a0b\u5e8f\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0cTCP Wrappers\u8fd8\u53ef\u4ee5\u8bb0\u5f55\u6240\u6709\u4f01\u56fe\u8bbf\u95ee\u88ab\u4fdd\u62a4\u670d\u52a1\u7684\u884c\u4e3a\uff0c\u4e3a\u7ba1\u7406\u5458\u63d0\u4f9b\u4e30\u5bcc\u7684\u5b89\u5168\u5206\u6790\u8d44\u6599\u3002<\/p>\n
<\/p>\n
TCP Wrappers\u673a\u5236\u7684\u4fdd\u62a4\u5bf9\u8c61\u4e3a\u5404\u79cd\u7f51\u7edc\u670d\u52a1\u7a0b\u5e8f\uff0c\u9488\u5bf9\u8bbf\u95ee\u670d\u52a1\u7684\u5ba2\u6237\u7aef\u5730\u5740\u8fdb\u884c\u8bbf\u95ee\u63a7\u5236\u3002\u5bf9\u5e94\u7684\u4e24\u4e2a\u7b56\u7565\u6587\u4ef6\u4e3a\/etc\/hosts.allow\u548c\/etc\/hosts.deny\uff0c\u5206\u522b\u7528\u6765\u8bbe\u7f6e\u5141\u8bb8\u548c\u62d2\u7edd\u7684\u7b56\u7565\u3002<\/p>\n
\u4e24\u4e2a\u7b56\u7565\u6587\u4ef6\u7684\u4f5c\u7528\u76f8\u53cd\uff0c\u4f46\u914d\u7f6e\u8bb0\u5f55\u7684\u683c\u5f0f\u76f8\u540c\uff0c\u5982\u4e0b\u6240\u793a\uff1a
\n<\u670d\u52a1\u7a0b\u5e8f\u5217\u8868>: <\u5ba2\u6237\u7aef\u5730\u5740\u5217\u8868><\/p>\n\u670d\u52a1\u7a0b\u5e8f\u5217\u8868\u3001\u5ba2\u6237\u7aef\u5730\u5740\u5217\u8868\u4e4b\u95f4\u4ee5\u5192\u53f7\u5206\u9694\uff0c\u5728\u6bcf\u4e2a\u5217\u8868\u5185\u7684\u591a\u4e2a\u9879\u4e4b\u95f4\u4ee5\u9017\u53f7\u5206\u9694\u3002<\/p><\/blockquote>\n
1\uff09\u670d\u52a1\u7a0b\u5e8f\u5217\u8868<\/p>\n
\n
- ALL\uff1a\u4ee3\u8868\u6240\u6709\u7684\u670d\u52a1\uff1b<\/li>\n
- \u5355\u4e2a\u670d\u52a1\u7a0b\u5e8f\uff1a\u5982\u201cvsftpd\u201d\uff1b<\/li>\n
- \u591a\u4e2a\u670d\u52a1\u7a0b\u5e8f\u7ec4\u6210\u7684\u5217\u8868\uff1a\u5982\u201cvsftpd.sshd\u201d\uff1b<\/li>\n<\/ul>\n
2\uff09\u5ba2\u6237\u7aef\u5730\u5740\u5217\u8868<\/p>\n
\n
- ALL\uff1a\u4ee3\u8868\u4efb\u4f55\u5ba2\u6237\u7aef\u5730\u5740\uff1b<\/li>\n
- LOCAL\uff1a\u4ee3\u8868\u672c\u673a\u5730\u5740\uff1b<\/li>\n
- \u5355\u4e2aIP\u5730\u5740\uff1a\u5982\u201c192.1668.10.1\u201d\uff1b<\/li>\n
- \u7f51\u6bb5\u5730\u5740\uff1a\u5982\u201c192.168.10.0\/255.255.255.0\u201d\uff1b<\/li>\n
- \u4ee5\u201c.\u201d\u5f00\u59cb\u7684\u57df\u540d\uff1a\u5982\u201cbenet.com\u201d\u5339\u914dbenet.com\u57df\u4e2d\u7684\u6240\u6709\u4e3b\u673a\uff1b<\/li>\n
- \u4ee5\u201c.\u201d\u7ed3\u675f\u7684\u7f51\u7edc\u5730\u5740\uff1a\u5982\u201c192.168.10.\u201d\u5339\u914d\u6574\u4e2a192.168.10.0\/24\u7f51\u6bb5\uff1b<\/li>\n
- \u5d4c\u5165\u901a\u914d\u7b26\u201c\u201d\u201c\uff1f\u201d\uff1a\u524d\u8005\u4ee3\u8868\u4efb\u610f\u957f\u5ea6\u5b57\u7b26\uff0c\u540e\u8005\u4ec5\u4ee3\u8868\u4e00\u4e2a\u5b57\u7b26\uff0c\u5982\u201c192.168.10.1<\/em>\u201d\u5339\u914d\u4ee5192.168.10.1\u5f00\u5934\u7684\u6240\u6709IP\u5730\u5740\u3002\u4e0d\u53ef\u4e0e\u4ee5\u201c.\u201d\u5f00\u59cb\u6216\u7ed3\u675f\u7684\u6a21\u5f0f\u6df7\u7528\uff1b<\/li>\n
- \u591a\u4e2a\u5ba2\u6237\u7aef\u5730\u5740\u7ec4\u6210\u7684\u5217\u8868\uff1a\u5982\u201c192.168.1. \uff0c172.16.16. \uff0c.benet.com\u201d\uff1b<\/li>\n<\/ul>\n
2\u3001\u8bbf\u95ee\u63a7\u5236\u7684\u57fa\u672c\u539f\u5219<\/strong><\/span><\/div>\n\u5173\u4e8eTCP Wrappers\u673a\u5236\u7684\u8bbf\u95ee\u7b56\u7565\uff0c\u5e94\u7528\u65f6\u9075\u5faa\u4ee5\u4e0b\u987a\u5e8f\u548c\u539f\u5219\uff1a\u9996\u5148\u68c0\u67e5\/etc\/hosts.allow\u6587\u4ef6\uff0c\u5982\u679c\u627e\u5230\u76f8\u5339\u914d\u7684\u7b56\u7565\uff0c\u5219\u5141\u8bb8\u8bbf\u95ee\uff1b\u5426\u5219\u7ee7\u7eed\u68c0\u67e5\/etc\/hosts.deny\u6587\u4ef6\uff0c\u5982\u679c\u627e\u5230\u76f8\u5339\u914d\u7684\u7b56\u7565\uff0c\u5219\u62d2\u7edd\u8bbf\u95ee\uff1b\u5982\u679c\u68c0\u67e5\u4e0a\u8ff0\u4e24\u4e2a\u6587\u4ef6\u90fd\u627e\u4e0d\u5230\u76f8\u5339\u914d\u7684\u7b56\u7565\uff0c\u5219\u5141\u8bb8\u8bbf\u95ee\u3002<\/p>\n
3\u3001TCP Wrappers\u914d\u7f6e\u5b9e\u4f8b<\/strong><\/span><\/div>\n\u5b9e\u9645\u4f7f\u7528TCP Wrappers\u673a\u5236\u65f6\uff0c\u8f83\u5bbd\u677e\u7684\u7b56\u7565\u53ef\u4ee5\u662f\u201c\u5141\u8bb8\u6240\u6709\uff0c\u62d2\u7edd\u4e2a\u522b\u201d\uff0c\u8f83\u4e25\u683c\u7684\u7b56\u7565\u662f\u201c\u5141\u8bb8\u4e2a\u522b\uff0c\u62d2\u7edd\u6240\u6709\u201d\u3002\u524d\u8005\u53ea\u9700\u8981\u5728hosts.deny\u6587\u4ef6\u4e2d\u6dfb\u52a0\u76f8\u5e94\u7684\u62d2\u7edd\u7b56\u7565\u5c31\u53ef\u4ee5\u4e86\uff1b\u540e\u8005\u5219\u9664\u4e86\u5728host.allow\u4e2d\u6dfb\u52a0\u5141\u8bb8\u7b56\u7565\u4e4b\u5916\uff0c\u8fd8\u9700\u8981\u5728hosts.deny\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u201cALL\uff1aALL\u201d\u7684\u62d2\u7edd\u7b56\u7565\u3002<\/p>\n
\u793a\u4f8b\u5982\u4e0b\uff1a
\n\u73b0\u5728\u53ea\u5e0c\u671b\u4eceIP\u5730\u5740\u4e3a192.168.10.1\u7684\u4e3b\u673a\u6216\u8005\u4f4d\u4e8e172.16.16\u7f51\u6bb5\u7684\u4e3b\u673a\u8bbf\u95eesshd\u670d\u52a1\uff0c\u5176\u4ed6\u5730\u5740\u88ab\u62d2\u7edd\uff0c\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n[root@CentOS<\/a>01 ~]# vim \/etc\/hosts.allow\r\nsshd:192.168.10.1 172.16.16.*\r\n[root@centos01 ~]# vim \/etc\/hosts.deny\r\nsshd:ALL\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"TCP Wrappers\u5c06TCP\u670d\u52a1\u7a0b\u5e8f\u201c\u5305\u88f9\u201d\u8d77\u6765\uff0c\u4ee3\u4e3a\u76d1\u542cTCP\u670d\u52a1\u7a0b\u5e8f\u7684\u7aef\u53e3\uff0c\u589e\u52a0\u4e86\u4e00\u4e2a\u5b89\u5168\u68c0\u6d4b\u8fc7\u7a0b\uff0c\u5916 […]<\/p>\n","protected":false},"author":1466,"featured_media":110446,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-168333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/168333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1466"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=168333"}],"version-history":[{"count":6,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/168333\/revisions"}],"predecessor-version":[{"id":168657,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/168333\/revisions\/168657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/110446"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=168333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=168333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=168333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}