Tác giả Chủ đề: How to install and uninstall APF firewall  (Đã xem 2013 lần)

0 Thành viên và 1 Khách đang xem chủ đề.

Ngủ rồi Admin

  • Administrator
  • Hero Member
  • *****
  • Bài viết: 707
  • Số Lần: +95/-0
    • http://vietnetwork.vn
How to install and uninstall APF firewall
« vào: Tháng Ba 13, 2011, 02:04:03 AM »
A firewall is a very good idea for a server. Though many people think that a firewall is instant protection that will do everything it really is not. A firewall will help prevent some things but it is not going to stop everything. It is just one piece of the security network that is being woven. I recommend advanced protection firewall (APF) by rfxnetworks.

APF will block unused outgoing and incoming ports. It can also be configured to use information from some block lists. The below port list will work for cPanel. For the other control panels you will need to add in the administration ports.

http://www.rfxnetworks.com/apf.php

—–command—–
cd /usr/local/src
wget http://rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxf apf-current.tar.gz
cd apf-0.*
./install.sh
—–command—–

Now edit config file
—–command—–
pico -w /etc/apf/conf.apf
—–command—–

Scroll down to the “Common ingress (inbound) TCP ports section. At this point you need to find the correct configuration for your control panel.

—–cPanel —–
IG_TCP_CPORTS=”20,21,22,25,26,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,2096″
IG_UDP_CPORTS=”21,53,873″

EGF=”1″
EG_TCP_CPORTS=”21,22,25,26,27,37,43,53,80,110,113,443,465,873,2089″
EG_UDP_CPORTS=”20,21,37,53,873″


—-Ensim —–
IG_TCP_CPORTS=”21,22,25,53,80,110,143,443,19638″
IG_UDP_CPORTS=”53″

EGF=”1″
EG_TCP_CPORTS=”21,22,25,53,80,110,443″
EG_UDP_CPORTS=”20,21,53″

—-Plesk —–

IG_TCP_CPORTS=”20,21,22,25,53,80,110,143,443,465,993,995,8443″
IG_UDP_CPORTS=”37,53,873″

EGF=”1″
EG_TCP_CPORTS=”20,21,22,25,53,37,43,80,113,443,465,873,5224″
EG_UDP_CPORTS=”53,873″


Save the file and start apf via.
—–command—–
apf -s
—–command—–

If everything still works then edit the config file and turn dev mode off. Make sure you can start a new ssh session before changing dev mode off. If you are kicked out you need to go back and look at what caused the problem!
DEVEL_MODE=”0″

Now restart APF
—–command—–
apf -r
—–command—–

Uninstall Apf Firewall :

/etc/init.d/iptables stop
rm -Rfv /etc/apf
rm -fv /etc/cron.daily/fw
chkconfig apf off
rm -fv /etc/init.d/apf
« Sửa lần cuối: Tháng Sáu 15, 2019, 05:58:07 PM gửi bởi CCNACCNP »


vnnetwork

  • bạn
Re: How to install and uninstall APF firewall
« Trả lời #1 vào: Tháng Tư 17, 2013, 11:07:15 AM »
 Tom_and_Jerry 2.gif
« Sửa lần cuối: Tháng Sáu 15, 2019, 05:58:21 PM gửi bởi CCNACCNP »


 

Related Topics

  Tiêu đề / Tác giả Trả lời Bài mới
1 Trả lời
2152 Lượt xem
Bài mới Tháng Bảy 05, 2012, 03:38:37 PM
gửi bởi CCNACCNP
1 Trả lời
1877 Lượt xem
Bài mới Tháng Bảy 16, 2012, 08:28:31 AM
gửi bởi CCNACCNP
1 Trả lời
4131 Lượt xem
Bài mới Tháng Một 16, 2019, 12:50:29 AM
gửi bởi babybum
0 Trả lời
509 Lượt xem
Bài mới Tháng Tư 08, 2018, 08:40:29 PM
gửi bởi CCNACCNP
0 Trả lời
472 Lượt xem
Bài mới Tháng Tư 15, 2018, 12:47:50 PM
gửi bởi CCNACCNP