{"id":163,"date":"2007-07-21T22:45:15","date_gmt":"2007-07-21T14:45:15","guid":{"rendered":"http:\/\/www.liangliang.org.cn\/blog\/?p=163"},"modified":"2007-07-21T22:45:15","modified_gmt":"2007-07-21T14:45:15","slug":"vsftpd-%e4%b8%8etcp_wrapper-%e7%bb%93%e5%90%88%e9%99%90%e5%88%b6%e7%94%a8%e6%88%b7%e7%9a%84ip%e5%9c%b0%e5%9d%80%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=163","title":{"rendered":"vsftpd \u4e0eTCP_wrapper \u7ed3\u5408\u9650\u5236\u7528\u6237\u7684ip\u5730\u5740\u767b\u5f55."},"content":{"rendered":"<p>vsftpd \u4e0eTCP_wrapper \u7ed3\u5408\u5230\u4e00\u5757\u6765\u5b9e\u73b0\u8fd9\u79cd\u8981\u6c42<br \/>\n\/etc\/hosts.allow \u5b9a\u4e49\u5141\u8bb8\u7684\u5730\u5740:<br \/>\n\/etc\/hosts.deny \u5b9a\u4e49\u62d2\u7edd\u7684\u6765\u6e90\u5730\u5740.<\/p>\n<p>\u5982\u4e0b:<br \/>\n\/etc\/hosts.allow<\/p>\n<p>[root@BJFS-PIM root.adminssh]# cat \/etc\/hosts.allow<br \/>\n#<br \/>\n# hosts.allow   This file describes the names of the hosts which are<br \/>\n#               allowed to use the local INET services, as decided<br \/>\n#               by the '\/usr\/sbin\/tcpd' server.<br \/>\n#<br \/>\nvsftpd :123.103.47.0\/255.255.255.0 218.240.63.0\/255.255.255.0 59.46.172.0\/255.255.255.0 10.0.0.0\/255.0.0.0 60.2.80.0\/255.255.255.0 218.249.230.0\/255.255.255.0 160.10.0.0\/255.255.0.0 218.246.69.0\/255.255.255.0 125.35.3.0\/255.255.255.0:allow<\/p>\n<p>\/etc\/hosts.deny\u5982\u4e0b:<br \/>\n#<br \/>\n# hosts.deny    This file describes the names of the hosts which are<br \/>\n#               *not* allowed to use the local INET services, as decided<br \/>\n#               by the '\/usr\/sbin\/tcpd' server.<br \/>\n#<br \/>\n# The portmap line is redundant, but it is left to remind you that<br \/>\n# the new secure portmap uses hosts.deny and hosts.allow.  In particular<br \/>\n# you should know that NFS uses portmap!<\/p>\n<p>vsftpd : ALL : DENY<\/p>\n<p>\u5c06tcp_wrappers=yes\u6dfb\u52a0\u81f3<br \/>\n\/etc\/vsftpd\/vsftpd.conf \u4e2d<br \/>\nvi \/etc\/vsftpd\/vsftpd.conf<\/p>\n<p>tcp_wrappers=YES<\/p>\n<p>\u91cd\u65b0\u542f\u52a8vsftpd<br \/>\n[root@home vsftpd]# \/sbin\/service vsftpd restart<br \/>\nShutting down vsftpd: OK ]<br \/>\nStarting vsftpd for vsftpd: OK ] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>vsftpd \u4e0eTCP_wrapper \u7ed3\u5408\u5230\u4e00\u5757\u6765\u5b9e\u73b0\u8fd9\u79cd\u8981\u6c42 \/etc\/hosts.allow \u5b9a\u4e49\u5141\u8bb8\u7684\u5730\u5740: \/etc\/hosts.deny \u5b9a\u4e49\u62d2\u7edd\u7684\u6765\u6e90\u5730\u5740. \u5982\u4e0b: \/etc\/hosts&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-ftp"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163"}],"version-history":[{"count":0,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}