PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : نصب csf



Vahid
September 13th, 2008, 02:47
CSF firewall commonly known as Configserver Security and Firewall has become one of the popular firewall not just because of its easy of use it also provides a cpanel interface and can be easily installed and tuned by any novice users. If you are running cpanel without firewall then CSF firewall is very much recommended, considering the security aspects of your server. You can visit the CSF firewall website (http://www.configserver.com/cp/csf.html) for more information. You can also download necessary files there.
Important Features



WHM Interface for CPanel
Firewall Running Status
Easy to Install and Administer
Brute Force Attack Prevention
One Click Server Security Checks
Port scan prevention and blocking
Intrusion detection system
Easy Installation and Configuration
IP Blocking and more..

Let us prepare a linux based server running with cpanel. Note that CSF firewall requires to remove any currently running IP based firewall (APF or other IP tables firewall). It comes with all necessary scripts that will remove APF or IP tables firewall.
Installation Steps

1. Download the package here (http://www.configserver.com/cp/csf.html)
wget <<path_of_tgz_file>>
2. Untar it
tar -zxf csf.tar.gz
3. Run the Install script.
sh /csf/install.sh
Thats it! wait until the script ends!
4. Remove APF or IPTables Firewall
If you have any existing IP tables firewall remove them using uninstall scripts located at /etc/csf. In this case i was running APF firewall and BFD in my server so i have to remove it.
sh /etc/csf/remove_apf_bfd.sh
5. Start the Firewall in Testing Mode
Start the firewall with the following command.
csf -s
// start the firewall
csf -r
// restart the firewall
csf -f
// flush the rules or stop the firewall.
If you are running a VPS plan, then you might get the error like this
"iptables LKM ip_tables missing so this firewall cannot function unless you enable MONOLITHIC_KERNEL in /etc/csf/csf.conf
Error: aborted, at line 156"
To fix:
Open the /etc/csf/csf.conf and look for a line MONOLITHIC_KERNEL = "0" and change to MONOLITHIC_KERNEL = "1"
Thats all! Now restart the firewall.
7. Specify which ports you want to allow.
It is very important to check the firewall on which ports to open and close all remaining port numbers. Open the /etc/csf/csf.conf and edit the following line with port numbers
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,953,993,995,2077 ,2078,2082,2083,2087"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,953,20 87,2089,2703"
# Allow incoming UDP ports
UDP_IN = "20,21,53,953"
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,53,113,123,873,953,6277"
21 => FTP
22 => SSH
23 => Telnet
25 => SMTP Mail Transfer
43 => WHOIS service
53 => name server (DNS)
80 => HTTP (Web server)
110 => POP protocol (for email)
443 => HTTP Secure (SSL for https:// )
995 => POP over SSL/TLS
9999 => Urchin
3306 = > MysQL Server
2082 => CPANEL Default
2083 => CPANEL - Secure/SSL
2086 => CPANEL WHM
2087 => CPANEL WHM - Secure/SSL
2095 => cpanel webmail
2096 => cpanel webmail - secure/SSL
Plesk Control Panel => 8443
DirectAdmin Control Panel => 2222
Webmin Control Panel => 10000
For more information about commonly used port numbers refer to this article (http://www.mysql-apache-php.com/ports.htm)
6. Disable the Testing Mode and Start the Firewall
Remember by default the firewall is running in testing mode. You might want to disable the firewall running in testing mode.
nano /etc/csf/csf.conf

//Look for the first line and set testing mode to "0"
TESTING = "0"

//Now restart the firewall!
csf -r
In Cpanel

If you have successfully installed the CSF firewall, then you will find this CSF Security & Firewall option within cpanel WHM at the bottom of the menu. Just click on the link and you can also edit the firewall settings inside Cpanel, which is very easy to do.
http://mysql-apache-php.com/csf01.JPG
Config Files

/etc/csf/csf.conf CSF Firewall configuration file
/etc/csf/csf.allow => Config file to allow IPs
/etc/csf/csf.deny => Config file to deny IPs
/etc/csf/ => Alert files with TXT extension are stored within this directory
Final Steps

1. Check the status of firewall inside cpanel
2. Harden the firewall security by performing the system security check. To do this go to Cpanel WHM > CSF Firewall & Security > Check System Security. There it will list WARNINGS based on your server.
Frequently Asked Questions

1. How do i know whether the firewall is running or not?

Just login to Cpanel WHM > Config Security & Firewall > Status: Running
http://mysql-apache-php.com/csf02.JPG
Another good idea is to check and see which ports have been opened and closed by firewall.
To look for open ports, just use the following commands in linux and observe which ports are open.
netstat -nap
OR
nmap fuser localhost
2. How do i Remove the CSF Firewall

Just run the uninstall script located at /etc/csf/ directory
sh /etc/csf/uninstall.sh

Nikihost
October 19th, 2008, 18:55
سلام
يه مشكل دارم موقعي كه ميخوام sh /csf/install.sh را ران كنم با اين پيغام روبرو ميشم


Configuring for OS

Checking for perl modulesfailed

You need to install the LWP perl module (libwww-perl) and then install csf

و موقعي كه tar zxvf را اجرا ميخوام مجدد ارور ميده .

tar: mod_throttle312.tgz: Cannot open: No such file or directory

tar: Error is not recoverable: exiting now

tar: Child returned status 2

tar: Error exit delayed from previous errors

Nikihost
October 19th, 2008, 23:08
چي شد ؟؟؟؟
كسي نميتونه راهنمايي كنه‌؟

persian.developer
October 20th, 2008, 23:46
چي شد ؟؟؟؟
كسي نميتونه راهنمايي كنه‌؟

yum install perl-libwww-perl

Nikihost
October 21st, 2008, 00:13
yum install perl-libwww-perl
ممنون دوست عزيز . من اينكار را انجام دادم . ولي باز هم زماني كه
tar -xzf csf.tgz

را اجرا ميكنم .
كامند لاين ان بود ميشه و هيچ خطايي رخ نميده كه مبني بر اين باشه كه كامنت شما اشتباه است يا نه

persian.developer
October 21st, 2008, 00:32
ممنون دوست عزيز . من اينكار را انجام دادم . ولي باز هم زماني كه
tar -xzf csf.tgz

را اجرا ميكنم .
كامند لاين ان بود ميشه و هيچ خطايي رخ نميده كه مبني بر اين باشه كه كامنت شما اشتباه است يا نه

dir بگیر ببین فولدرش هست؟
این cmd لیست فایل ها رو نمی گه فقط باز می کنه

Nikihost
October 22nd, 2008, 00:14
dir بگیر ببین فولدرش هست؟
این cmd لیست فایل ها رو نمی گه فقط باز می کنه
dir گرفتم فولدرش بود . بدون اينكه ان tar را كنم و نصب هم كردم . استارت هم شد ولي چگونه مياد در whm?
That's it. You can then configure csf and lfd in WHM, or edit the files
directly in /etc/csf/*

يه راهنمايي ديگه . pico را ميخوام نصبنم چون فعلا با -bash: pico: command not found چيكار كنم ؟

persian.developer
October 22nd, 2008, 01:51
dir گرفتم فولدرش بود . بدون اينكه ان tar را كنم و نصب هم كردم . استارت هم شد ولي چگونه مياد در whm?
That's it. You can then configure csf and lfd in WHM, or edit the files
directly in /etc/csf/*

يه راهنمايي ديگه . pico را ميخوام نصبنم چون فعلا با -bash: pico: command not found چيكار كنم ؟

وقتی کامل نصب بشه خودش تو whm قرار می گیره!
# ConfigServer Security&Firewall

در مورد pico هم چون ربطی به بحث نداره و ممکنه بقیه هم لازمشون بشه تو یه تاپیک دیگه می گم

Nikihost
January 21st, 2009, 13:28
سلام
یه سوال . ایا این فایروال با open vz سازگاری دارد ؟
چون من نصب و راه اندازی کردم . بعد vps را down کرد . با محمد که صحبت کردم گفتن vz با csf سازگاری نداره .
یکی دیگه فایروال معرفی کنید که این مشکل را نداشته باشه. ممنون

Nikihost
January 22nd, 2009, 11:14
:whistling:
:whistling:

evilc0d3r
April 29th, 2009, 11:29
اينجا گفته چه جوري نصب كني.
http://tutorials.ausweb.com.au/web/Tutorials/VPS-hosting-tutorials/How-to-install-CSF-Firewall-on-virtuozzo/
در ضمن كارت شبكه تو vz با اسم venet0 مشخص ميشه واسه همين فايروال ها خوب نصب نميشن بايد كارت شبكه رو به كانفيگش بدي

sodahost
November 25th, 2009, 22:16
من یک VPS با HyperVM از نوع OpenVZ ساختم
که سیستم عامل CentOS + cPanel رو نصب کردم
و حالا یه نکته اگه مراحل زیر رو انجام بدم اگر CSF رو از حالت تست خارج کنم سرور دان نمیشه ؟
و اگر دان شود چکار کنم ؟
http://tutorials.ausweb.com.au/web/Tutorials/VPS-hosting-tutorials/How-to-install-CSF-Firewall-on-virtuozzo/

Online24
November 25th, 2009, 22:19
من یک VPS با HyperVM از نوع OpenVZ ساختم
که سیستم عامل CentOS + cPanel رو نصب کردم
و حالا یه نکته اگه مراحل زیر رو انجام بدم اگر CSF رو از حالت تست خارج کنم سرور دان نمیشه ؟
و اگر دان شود چکار کنم ؟
http://tutorials.ausweb.com.au/web/Tutorials/VPS-hosting-tutorials/How-to-install-CSF-Firewall-on-virtuozzo/

نه ! چرا Down بشه ؟

sodahost
November 25th, 2009, 22:25
پس مراحل رو انجام بدم مشکلی پیش نمیاد ؟

Online24
November 25th, 2009, 22:38
پس مراحل رو انجام بدم مشکلی پیش نمیاد ؟

بله . مشکلی بوجود نمیاد .

sodahost
November 25th, 2009, 22:54
نصب و ران شد ولی
یه نکته من قبلا یادم هست
که اگر چند بار کاربری پسورد رو اشتباه میزد فایروال اونو بلوک می کرد ولی من تست کردم بلوک نکرد ؟
آیا جایی هست که تنظیم کنم ؟

Subhosting
November 26th, 2009, 02:17
csf با openVZ مشکلی نداره برای نصب.

sodahost
November 26th, 2009, 21:49
یه نکته من قبلا یادم هست
که اگر چند بار کاربری پسورد رو اشتباه میزد فایروال اونو بلوک می کرد ولی من تست کردم بلوک نکرد ؟
آیا جایی هست که تنظیم کنم ؟

IFACO.Net
November 26th, 2009, 22:13
http://255.255.255.255:2086/cgi/tweakcphulk.cgi B-)

faranetwork
April 8th, 2011, 18:38
لینک دانلود واسه centos پیدا نکردم کسی داره بده ؟

special
April 8th, 2011, 18:43
نه ! چرا Down بشه ؟
Down میشود!
OpenVZ بدلیل داشتن Share Kernel قابلیت نصب و تنظیم فایروال را به کاربران نمیدهد.

CSF اگر Start بشود،سرور مجازی شما قطعا Down خواهد شد.

---------- Post added at 06:43 PM ---------- Previous post was at 06:40 PM ----------


لینک دانلود واسه centos پیدا نکردم کسی داره بده ؟

لینک چی عزیز؟
csf?

faranetwork
April 8th, 2011, 19:01
Down میشود!
OpenVZ بدلیل داشتن Share Kernel قابلیت نصب و تنظیم فایروال را به کاربران نمیدهد.

CSF اگر Start بشود،سرور مجازی شما قطعا Down خواهد شد.

---------- Post added at 06:43 PM ---------- Previous post was at 06:40 PM ----------


لینک چی عزیز؟
csf?

آره لینک csf

special
April 8th, 2011, 20:13
بفرمایید !
این برای CSF:
http://www.configserver.com/free/csf.tgz
مابقی محصولاتشم میتوانید از سایت دانلود کنید : ConfigServer Services (http://www.configserver.com)
موفق باشید

abolfazlgoodarzi
December 30th, 2011, 15:52
بفرمایید !
این برای CSF:
http://www.configserver.com/free/csf.tgz
مابقی محصولاتشم میتوانید از سایت دانلود کنید : ConfigServer Services (http://www.configserver.com)
موفق باشید

طریقه نصب هم به صورت زیر است:
wget http://www.configserver.com/free/csf.tgz (http://www.configserver.com/free/csf.tgz)
tar -xzf csf.tgz
cd csf
sh install.sh