在Debian/Ubuntu 配置PPTP VPN

一、安装 pptpd

apt-get update && apt-get upgrade -y
apt-get -y install pptpd gcc make vnstat
modprobe ip_gre && modprobe ip_conntrack_pptp && modprobe ip_nat_pptp
sed -i '$i\modprobe ip_gre && modprobe ip_conntrack_pptp && modprobe ip_nat_pptp' /etc/rc.local

二、编辑 pptpd.conf

rm -rf /etc/pptpd.conf
cat >>/etc/pptpd.conf<<EOF
option /etc/ppp/pptpd-options
localip 10.6.0.1
remoteip 10.6.0.2-254
#logwtmp
EOF

三、编辑 pptpd-options

继续阅读→

Linux Bash Shell 寻找PHP(网站)挂马,后门

一.php后门木马常用的函数大致上可分为四种类型:

1. 执行系统命令: system, passthru, shell_exec, exec, popen, proc_open
2. 代码执行与加密: eval, assert, call_user_func,base64_decode, gzinflate, gzuncompress, gzdecode, str_rot13
3. 文件包含与生成: require, require_once, include, include_once, file_get_contents, file_put_contents, fputs, fwrite
4. .htaccess: SetHandler, auto_prepend_file, auto_append_file

二.想找一个 关键词是“hellow word” 在哪些文件中有,我们用grep命令

grep –color -i -r -n “hellow word”  /data/www/

这样就能搜索出来 文件中包含关键词的文件

继续阅读→

iptables 添加,删除,查看,修改

iptables是linux系统自带的防火墙,功能强大,学习起来需要一段时间,下面是一些习iptables的时候的记录。

一,安装并启动防火墙

[root@linux ~]# /etc/init.d/iptables start  

当我们用iptables添加规则,保存后,这些规则以文件的形势存在磁盘上的,以centos为例,文件地址是/etc/sysconfig/iptables,我们可以通过命令的方式去添加,修改,删除规则,也可以直接修改/etc/sysconfig/iptables这个文件就行了。

二,添加防火墙规则

继续阅读→

如何让XenServer 6.2 虚拟机开机自动启动?

XenServer 6.2中的虚拟机默认是不会自动启动的(据说是为了防止在HA环境中出现某些异常),所以如果母鸡(宿主机)异常断电恢复启动后,所有的虚拟机均为关机状态。
但如果只是单台XenServer跑若干独立虚拟机,还是有必要让虚拟机开机自动启动的。
下面的方法可实现虚拟机开机自动启动:
一、用Citrix XenCenter登录并切换到Console —— Local Command Shell,或SSH工具(如putty、SecureCRT)登录到XenServer;

继续阅读→