首頁 資料庫 mysql教程 vsftpd-1.1.3配制实例之一:INTERNET_SITE

vsftpd-1.1.3配制实例之一:INTERNET_SITE

Jun 07, 2016 pm 03:06 PM
internet 實例

This example shows how you might set up a (possibly large) internet facing FTP site. The emphasis will be on security and performance. We will see how by integrating vsftpd with xinetd, we get a powerful combination. Step 1) Set up your xi


  This example shows how you might set up a (possibly large) internet facing
  FTP site.
  The emphasis will be on security and performance.
  We will see how by integrating vsftpd with xinetd, we get a powerful
  combination.
  Step 1) Set up your xinetd configuration file.
  An example xinetd configuration file "vsftpd.xinetd" is supplied.
  To install it:
  cp vsftpd.xinetd /etc/xinetd.d/vsftpd
  Let's look at the important content in this file and see what it does:
  disable = no
  socket_type = stream
  wait = no
  This says that the service is active, and it is using standard TCP sockets.
  user = root
  server = /usr/local/sbin/vsftpd
  The server program /usr/local/sbin/vsftpd is used to handle incoming FTP
  requests, and the program is started as root (vsftpd will of course quickly
  drop as much privilege as possible). NOTE! Make sure that you have the vsftpd
  binary installed in /usr/local/sbin (or change the file path in the xinetd
  file).
  per_source = 5
  instances = 200
  For security, the maximum allowed connections from a single IP address is 5.
  The total maximum concurrent connections is 200.
  no_access = 192.168.1.3
  As an example of how to ban certain sites from connecting, 192.168.1.3 will
  be denied access.
  banner_fail = /etc/vsftpd.busy_banner
  This is the file to display to users if the connection is refused for whatever
  reason (too many users, IP banned).
  Example of how to populate it:
  echo "421 Server busy, please try later." > /etc/vsftpd.busy_banner
  log_on_success += PID HOST DURATION
  log_on_failure += HOST
  This will log the IP address of all connection attempts - successful or not,
  along with the time. If an FTP server is launched for the connection, it's
  process ID and usage duration will be logged too. If you are using RedHat
  like me, this log information will appear in /var/log/secure.
  Step 2) Set up your vsftpd configuration file.
  An example file is supplied. Install it like this:
  cp vsftpd.conf /etc
  Let's example the contents of the file:
  # Access rights
  anonymous_enable=YES
  local_enable=NO
  write_enable=NO
  anon_upload_enable=NO
  anon_mkdir_write_enable=NO
  anon_other_write_enable=NO
  This makes sure the FTP server is in anonymous-only mode and that all write
  and upload permissions are disabled. Note that most of these settings are
  the same as the default values anyway - but where security is concerned, it
  is good to be clear.
  # Security
  anon_world_readable_only=YES
  connect_from_port_20=YES
  hide_ids=YES
  pasv_min_port=50000
  pasv_max_port=60000
  These settings, in order
  - Make sure only world-readable files and directories are served.
  - Originates FTP port connections from a secure port - so users on the FTP
  server cannot try and fake file content.
  - Hide the FTP server user IDs and just display "ftp" in directory listings.
  This is also a performance boost.
  - Set a 50000-60000 port range for passive connections - may enable easier
  firewall setup!
  # Features
  xferlog_enable=YES
  ls_recurse_enable=NO
  ascii_download_enable=NO
  async_abor_enable=YES
  In order,
  - Enables recording of transfer stats to /var/log/vsftpd.log
  - Disables "ls -R", to prevent it being used as a DoS attack. Note - sites
  wanting to be copied via the "mirror" program might need to enable this.
  - Disables downloading in ASCII mode, to prevent it being used as a DoS
  attack (ASCII downloads are CPU heavy).
  - Enables older FTP clients to cancel in-progress transfers.
  # Performance
  one_process_model=YES
  idle_session_timeout=120
  data_connection_timeout=300
  accept_timeout=60
  connect_timeout=60
  anon_max_rate=50000
  In order,
  - Activates a faster "one process per connection" model. Note! To maintain
  security, this feature is only available on systems with capabilities - e.g.
  Linux kernel 2.4.
  - Boots off idle users after 2 minutes.
  - Boots off idle downloads after 5 minutes.
  - Boots off hung passive connects after 1 minute.
  - Boots off hung active connects after 1 minute.
  - Limits a single client to ~50kbytes / sec download speed.
  Step 3) Restart xinetd.
  (on RedHat)
  /etc/rc.d/init.d/xinetd restart
  If you run into problems, check:
  1) Your /etc/xinetd.d directory only has one FTP service.
  vsftpd.conf
  # Access rights
  anonymous_enable=YES
  local_enable=NO
  write_enable=NO
  anon_upload_enable=NO
  anon_mkdir_write_enable=NO
  anon_other_write_enable=NO
  # Security
  anon_world_readable_only=YES
  connect_from_port_20=YES
  hide_ids=YES
  pasv_min_port=50000
  pasv_max_port=60000
  # Features
  xferlog_enable=YES
  ls_recurse_enable=NO
  ascii_download_enable=NO
  async_abor_enable=YES
  # Performance
  one_process_model=YES
  idle_session_timeout=120
  data_connection_timeout=300
  accept_timeout=60
  connect_timeout=60
  anon_max_rate=50000
  vsftpd.xinetd
  # vsftpd is the secure FTP server.
  service ftp
  {
  disable = no
  socket_type = stream
  wait = no
  user = root
  server = /usr/local/sbin/vsftpd
  per_source = 5
  instances = 200
  no_access = 192.168.1.3
  banner_fail = /etc/vsftpd.busy_banner
  log_on_success += PID HOST DURATION
  log_on_failure += HOST
  }
  
  
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora:巫婆樹的耳語 - 如何解鎖抓鉤
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1666
14
CakePHP 教程
1425
52
Laravel 教程
1327
25
PHP教程
1273
29
C# 教程
1253
24
Python中的SVM實例 Python中的SVM實例 Jun 11, 2023 pm 08:42 PM

