Passive mode is always very important for ftp servers, if you are running csf firewall and cannot connect to ftp server then it means that range of passive ports is blocked in firewall. Here are simple steps
1) Add Passive Port range 30000-350000 to your Pureftp or Proftp configuration file
i) For Pure FTP
open /etc/pure-ftpd.conf, and this line
PassivePortRange 30000 35000
ii) For pro FTP
Open /etc/proftpd.conf, and add this line
PassivePorts 30000 35000
iii) Now add these ports in CSF config
Open /etc/csf/csf.conf
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,30000:35000"
iv) restart csf and ftp
service csf restart
service pureftpd restart (or)
service proftpd restart
Now you will not get error while connecting to ftp
That's it!
Showing posts with label firewall. Show all posts
Showing posts with label firewall. Show all posts
Friday, September 19, 2014
Friday, May 2, 2014
How To Unblock an IP Address in APF
Advanced Policy Firewall, or APF, is a software firewall commonly
installed on servers. It is an interface to iptables, which
is standard software for managing network ports on Linux. Interacting
with iptables can be complex, but APF greatly simplifies the process.
APF is only accessible via ssh, and there is no way to make changes in
APF through WHM or cPanel.
Pre-Flight Check
Check APF for Your IP Address
Let’s say that you want to check whether or not a specific IP address, maybe 8.8.8.8 , is blocked by APF. That’s easy!
You may receive a result similar to:
The above means that BFD detected a brute force attack from the IP 8.8.8.8 on port 25, and automatically added a rule to APF to prevent future connections specifically from that IP address
If the command is successful, you should get a result similar to:
APF then needs to be restarted for the change to take effect:
If you’d prefer a more advance firewall for APF, see our tutorial on how to install and configure CSF and its security plugin LFD (Login Failure Daemon).
Pre-Flight Check
- These instructions are intended specifically for unblocking an IP Address in APF.
- I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.
- For further details, see our in-depth look at the APF firewall.
Check APF for Your IP Address
Let’s say that you want to check whether or not a specific IP address, maybe 8.8.8.8 , is blocked by APF. That’s easy!
You may receive a result similar to:
/etc/apf/deny_hosts.rules:# added 8.8.8.8 on 04/25/14 13:42:01 with comment: {bfd.courier}
/etc/apf/deny_hosts.rules:8.8.8.8
The above means that BFD detected a brute force attack from the IP 8.8.8.8 on port 25, and automatically added a rule to APF to prevent future connections specifically from that IP address
Unblock an IP Address
If the IP address is denied in APF and you want to remove it, then use this command:
apf -u 8.8.8.8
If the command is successful, you should get a result similar to:
apf(12721): {trust} removed 8.8.8.8 from trust system
APF then needs to be restarted for the change to take effect:
apf -r
If you’d prefer a more advance firewall for APF, see our tutorial on how to install and configure CSF and its security plugin LFD (Login Failure Daemon).
Saturday, December 7, 2013
How to fix the WHM CSF security test errors!
As a part of ensuring security, we perform a CSF security scan from WHM. We may get the following error after the scan
Check csf LF_SCRIPT_ALERT option WARNING This option will notify you when a large amount of email is sent from a particular script on the server, helping track down spam scripts
To fix this error : ssh into the server and edit the csf configuration file
vi /etc/csf/csf.conf
search for LF_SCRIPT_ALERT = “0″
Change the value from “0″ to “1″ to fix the issue.
Don’t forget to restart the CSF
You may also get the following error :
Etiquetas:
cPanel/WHM,
csf,
exim,
firewall,
LF_SCRIPT_ALERT,
log_sector,
Security
Subscribe to:
Posts (Atom)
