Freshly Pressed: 443 Posts, 384 Comments and 1,799,212 Views on Zhaoke Blog.

Happy New Year 2011!

Keyword: ,

  Update

  No Comments

  Permanent Link

  732 Views

Setting up OpenVPN on Fedora Core 11 Linux and Windows 7 Ultimate 64-bit

Article Last Updated: 2009-11-30 2:32PM zhaoke

OpenVPN is a free and open source virtual private network (VPN) program for creating point-to-point or server-to-multiclient encrypted tunnels between host computers.

This guide provides step-by-step instructions for how to setup an OpenVPN server and client, and you will be able to connect Windows 7 RTM 64-bit desktop computer to The Fedora Core 11 Linux Server.

[root@islab ~]# cat /etc/redhat-release
Fedora release 11 (Leonidas)

[root@islab ~]# rpm -qa|grep openvpn
openvpn-2.1-0.32.rc15.fc11.i586

1. Installing OpenVPN 2.1 Server on Fedora Core 11 Linux

1.1 Preparing the Network

The server ip is 210.77.100.1, running Fedora Core 11 Linux with OpenVPN 2.1, The Desktop has a dynamic IP address, running Windows RTM 64-bit with OpenVPN GUI 1.0.3.

Linux DNS Settings:

[root@islab ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 210.77.102.5
nameserver 210.77.103.5

1.2 Preparing the System

OpenVPN installation on Fedora makes use of the yum, wget and rpm commands assume you installed both yum and rpm. Log in as the root user and issue the following command:

[root@islab ~]# yum update;yum install wget -y

Futhermore get a few additional packages:

openssl
openssl-devel
lzo
lzo-devel
pam
pam-devel
Read More »

Keyword: ,

  linux

  No Comments

  Permanent Link

  8,115 Views

虚拟世界用户对林登实验室是否将公开上市持有不同意见

看了一下新世界博客, Wagner James Au发布了一个有关林登实验室是否将在接下来18个月公开上市的用户调查. 根据林登实验室近来一系列的调整, 还有首席执行官Philip Rosedale逐步走向幕后. 我们来看一下读者是怎么回应调查的:
Read More »

Keyword: , , , , ,

  易思项目

  No Comments

  Permanent Link

  2,141 Views

通过PHP网页查看服务器上进程的状态

网址:
http://xen.islab.org/test/ps.php

上面网页提供了两个实例:

1. 查看当前http活动连接数.
2. 查看httpd进程的状态.

注: 输出数据每隔15秒钟刷新一次.

Keyword: , ,

  linux

  2 Comments

  Permanent Link

  3,466 Views

压缩php构建的网站: 部署和测试

本文主要介绍如何在php网页中使用ob_start()和ob_gzhandler()函数压缩网页, 并测试压缩效果.

1. 准备

首先查看php是否支持zlib module, 检查phpinfo()信息或者拷贝下面代码到info.php中:

[code]
phpinfo();
?>
[/code]

然后把info.php上传到您的web服务器上, 打开您的浏览器, 访问info.php网页, 查看zlib部分. 如果zlib已安装, 如下图所示:
Read More »

Keyword: , , ,

  linux

  1 Comment

  Permanent Link

  4,196 Views

使用Python脚本查看Linux上的进程信息

平台: Python 2.4.4, Fedora Core 6

Python是一门易学, 开源的脚本语言, 下面介绍使用Python脚本查看Linux上的进程信息.

Python模块是Python语言中的一个重要概念,比如commands模块主要封装了命令相应的方法及数据. 我们可以通过import指令导入模块. 下面实例中用到了命令, 系统和字符串模块.

Queryprocess.py的主要功能是查看Linux上指定进程的控制终端(tty), 所有者(uid), 进程号(pid), 父进程号(ppid)和进程开始运行时间(stime).

创建python脚本文件queryprocess.py
Read More »

Keyword: ,

  linux

  No Comments

  Permanent Link

  6,615 Views

linux上su的几点安全建议

平台: Fedora Core release 6

基础:

首先我们看su在man帮助页中的解释su - run a shell with substitute user and group IDs, 也就是说通过su我们不用提供用户和组名就可以启动一个shell程序. su是一个二进制的可执行文件, 命令所在的文件路径是/bin/su, 下面是通过命令行查询su文件的类型及所在路径:

例一:
islab$ which su
/bin/su

例二:
islab$ file /bin/su
/bin/su: setuid ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, stripped
Read More »

Keyword: , ,

  linux

  No Comments

  Permanent Link

  3,871 Views

2007年Linux内核峰会出席人员列表

Dave Jones在他的个人博客上公布了今年Linux内核峰会出席人员列表. 列表从这里下载.

Keyword: ,

  linux

  No Comments

  Permanent Link

  3,352 Views

小技巧: 使用shell命令修改多个文件

注: 下面所有命令已在bash shell环境中测试

实例一: 修改当前目录所有的*.php5为*.php文件.

方法一

for old in *.php5; do cp $old `basename $old .php5`.php; done

使用循环语句发现当前目录的所有*.php5文件, 然后一个接一个的修改为*.php文件, 直到结束.
比如当前目录存在两个*.php5文件:
$ ll
total 8
-rw-rw-r– 1 zhaoke zhaoke 3 Aug 20 07:58 islab.php5
-rw-rw-r– 1 zhaoke zhaoke 3 Aug 20 08:10 zhaoke.php5

首先找到当前目录的islab.php5文件, 然后拷贝islab.php5, ‘basename islab.php5 .php5′ .php
basename将返回”islab”字符, 然后增加.php到islab后面, 最后你得到islab.php文件.

Read More »

Keyword: , ,

  linux

  1 Comment

  Permanent Link

  5,153 Views

使用SELinux阻止Mambo攻击

Linux杂志发布了一篇有趣的文章, 使用SELinux阻止Mambo攻击, 作者是Richard Bullington-McGuire.

什么是Mambo? Mambo是一个用PHP开发的内容管理系统(CMS). 在某些地方, 病毒能够对系统进行攻击, 其中病毒就能顺利地破坏Richard的操作系统. 文章详细描述了如何使用SELinux发现和控制缺口.

文章还演示了SELinux的一个核心目标: 阻止恶意软件利用受病毒感染的软件来破坏系统. 在本实例中, 第三方的PHP应用程序能够对系统产生一定的负载, 但是这些负载可以控制, 将不会对系统进行任何破坏.

这篇文章对于计算机鉴识过程来说也非常具有参考价值.

Read More »

Keyword: , ,

  linux

  No Comments

  Permanent Link

  4,875 Views