5月 302011
 

作者: linux deepin

2011年5月27日,我们收到通知,机房和域名注册商将停止deepin.org的解析和接入。经过一些了解,大概的原因如下:
几个月前,一位不知名的朋友写了一篇文章, 描述如何在linux deepin系统下使用内置的SSH代理脚本访问国外受限网站的配置方法。这篇文章后来又被转载到一些国外的博客上,造成有关部门认为Linux Deepin的制作目的是用来访问受限网站,导致了目前域名被限制访问的结果。

需要说明的是,这次被停止解析域名,相当的意外。:
1.该脚本并不能提供直接访问受限网站的功能。没有自己的SSH账号,即使了解这个方法,也不可能直接用它访问国外受限网站。
2.文章最初是一个不知名的用户撰写并发在自己的博客上,我们从未发表在自己的网站上,也没有对这个技术进行公开说明和宣传。
3.从技术层面上说,这个方法在任何一个Linux系统上都可以使用,所有的linux发行版都有提供类似技术的嫌疑(每个linux发行版都内置了SSH这个命令)。

目前我们能做的:
1.将域名和服务器放到国外,但不能排除以后再次**扰的情况。
2.更换网站域名和发行版域名,不再叫linux deepin,因为我们无法联系国外网站删除这些文章,也就是说linux deepin可能会被有关部门一直认为有问题。

虽然不希望一个由中国人自己做的Linux发行版不得不放到国外,或者因为这么一个奇怪的原因而改名,但好像目前除了上面的办法别无他法。我们正在准备 linxudeepin.com的域名和网站,预计3天后先恢复相应的发布和资料页面,以便大家能获得后续的信息。

无论遇到什么样的困难,我们都不会放弃在中国制作一个有国际影响力的Linux主流发行版的目标.

5月 302011
 

Linux Deepin是国人制作的ubuntu中文衍生版,原名为Hiweed,2009年改名为Linux Deepin。官方网站linux.deepin.org在2011年5月27日被域名注册商”厦门易名网络“停止解析,且主机被托管商停止接入。

原因是有人写了一篇如何在linux deepin上翻墙的文章。从技术层面上说,翻墙方法在任何一个Linux发行版上都可以使用。目前不清楚其它发行版是否会受此影响。

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月 092010
 

【51CTO独家特稿】随着IT技术在上世纪90年代开始在中国普及,这个产业也簇生了国内第一批系统管理员、网络管理员的诞生。相对于现在无所不在的以Windows为基础的企业网络和奔跑在无数Linux服务器上的网站,90年代的IT基础架构还处于非常原始的状态。互联网进入国内差不多是 1995年左右,而1999年正是IT行业飞速发展的一个转折点。那个时候的技术人们,无论是开发者还是运维们,虽然可以获取的资讯和技术知识相对贫乏,但是那时的人们都充满着对技术的热情,投入到新技术的学习和使用当中。

国内著名的Linux专家曹江华老师,就是1999年投入到运维领域的。51CTO系统频道近日对曹江华老师进行了邮件专访,请曹江华老师谈了谈自己的职业发展经历。一方面让大家了解一下那个时候的系统运维的工作状况,另一方面也给现在的系统运维们分享一些学习经验(这些经验之谈可能不仅仅影响到你在Linux方面的学习)。

嘉宾简介:

曹江华,1999年开始从事构建网络、管理维护、数据库管理工作。1999年后开始接触LINUX,将工作中的经验总结后已出版《Linux服务器安全策略详解》,《Linux服务器安全策略详解》(第二版),《Red Hat Enterprise Linux 5.0服务器构建与故障排除》,《Linux系统最佳实践工具:命令行技术》四本堪称Linux系统管理员日常工具书的热销图书,目前关注开放系统和网络安全。

51CTO:首先单的介绍一下您自己吧。能否简单的介绍一下您在运维领域的经历?比如什么时候进入这行,现在在哪里工作等等。

曹江华:我毕业于工科大学机电一体化专业,当时从事的是CAD设计。后来开始从事小型数据库的应用。1999年开始从事构建网络、管理维护、数据库管理工作,1999年后开始接触LINUX成为Linux系统管理员。目前关注Linux和网络安全管理。现在是linuxpilot(现在是唯一的中文 Linux专业纸媒体了)的专栏作家和自由撰稿人。

51CTO:您最初接触系统管理员这方面的工作是怎样的情况?看您的一些介绍,好像您一开始是从事CAD设计的吧。能跟我们描述一下当时您是如何进入运维这个领域的么?您当时的工作环境是怎样的?如何学习一项新的技能呢? Continue reading »

