近年来最累的一次折腾。有必要好好记录一下。跟了网上N个教程,有好几个都走不通。最后自己彻底整理了一次。把自己的经验和配置分享出来。
首先隆重感谢一下至今素未谋面的老熊,真是好人啊。06年的时候就在plesk服务器换ip的事上,帮了我好大的忙。没想到这次在我卡在第6步,最绝望的时候,这只熊的婀娜身影再一次出现在了我的生活中。还在漆黑的深夜中陪伴在我的身边。以下隆重公布一下他的QQ,造福广大网友!QQ: 499*** (后几位号码,为符合当地莫名其妙的“相关法规”,被系统自动屏蔽。。。)
其次要感谢老熊的同事,百忙中写好的防火墙规则,让我10分钟之内,就被兴奋得昏了头的我,给无情覆盖了。以至于下次人家重写之后,很自觉的在/root下给留了个备份。[emot]zan[/emot] 继续阅读六步搞定centos 6下l2tp + ipsec VPN服务器配置
标签: centos
VirtualBox安装CentOS后如何安装增强功能
本机操作系统为vista,virtualbox版本为3.1.2 r56127,虚拟机为CentOS 5.4 i386。安装vitualbox增强功能的步骤:
1.启动CentOS,以root身份登录,进入桌面环境。
2.在virtualbox菜单中选择“设备–>安装增强功能”,会在桌面上出现一个“VBOXADDITIONS_3.1.2_56127”图标。
3.双击上述图标,打开文件窗口,选择“工具–>打开终端”菜单,进入终端模式。
4.执行如下命令:
#yum install kernel-devel //执行此命令提示有错误,忽略;
#yum install gcc //执行此命令提示有错误,忽略;
ln -s /usr/src/kernels/2.6.18-……-i686 /usr/src/linux //省略号处用TAB键补全
sh VBoxLinuxAdditions-x86.run
5.重启系统即可。
6.更改屏幕分辨率:
#vi /etc/X11/xorg.conf SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" "800x600" "640x480" EndSubSection
fail2ban阻止vsftpd暴力攻击失败的对策
Fail2ban is failing to ban VSFTPD bruteforce:
In my case with VSFTPD, with unresolvable DNS names from /var/log/secure:
Scenario: VSFTP configuration is set for PAM authentication, using xferlog in standard format. Fail2ban for vsftpd is watching /var/log/secure
Problem: PAM sends failed login information to /var/log/secure, but the remote server’s IP address has been replaced by a DNS name. Resulting DNS name does not resolve or does not resolve correctly, thus fail2ban is unable to ban the IP address.
Fix: Configure VSFTP for “dual_log_enable=YES”, and have fail2ban watch /var/log/vsftpd.log instead. This log file shows the incoming ip address instead of the DNS name.
[ update: you also need to adde’use_localtime=YES’ to config file of VSFTPD. otherwise, above trick not working. it took me hours to solve the problem. :(]
Source and more tips.
CentOS安装Socks5
1.配置编译环境
2.安装socks5必要的包
yum -y install gcc automake makeyum -y install pam-devel openldap-devel cyrus-sasl-devel
3.下载,编译安装ss5(socks5)
wget http://disk.boluo.org/linux/27001-ss5-3.6.1-1.tar.gz tar zxvf 27001-ss5-3.6.1-1.tar.gz cd ss5-3.6.1 ./configure make make install
可以通过修改 /etc/opt/ss5/ss5.conf 设置密码
# SHost SPort Authentication
#
auth 0.0.0.0/0 – –
# SHost SPort Authentication
#
auth 0.0.0.0/0 – u
在 /etc/opt/ss5/ss5.passwd 中添加 用户名和密码 如:
admin 123456
使用用户验证,重启ss5服务
/etc/init.d/ss5 start
CentOS中预设服务简介及精简建议
本文介绍CentOS中自带的系统进程。并给出精简建议。
转自鸟哥网站:http://linux.vbird.org/linux_basic/0560daemons.php 继续阅读CentOS中预设服务简介及精简建议
安装iftop流量监控工具
yum install libpcap-devel ncurses-devel yum install gcc wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz tar xvzf iftop-0.17.tar.gz cd iftop-0.17 ./configure -prefix=/usr/local make ; make install
iftop -n -i eth0