<?xml version="1.0" encoding="gb2312"?>
	<rss version="2.0">
		<channel>
		<title><![CDATA[ELM's Blog]]></title>
		<description><![CDATA[工作、学习、生活、娱乐......
<script type="text/javascript"><!--
google_ad_client = "pub-8011590594574316";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-01-26: CU
google_ad_channel = "1315941269";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-3155875-1";
urchinTracker();
</script>]]></description>
		<link>http://www.cublog.cn/u/2389/</link>
		<language>zh-cn</language>
		<generator>www.cublog.cn</generator>
		<copyright>Copyright 2010 ChinaUnix.Net All Rights Reserved</copyright>
		<pubDate>Fri, 03 Sep 2010 02:10:43 GMT</pubDate>
	
		<item>
			<title><![CDATA[通过iptables的recent模块保护某些私有服务]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=2185385]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 23 Feb 2010 12:14:37 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<p>以前写过一篇《<a href="http://www.wenzk.com/archives/43" target="_blank">巧用
Recent模块加固Linux安全</a>》，后来想想，其实这个题目写得不好，不应该说是加固Linux的安全，应该是加固私有服务的安全</p>
<p>同样，这篇文章也是关于通过recent模块来保护私有服务的。</p>
<p><span id="more-610"></span>对于一台裸露在互联网上的机器，随时都可能成为肉鸡，所以管理员都希望服务器快外开放的服
务（端口）越少越好，但是某些服务你又不得不对外开放，主要目的是为了自己能随时访问这些服务。</p>
<p>对于一些私有服务，如……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[巧用Recent模块加固Linux安全]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=2054945]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 18 Sep 2009 00:45:23 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<p>众所周知，Linux可以通过编写iptables规则对进出Linux主机的数据包进行过滤等操作，在一定程度上可以提升Linux主机的安全
性，在新版本内核中，新增了recent模块，该模块可以根据源地址、目的地址统计最近一段时间内经过本机的数据包的情况，并根据相应的规则作出相应的决
策，详见：http://snowman.net/projects/ipt_recent/</p>
<p>1、通过recent模块可以防止穷举猜测Linux主机用户口令，通常可以通过iptables限制只允许某些网段和主机连接Linux机器的
22/TCP端口，如果管理员IP地址经常变化，此时iptables就很难适用这样的环境了……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[免光驱，免软驱，免U盘实现用PXE远程引导安装FreeBSD]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=2049869]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 10 Sep 2009 10:54:25 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[Google上找了三天资料，终于实现免光驱，免软驱，免U盘通过PXE远程引导来安装FreeBSD了，这种PXE远<br>
<br>
程引导安装的方法非常适合没有光驱，软驱，甚至连U盘都没有的<span href="http://www.panabit.com/forum/tag.php?name=%B9%DC%C0%ED" onclick="tagshow(event)" class="t_tag">管理</span>人员。<br>
<br>
<strong>第一步:</strong><br>
<br>
在Windows环境下载需要用于远程引导安装FreeBSD<span href="http://www.panabit.com/forum/tag.php?name=%CF%B5%CD%B3" onclick="tagshow(event)" class="t_tag">系统</span>安装的……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[好久没有更新了]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=1933409]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 20 May 2009 02:04:50 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[忙忙碌碌的，不知道一天到晚在忙些什么，感觉生活和工作都不是那么的容易，本想随心所欲的做一些自己喜欢做的事情，但是残酷的现实却往往未能让你如愿。<br>最近也没有去搞VPN了，所以VPN的水平还是停留在以前的水平，跟不上时代的步伐了。<br>
		
		
		  ]]></description>
		</item>	
			<item>
			<title><![CDATA[PHP对IP地址和子网掩码的处理方法]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=1010530]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 24 Jun 2008 15:27:48 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[<code><span class="html">ip2long IP地址转换成整型。<br>long2ip 整型数据转换成IP。<br><br>子网掩码转换成掩码长度方式：<br></span></code><code><span class="html">
$slash_notation = strlen(preg_replace("/0/", "", decbin(ip2long($subnet_mask))));</span></code><br><code><span class="html"></span></code><code><span class="html">$bits=strpos(decbin(ip2long($mask)),"0");
</span></code><br><code><span class="html"><br>子网掩码位长转换成子网掩码形式：<br>$mask = 0xffffffff &lt;&lt; (32 - $mask);<br></sp……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[关于备份程序]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=526438]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 11 Apr 2008 00:21:26 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[以前都是自己写脚本用tar来实现备份，当然每个包里面重复的数据太多了，后来不用了。<br><br>之后使用BackupPC，这个东西不错，还有一个很好的web界面，用了好久。<br><br>最近看到BSD HACK书上介绍使用rsnapshot来实现远程备份，大概看了一下，可以备份到本地磁盘，也可以通过ssh复制到远程计算机。<br>具体详见 http://www.rsnapshot.org<br><br>该书介绍另外一个备份程序，叫Bacula，作者以这样的表示来向读者展示的：使用Bacula实现客户-服务器方式的跨平台备份，相比这个程序也不错吧。<br>似乎客户端也需要安装一个他的程序吧。<br>……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[BSD下的超级终端]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522843]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 08 Apr 2008 16:08:36 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[在linux下都使用minicom，bsd下还有另外一个程序，就是cu<br><br># cu -l /dev/cuaa1 -s 9600<br>-l指定COM端口，-s指定波特率<br><br>如果需要推出cu，可以使用'~'回车后退出。<br>
		
		
		  ]]></description>
		</item>	
			<item>
			<title><![CDATA[多用pax命令，甚至建议取代tar]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522845]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 08 Apr 2008 16:21:10 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[据说比tar支持更多的压缩档。<br><br>也可以去掉tar包里面的绝对路径<br># pax -A -r -s '-^/--' some_file.tar<br><br>参数-A要求pax不要自动去掉路径名中的/，因为要自己实现这一步。<br>-s 参数指定在确定目的路径名时采用ed风格的替代表达式。<br><br>复制时保留更多的属性<br><br>大家最常用的方法可能是 cp -R 和 pax -rw<br>pax -rw 保留了源文件的更多属性，如硬连接数和文件访问次数等等，具体可以使用<br># pax -rw /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep /tmp/<br># cp -R /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用密码保护单用户模式]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522842]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 09 Apr 2008 00:27:08 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[
		在：<br>Hit [Enter] to boot immediately, or any other key for command prompt.<br>Booting [/boot/kernel/kernel] in 10 seconds...<br>如果按下回车以外的其他键，就会提示<br>Type '?' for a list of commands, 'help' for more deailed help.<br>OK boot -s<br>进入单用户模式：<br><br>Enter full pathname of shell or RETURN for /bin/sh:<br>#<br><br>完成需要的修改后使用exit继续进入多用户模式。<br><br>如何阻止用户进入单用户模式呢？，修改/etc/ttys可以在进入单用户的时候提供密码：<br>console&nbsp;&nbsp;  none&……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[将/tmp/目录移到内存中]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522836]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 08 Apr 2008 15:51:47 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[优点：每次重新启动后自动清除tmp目录中的内容，读取输入提高。<br>缺点：耗内存<br><br>首先需要保证内核对md设备的支持：<br>% grep -w md /usr/src/sys/i386/conf/CUSTOM<br>device&nbsp;&nbsp;  md&nbsp;&nbsp;  # Memory&nbsp;&nbsp;  "disks"<br>像下面这样在/etc/fstab中修改/tmp行将在RAM中建立一个64M的/tmp.<br><br>md&nbsp;&nbsp;  /tmp&nbsp;&nbsp;  mfs&nbsp;&nbsp;  rw,-s64m&nbsp;&nbsp;  2 0<br><br>
		
		
		  ]]></description>
		</item>	
			<item>
			<title><![CDATA[Sharity-Light轻松共享windows资源]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522832]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Tue, 08 Apr 2008 15:46:41 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[使用SAMBA似乎太庞大了。<br><br>#cd /usr/ports/net-sharity-light<br>#make install clean<br><br>需要共享时:<br><br># shlight //somename/share /path/to/mount -U username -P password<br><br>卸载：<br><br># unshlight /path/to/mount<br><br>
		
		
		  ]]></description>
		</item>	
			<item>
			<title><![CDATA[用sed、tr、col对文本进行处理]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=522830]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 09 Apr 2008 00:29:01 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[
		利用sed向源代码中增加注释，test.sh源代码内容：<br>$ cat test.sh<br><table style="border: 1px solid rgb(153, 153, 153); width: 80%; font-size: 12px;" align="center"><tbody><tr><td>#！/bin/sh<br>#Just for test by ELM<br>#<br><br>elm-start<br>ls<br>elm-end<br><br>echo "all done"<br></td></tr></tbody></table>使用sed命令来注释elm-start和elm-end之间的内容：<br>$ sed -i '/elm-start/,/elm-end/s/^/#/' test.sh; cat test.sh<br><table style="border: 1px solid rgb(153, 153, 153); width: 80%; font-size: 1……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[如何在HP DL380 G5上挂载SCSI硬盘安装rhel4 u2（优盘版）]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=519486]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 07 Apr 2008 00:13:13 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[昨天写了一个<a href="http://www.oceanboo.cn/read.php/143.htm" target="_blank">软盘版</a>的安装方法，不过现在带DL380 G5这类服务器早不带软驱了，如果又没有外置软驱的话，是不是就束手就擒了呢？当然不。<br><br>下面来讲讲如何用优盘来挂载驱动的方法，此方法要在Linux下执行操作：<br>1.下载管网上的最新驱动。<a href="http://h50176.www5.hp.com/support/397307-AA1/more_info_local_24405.html" target="_blank">下载地址在这里</a>。<br>2.解压压缩驱动包cpq_cciss-2.6.10-13.rhel4.i686.dd.gz<br><div class="code">gzip –……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[利用U盘加载控制器驱动来安装Linux系统]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=519485]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Mon, 07 Apr 2008 00:10:25 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[　　一般我们在安装服务器过程中需要加载一些scsi卡或raid卡驱动，以便操作系统可以检测到硬盘。
<br>
<br>　　常规的安装方式是要用到软驱，其实我们也是可以通过U盘来进行加载的。
<br>
<br>　　装Linux控制器驱动往往都是*.dd或者*.img结尾的文件，我们都可以在linux下通过dd命令来写入到U盘中，比如驱动的名字为megaraid_sas.img
<br>
<br>　　假设有一台Linux机器，先把文件拷贝到/tmp,U盘的设备名为sdb。
<br>
<br>　　dd if=/tmp/megaraid_sas.img of=/dev/sdb
<br>
<br>　　cat命令也可以实现dd的作用，注意这里是sdb而……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[Windows下使用用户名密码验证的bat脚本]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=490251]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 06 Mar 2008 00:37:29 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[以前一直在找寻这样的脚本，但是一直也没有发现，最近发现在博客的留言上有一位兄弟提供了一个脚本，非常感谢这位兄弟，也没有留下任何ID，感谢这位无私的网友。<div class="blockcode"><span class="headactions" onclick="copycode($('code0'));"></span><span style="font-weight: bold;"><br></span><code id="code0">@echo off<br>
<br>
for /f "tokens=1,2,3 delims=&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;" %%i in (password.txt) do if %%i == %USERNAME% if %%j==%PASSWORD% if %%k == 1 exit /B 0<br>
<br>
exit /B 1<br>……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[Fedora Core 2 Test 3 - NFS server: server is down]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=470245]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 24 Jan 2008 00:32:40 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[在NFS Server切换到一个新机器后，发现部分机器无法mount。<br>Server系统FC2<br>F7可以正常mount，FC6提示错误，FC1提示服务关闭。<br><br>Google了一下，下面是结果：<br><br>I installed FC2T3 on one of my machines and could not mount any NFS-Dir
from my Server (SuSE 8.2). With FC1 on my other machines I have no
problem at all mounting any NFS-Dirs from the server.<br>
<br>
[root@flaneur root]# mount 192.168.1.2:/home<br>
mount to NFS server '192.168.1.2' failed: server is down.<br>
You have new mai……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[Fedora 8下无线网卡使用WPA验证启动问题]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=433107]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Thu, 29 Nov 2007 16:11:59 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[上次在 <a href="http://www.wenzk.net/bbs/thread-976-1-1.html" target="_blank">http://www.wenzk.net/bbs/thread-976-1-1.html</a> 介绍了Fedora 8下如何连接使用WPA验证的无线AP的方法。<br>
<br>
但是当我在设置成自动启动wpa_supplicant服务后，每次重新启动的时候总是无法正常启动wpa_supplicant服务，提示是No
Such file or directory，登录系统后如何启动都没有问题，真是郁闷，当然，在提示中还夹杂着什么BUS一类的提示信息。<br>
<br>
通过查看/var/log/wpa_supplicant.log发现，日志提示：Could not acquire the system……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[Fedora 8下如何配置无线使用WPA验证]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=423800]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Fri, 16 Nov 2007 04:59:31 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[首先必须安装wpa_supplicant这个软件包了。<br>
修改配置文件1<br>
[root@elm ~]# more /etc/sysconfig/wpa_supplicant <br>
INTERFACES="-ieth1"<br>
DRIVERS=""<br>
[root@elm ~]# <br>
修改配置文件2<br>
[root@elm ~]# more /etc/wpa_supplicant/wpa_supplicant.conf <br>
ctrl_interface=/var/run/wpa_supplicant<br>
ctrl_interface_group=wheel<br>
<br>
network={<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;ssid="ELM"<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;#psk="12345678"<br>
&nbsp; &nbsp;&nbsp; &nbsp……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[比威BitStream6832T交换机配置问答]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=408598]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Sat, 27 Oct 2007 03:08:39 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[
				&nbsp;&nbsp;&nbsp; 今天在NOC群里面看到有老师问关于比威交换机配置的问题，突然想到自己学校也发送来了2台比威交换机，一直没有用，通过以前发的2台交换机就发现比威的东西真怪，自己的东西还没有一个通用的配置界面标准，估计O别人的东西，没有太彻底，所以配置方式总是和原来的产品类似。<br><br>&nbsp;&nbsp;&nbsp; 找到那台万兆上联，全千兆的交换机后，发现型号是Bitstream6832T，把机器扔到一台服务器后边，接上通用Console线，打开mincom，居然乱码，来回折腾了几次都这样，简直见鬼了，最后只好找到Bitway自己带的Console……  ]]></description>
		</item>	
			<item>
			<title><![CDATA[寻求网通-教育网主机]]></title>
			<link><![CDATA[http://blog.chinaunix.net/u/2389/showart.php?id=387899]]></link>
			<author></author>
			<guid></guid>
			<category></category>
			<pubDate>Wed, 20 May 2009 02:05:27 GMT</pubDate>
			<comments></comments>
			<description><![CDATA[
		<font size="3"><span style="font-weight: bold; color: rgb(255, 1, 2);">
		&nbsp;&nbsp;&nbsp; 由于在下家里使用的是网通的网络，访问教育网速度还行，但是对于使用Putty这么简单的字符界面还是延时过大，很多时候简直无法忍受，不知哪位仁兄拥有这样的主机，可否借用用于访问教育网资源，本人保证不会占用过多的资源，因为家里宽带也就2M顶天了。</span><br style="font-weight: bold; color: rgb(255, 1, 2);"><span style="font-weight: bold; color: rgb(255, 1, 2);">&nbsp;&nbsp;&nbsp; 如果仁兄有什么要求可以私下联系，谢……  ]]></description>
		</item>	
			</channel>
	</rss>