12月 082010
 

时钟的跃变,有时候会导致很严重的问题。许多应用程序依赖连续的时钟——毕竟,这是一项常见的假定,即,取得的时间是线性的,一些操作,例如数据库事务, 通常会地依赖这样的事实:时间不会往回跳跃。

不幸的是,ntpdate调整时间的方式就是我们所说的”跃变“:在获得一个时间之 后,ntpdate使用settimeofday(2)设置系统时间,这有几个非常明显的问题:

第一,这样做不安全。ntpdate的设 置依赖于ntp服务器的安全性,攻击者可以利用一些软件设计上的缺陷,拿下ntp服务器并令与其同步的服务器执行某些消耗性的任务。由于ntpdate采 用的方式是跳变,跟随它的服务器无法知道是否发生了异常(时间不一样的时候,唯一的办法是以服务器为准)。

第二,这样做不精确。一旦 ntp服务器宕机,跟随它的服务器也就会无法同步时间。与此不同,ntpd不仅能够校准计算机的时间,而且能够校准计算机的时钟。

第三, 这样做不够优雅。由于是跳变,而不是使时间变快或变慢,依赖时序的程序会出错(例如,如果ntpdate发现你的时间快了,则可能会经历两个相同的时刻, 对某些应用而言,这是致命的)。

因而,唯一一个可以令时间发生跳变的点,是计算机刚刚启动,但还没有启动很多服务的那个时候。其余的时 候,理想的做法是使用ntpd来校准时钟,而不是调整计算机时钟上的时间。

=======
dovecot, 经常会在ntpdate修改时间后,进程会死掉,且不能自动重启.
解决dovecot的问题有2个方式,
1. 将校准时间的方式由 ntpdate 更改为ntpd(此方式会有一个daemon常驻后台)
2. 在每次执行utpdate后,延迟一段时间,自动重启dovecot服务.
(这种方式只适用于邮件服务不是关键服务的情况,如果要保证dovecot稳定运行,还是建议采用第1种方式)

在ubuntu server的脚本如下
sudo nano /etc/cron.weekly/timeupdate

然后写入
#!bin/sh
ntpdate cn.pool.ntp.org

#脚本休息120秒,然后再继续.一般来说一个星期偏差120秒已经是足够足够足够大的了.#
sleep 120
service dovecot restart

11月 232010
 

Version 1.0
Author: Falko Timme
Last edited: 02/07/2006

In this HowTo I will show how to install and configure DenyHosts. DenyHosts is a tool that observes login attempts to SSH, and if it finds failed login attempts again and again from the same IP address, DenyHosts blocks further login attempts from that IP address by putting it into /etc/hosts.deny. DenyHosts can be run by cron or as a daemon. In this tutorial I will run DenyHosts as a daemon.

From the DenyHosts web site:

“DenyHosts is a script intended to be run by Linux system administrators to help thwart ssh server attacks.

If you've ever looked at your ssh log (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, etc…) you may be alarmed to see how many hackers attempted to gain access to your server. Hopefully, none of them were successful (but then again, how would you know?). Wouldn't it be better to automatically prevent that attacker from continuing to gain entry into your system?

DenyHosts attempts to address the above… “

This tutorial is based on a Debian Sarge system, however, it should apply to other distributions with almost no modifications.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! Continue reading »

11月 142010
 

Q. Can you explain me log files in Ubuntu Linux and how do I view logs?
A. All logs are stored in /var/log directory under Ubuntu (and other Linux distro).

Linux Log files and usage

=> /var/log/messages : General log messages
=> /var/log/boot : System boot log
=> /var/log/debug : Debugging log messages
=> /var/log/auth.log : User login and authentication logs
=> /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file
=> /var/log/dmesg : Linux kernel ring buffer log
=> /var/log/dpkg.log : All binary package log includes package installation and other information
=> /var/log/faillog : User failed login log file
=> /var/log/kern.log : Kernel log file
=> /var/log/lpr.log : Printer log file
=> /var/log/mail.* : All mail server message log files
=> /var/log/mysql.* : MySQL server log file
=> /var/log/user.log : All userlevel logs
=> /var/log/xorg.0.log : X.org log file
=> /var/log/apache2/* : Apache web server log files directory
=> /var/log/lighttpd/* : Lighttpd web server log files directory
=> /var/log/fsck/* : fsck command log
=> /var/log/apport.log : Application crash report / log file