Python中的支援向量機(SupportVectorMachine,SVM)是一個強大的監督學習演算法,可以用來解決分類和回歸問題。 SVM在處理高維度資料和非線性問題的時候表現出色,被廣泛地應用於資料探勘、影像分類、文字分類、生物資訊學等領域。在本文中,我們將介紹在Python中使用SVM進行分類的實例。我們將使用scikit-learn函式庫中的SVM模

如何在沒有 Internet 連線的情況下設定 Windows 11 如何在沒有 Internet 連線的情況下設定 Windows 11 Apr 15, 2023 am 10:46 AM

從內部版本22557及更高版本開始,Windows11需要Internet連接才能完成首次設置,也稱為家庭版和專業版的開箱即用體驗(OOBE),儘管有一種方法可以繞過此要求完全。由於微軟希望用戶將他們的電腦連接到他們的微軟帳戶,該公司正在對最初的Windows11設定進行更改,這將使得幾乎不可能在沒有網路連線的情況下繼續執行全新安裝。或者,如果設定偵測到裝置沒有網路連接,您將被傳送到糟糕,您遺失了網路連線畫面。如果您按一下重試選項,您將看到再次連線到Internet

什麼是公網ip 什麼是公網ip Sep 27, 2021 am 10:30 AM

公網ip是指用公網連接Internet上的非保留位址,可以與Internet上的其他電腦隨意互相存取。網路上的每台計算機都有一個獨立的IP位址,該IP位址唯一確定網路上的一台計算機,這個IP位址就是指的公有IP位址。

internet的通訊協定是什麼? internet的通訊協定是什麼? Dec 24, 2020 pm 02:53 PM

Internet採用的主要通訊協定是“TCP/IP協定”,TCP/IP傳輸協議,即傳輸控制/網路協議,也叫作網路通訊協定;它是在網路的使用中的最基本的通訊協議,TCP/ IP傳輸協定對網際網路中各部分進行通訊的標準和方法進行了規定。

win11無法上網的問題如何解決?處理win11電腦無法連線到internet的方法指南 win11無法上網的問題如何解決?處理win11電腦無法連線到internet的方法指南 Jan 29, 2024 pm 08:57 PM

我們在使用電腦的時候都會連接到網絡,有了網絡我們才能上網衝浪,近期也有不少的用戶們在詢問小編win11無法連接到internet怎麼解決?用戶可以直接的打開系統給出的最佳匹配服務應用來進行設置,下面就讓本站來為用戶們來仔細的介紹一下win11電腦無法訪問internet的解決方法吧。 win11電腦無法存取internet的解決方法方法一:可以按下Win+S組合鍵,或點選底部任務欄旁的搜尋圖標,開啟Windows搜尋視窗。在搜尋框中輸入"服務",然後點選開啟系統給予的最佳配對服務應用程式。方法二

如何刪除臨時Internet文件 如何刪除臨時Internet文件 Dec 06, 2023 am 10:56 AM

刪除臨時Internet檔案步驟:1、按下win+r開啟“執行”,在執行對話方塊中輸入:%temp%指令,點選確定或回車,開啟使用者帳號臨時資料夾;2、開啟Temp資料夾後按下Ctrl+A鍵,選取全部臨時文件,右鍵點擊,在右鍵選單中點選「刪除」;3、若出現個別無法刪除的臨時檔案重新啟動電腦即可刪除。

VUE3入門實例:製作一個簡單的影片播放器 VUE3入門實例:製作一個簡單的影片播放器 Jun 15, 2023 pm 09:42 PM

隨著新一代前端框架的不斷湧現,VUE3作為一個快速、靈活、易上手的前端框架備受熱愛。接下來,我們就來一起學習VUE3的基礎知識,製作一個簡單的影片播放器。一、安裝VUE3首先,我們需要在本地安裝VUE3。開啟命令列工具,執行以下命令:npminstallvue@next接著,新建一個HTML文件,引入VUE3:&lt;!doctypehtml&gt;

internet選項打不開 internet選項打不開 Jan 16, 2024 pm 02:04 PM

internet選項打不開的操作步驟:1、開啟IE瀏覽器,點選「工具」選單,選擇「Internet選項」;2、在開啟的「Internet選項」視窗中,點選「進階」標籤;3、在「進階」標籤中,找到「重設」按鈕,點選該按鈕;4、在彈出的「重設Internet Explorer設定」視窗中,勾選「刪除個人設定」選項,然後點選「重設」按鈕; 5、等待重置完成,然後重新啟動電腦等等。

See all articles