vsftpd-1.1.3配製例項之三:PER_IP_CONFIG(轉)
vsftpd-1.1.3配製例項之三:PER_IP_CONFIG(轉)[@more@] This example should quickly show you the possibilites of per-IP configuration with vsftpd's tcp_wrappers integration. This is new with v1.1.3. To use this, you need vsftpd built with tcp_wrappers! This is accomplished by editing "builddefs.h" and changing #undef VSF_BUILD_TCPWRAPPERS to #define VSF_BUILD_TCPWRAPPERS And then rebuild. If you are lucky your vendor will have shipped the vsftpd binary with this already done for you. Next, to enable tcp_wrappers integration, you need this in your vsftpd.conf: tcp_wrappers=YES And you'll need a tcp_wrappers config file. An example one is supplied in this directory: hosts.allow. It lives at /etc/hosts.allow. Let's have a look at the example: vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf vsftpd: 192.168.1.4: DENY The first line: If a client connects from 192.168.1.3, then vsftpd will apply the vsftpd config file /etc/vsftpd_tcp_wrap.conf to the session! These settings are applied ON TOP of the default vsftpd.conf. This is obviously very powerful. You might use this to apply different access restrictions for some IPs (e.g. the ability to upload). Or you could give certain classes of IPs the ability to skip connection limits (max_clients=0). Or you could increase / decrease the bandwidth limiter for certain classes of IPs. You get the point :-) The second line: Denies the ability of 192.168.1.4 to connect. Very useful to take care of troublemakers. And now you don't need xinetd to do it - hurrah. hosts.allow # # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf vsftpd: 192.168.1.4: DENY
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-957033/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- vsftpd-1.1.3配製例項之四:VIRTUAL_HOSTS(轉)FTP
- vsftpd-1.1.3配製例項之五:VIRTUAL_USERS(轉)FTP
- vsftpd-1.1.3配製例項之一:INTERNET_SITE(轉)FTP
- vsftpd-1.1.3配製例項之二:INTERNET_SITE_NOINETD(轉)FTP
- vsftpd-1.1.3配製檔案vsftpd.conf(轉)FTP
- 基本複製應用例項(轉)
- unix freebsd 配製檔案(轉)
- APIHOOK例項剖析 (轉)APIHook
- 超好用的網路抓包框架(Windivert)之三(例項一)框架
- 資料流圖繪製例項
- canvas繪製扇形程式碼例項Canvas
- canvas繪製星星程式碼例項Canvas
- canvas 繪製雞蛋程式碼例項Canvas
- 演示中斷處理的例項(例項六)(轉)
- oracle單例項轉RACOracle單例
- (轉)MySQL優化例項MySql優化
- 網站綜合例項(轉)網站
- [轉]BDB例項程式碼
- 網站綜合例項 (轉)網站
- AsmL例項研究(二) (轉)ASM
- 製作PHP的RPM包例項PHP
- canvas繪製網格程式碼例項Canvas
- css繪製圓形程式碼例項CSS
- svg繪製半圓程式碼例項SVG
- canvas繪製笑臉程式碼例項Canvas
- canvas繪製圓環效果程式碼例項Canvas
- 如何將獨立例項轉換成叢集例項EU
- Python例項:僅繪製圖例而不繪製實際的圖形Python
- (轉)Python例項手冊Python
- requirejs 配製UIJS
- SVG拖動繪製矩形程式碼例項SVG
- canvas繪製米字旗程式碼例項Canvas
- canvas繪製箭頭效果程式碼例項Canvas
- jQuery複製頁面元素程式碼例項jQuery
- jQuery繪製網格效果程式碼例項jQuery
- CSS3繪製菱形程式碼例項CSSS3
- canvas繪製拋物線程式碼例項Canvas線程
- canvas繪製機器貓程式碼例項Canvas