查看單個文章
  #7  
舊 2004-11-06, 07:20 AM
dx2 dx2 目前離線
進階會員
 
註冊日期: 2003-12-02
文章: 1,590
發送 MSN 消息給 dx2 發送 Yahoo! 消息給 dx2
預設

裝apf吧。

1.用root登入 SSHt.

2. cd /usr/src

3. wget http://rfxnetworks.com/downloads/apf-current.tar.gz

4. tar -xvzf apf-current.tar.gz

5. rm -f apf-current.tar.gz

6. ls -la
看apf-xx是裝到哪裡0.9版的話應該是在目錄apf-0.9

7. cd apf-0.9

8. sh ./install.sh

9. cd /etc/apf

10.pico -w conf.apf

In order for this firewall to work properly you have to edit/add/delete ports.
These ports will allow services such as mail, ftp, and ssh to come in and out of the server.
If you have changed any ports, please modify them below and add/remove as needed.

# Common ingress (inbound) TCP ports
IG_TCP_CPORTS="20,21,22,25,53,80,110,143,443,465,
993,995,2082,2083,2086,2087,2095,2096,3306,
10000,35000_35999"
Please note that ports 2082 to port 2095 is mostly used by cpanel, and port 19638 is only use in ensim.

# Common ingress (inbound) UDP ports
IG_UDP_CPORTS="20,21,53,1040"

10.CTRL-X後輸入 Y存檔

11. 啟動apf使用 ./apf --start
或者service apf start

12. 確認正常,而且你沒被鎖在門外,繼續修改conf.apf
輸入 pico -w conf.apf

13. 設定 DEVM 參數為 0
DEVM="0"

14. CTRL-X離開,選 Y 存檔

15. 重新啟動apf
service apf restart


1. To allow connections from xx.xx.xx.xx/24
Type: pico -w /etc/apf/allow_hosts.rules

2. At the very end of the file add this line
xx.xx.xx.xx/24 Of course replace the xx.xx.xx.xx with the IP address provided to you
回覆時引用此篇文章