﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>运维部落 &#187; vsftpd</title>
	<atom:link href="http://help.vps12.com/tag/vsftpd/feed" rel="self" type="application/rss+xml" />
	<link>https://help.vps12.com</link>
	<description>分享服务器运维及实践解决方案</description>
	<lastBuildDate>Sat, 25 Jan 2025 07:14:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>CentOS下安装fail2ban防暴力破解工具（转）</title>
		<link>https://help.vps12.com/1164.html</link>
		<comments>https://help.vps12.com/1164.html#comments</comments>
		<pubDate>Sun, 15 Jun 2014 02:53:42 +0000</pubDate>
		<dc:creator>vps12.com</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[解决方案]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[vps12.com]]></category>
		<category><![CDATA[vsftp]]></category>
		<category><![CDATA[vsftpd]]></category>
		<category><![CDATA[台湾vps]]></category>

		<guid isPermaLink="false">http://blog.vps12.com/?p=1164</guid>
		<description><![CDATA[CentOS下安装fail2ban防暴力破解工具： 前言：首先说说为什么笔者会想到写这篇博客，源于昨天下午，突然收到Nagios的报警邮件，说邮件服务器的进程数超过阀值。于是赶紧登录上去查看。 这里说下分析的过程： 1.既然说进程数超过阀值，肯定先查看进程：ps -ef； 2.如果不能即时看到问题，那就动态显示：top，看看究竟是哪个程序占用这么多进程； 3.最后确定了应该是courier-imap，但还不知道是什么原因导致； 4.查看ip连接，确认是否是其存在问题：netstat -ant，发现有大量的110连接； 5.既然是收信服务，那就赶紧追踪查看邮件日志：tail -f /var/log/maillog； 6.发现问题：日志里有大量的登录错误信息，发现是同一ip，并在用不同的用户名密码来暴力破解 7.稍等一会，确定目标IP后，将其ip的包丢弃：iptables -I INPUT -s 176.61.143.41 -j DROP #此ip为真实攻击ip，所以在此曝光 8.稍等一会，再次查看进程，进程数有明显下降，故障解决。 介于这种安全隐患的存在，我们以后可以利用fail2ban来实现防暴力破解，防止恶意攻击。 下面就来说说fail2ban具体是什么。 简介： fail2ban可以监视你的系统日志，然后匹配日志的错误信息（正则式匹配）执行相应的屏蔽动作（一般情况下是调用防火墙屏蔽），如:当有人在试探你的SSH、SMTP、FTP密码，只要达到你预设的次数，fail2ban就会调用防火墙屏蔽这个IP，而且可以发送e-mail通知系统管理员，是一款很实用、很强大的软件！ 功能和特性： 1、支持大量服务。如sshd,apache,qmail,proftpd,sasl等等 2、支持多种动作。如iptables,tcp-wrapper,shorewall(iptables第三方工具),mail notifications(邮件通知)等等。 3、在logpath选项中支持通配符 4、需要Gamin支持(注：Gamin是用于监视文件和目录是否更改的服务工具) 5、需要安装python,iptables,tcp-wrapper,shorewall,Gamin。如果想要发邮件，那必需安装postfix或sendmail 核心原理： 其实fail2ban就是用来监控，具体是调用iptables来实现动作！ 好了，那下面来说说具体怎么安装、部署吧。 一、首先是服务安装 首先配置yum源，这里采用的是yum直接装（也可源码安装） vim /etc/yum.repos.d/CentOS-Base.repo 在最后新增： [atrpms] name=Red Hat Enterprise Linux $releasever &#8211; $basearch &#8211; ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1 enabled=1 [...]]]></description>
		<wfw:commentRss>https://help.vps12.com/1164.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux下使用vsftp建立ftp服务</title>
		<link>https://help.vps12.com/150.html</link>
		<comments>https://help.vps12.com/150.html#comments</comments>
		<pubDate>Wed, 02 Nov 2011 16:05:45 +0000</pubDate>
		<dc:creator>vps12.com</dc:creator>
				<category><![CDATA[VPS新手指南/教程]]></category>
		<category><![CDATA[vsftp]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://blog.vps12.com/?p=150</guid>
		<description><![CDATA[一般linux下上传下载文件有很多方式有ssh的有ftp的。 ssh下我们使用scp软件，这里不表，我们今天来说下来使用vsftp软件建立ftp服务上传下载文件。 运行以下命令 ?View Code SHELL1 yum install vsftpd 安装好后，先别启动服务，先进入配置文件设置下。 ?View Code SHELL1 2 cd /etc/vsftpd/conf vi /etc/vsftpd/vsftpd.conf 在vsftpd 设置 /etc/vsftpd/vsftpd.conf 加入以下一行 chroot_local_user=YES      //锁定用户目录 max_clients=0              //0表示不限制并发连接数一般不用加入 anonymous_enable=YES  这个要改成NO不然谁都能上传了呵呵。安全 好现在我们建立ftp用户登陆，一般不使用root进行登陆！比如我们网站放在/var/www/html目录 建立用户 ?View Code SHELL1 useradd ftpup 设置密码 ?View Code SHELL1 passwd ftpup 设置权限 ?View Code SHELL1 2 usermod -s /sbin/nologin -d /var/www/html -g ftp ftpup chown [...]]]></description>
		<wfw:commentRss>https://help.vps12.com/150.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
