<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>走出Windows &#187; 网络相关</title>
	<atom:link href="http://www.killwin.com/articles/category/network/feed" rel="self" type="application/rss+xml" />
	<link>http://www.killwin.com</link>
	<description>抛弃Windows就是走向高效率</description>
	<lastBuildDate>Fri, 23 Sep 2011 12:50:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>又是邮件问题</title>
		<link>http://www.killwin.com/articles/408.html</link>
		<comments>http://www.killwin.com/articles/408.html#comments</comments>
		<pubDate>Tue, 30 Aug 2011 13:26:41 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=408</guid>
		<description><![CDATA[最近接二连三邮件出问题，前几天，买了个bluehost，安装有wordpress blog程序，昨天安装了个contact form 7的联系插件，使用的是blog程序的域名邮箱，可是邮件一直发送失败，上网搜索，竟没有很好的答案，在bluehost面板里面找，找到个“电子邮件递送路径”，点进去看看，追踪一下，提示“virtual_aliases via virtual_aliasesrouter forced address failure”，貌似是说发往本地的邮件，可是我没用bluehost的邮箱啊，再找找，发现个“MX输入”，估计是添加域名MX记录的，点进去，果然，可以管理域名的解析记录，估计是bluehost直接在自己的服务器上解析了域名，所以邮件发不出去，添加了我在GD那边的正确的记录，然后再发送，果然成功了，bluehost为客户想的太周到了，什么都做好了，结果导致这个问题，又是找了很久的原因]]></description>
			<content:encoded><![CDATA[<p>最近接二连三邮件出问题，前几天，买了个bluehost，安装有wordpress blog程序，昨天安装了个contact form 7的联系插件，使用的是blog程序的域名邮箱，可是邮件一直发送失败，上网搜索，竟没有很好的答案，在bluehost面板里面找，找到个“电子邮件递送路径”，点进去看看，追踪一下，提示“virtual_aliases via virtual_aliasesrouter forced address failure”，貌似是说发往本地的邮件，可是我没用bluehost的邮箱啊，再找找，发现个“MX输入”，估计是添加域名MX记录的，点进去，果然，可以管理域名的解析记录，估计是bluehost直接在自己的服务器上解析了域名，所以邮件发不出去，添加了我在GD那边的正确的记录，然后再发送，果然成功了，bluehost为客户想的太周到了，什么都做好了，结果导致这个问题，又是找了很久的原因</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/408.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>H3C ICG2000 MSR900 系列路由器策略路由配置</title>
		<link>http://www.killwin.com/articles/390.html</link>
		<comments>http://www.killwin.com/articles/390.html#comments</comments>
		<pubDate>Fri, 08 Jul 2011 13:21:19 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=390</guid>
		<description><![CDATA[话说丘老板介绍了ICG2000策略路由的配置方法，详见： http://www.h3c.com.cn/Service/Channel_Service/Operational_Service/ICG_Technology/201010/697664_30005_0.htm 这边是双出口的解决方法，但是ICG2000这种路由器，只要设置一下就能支持N口路由了，双WAN显然不是办法，要设置多wan，是要靠if-match语句来判断，下面是我配置4wan的方法 acl number 2000 rule 0 permit source 192.168.10.10 0 rule 5 permit source 192.168.10.11 0 rule 10 permit source 192.168.10.12 0 rule 15 permit source 192.168.10.13 0 rule 20 permit source 192.168.10.14 0 acl number 2100 rule 0 permit source 192.168.10.20 0 rule 5 permit source 192.168.10.21 0 rule 10 permit source [...]]]></description>
			<content:encoded><![CDATA[<p>话说丘老板介绍了ICG2000策略路由的配置方法，详见：<br />
<a href="http://www.h3c.com.cn/Service/Channel_Service/Operational_Service/ICG_Technology/201010/697664_30005_0.htm">http://www.h3c.com.cn/Service/Channel_Service/Operational_Service/ICG_Technology/201010/697664_30005_0.htm</a></p>
<p>这边是双出口的解决方法，但是ICG2000这种路由器，只要设置一下就能支持N口路由了，双WAN显然不是办法，要设置多wan，是要靠if-match语句来判断，下面是我配置4wan的方法</p>
<blockquote>
<pre>acl number 2000
 rule 0 permit source 192.168.10.10 0
 rule 5 permit source 192.168.10.11 0
 rule 10 permit source 192.168.10.12 0
 rule 15 permit source 192.168.10.13 0
 rule 20 permit source 192.168.10.14 0
acl number 2100
 rule 0 permit source 192.168.10.20 0
 rule 5 permit source 192.168.10.21 0
 rule 10 permit source 192.168.10.22 0
 rule 15 permit source 192.168.10.23 0
 rule 20 permit source 192.168.10.24 0
acl number 2200
 rule 0 permit source 192.168.10.30 0
 rule 5 permit source 192.168.10.31 0
 rule 10 permit source 192.168.10.32 0
 rule 15 permit source 192.168.10.33 0
 rule 20 permit source 192.168.10.34 0
acl number 2300
 rule 0 permit source 192.168.10.40 0
 rule 5 permit source 192.168.10.41 0
 rule 10 permit source 192.168.10.42 0
 rule 15 permit source 192.168.10.43 0
 rule 20 permit source 192.168.10.44 0

policy-based-route mypbr permit node 5
if-match acl 2000
apply output-interface Dialer 10

policy-based-route mypbr permit node 10
if-match acl 2100
apply output-interface Dialer 11

policy-based-route mypbr permit node 15
if-match acl 2200
apply output-interface Dialer 12

policy-based-route mypbr permit node 20
if-match acl 2300
apply output-interface Dialer 13

interface Vlan-interface1
ip policy-based-route mypbr</pre>
</blockquote>
<p>到此结束了，记得测试一下，完了保存哦，不然断电你就杯具了</p>
<p>顺便附带一下改N WAN的方法</p>
<blockquote>
<pre>interface Ethernet0/2
port link-mode route</pre>
</blockquote>
<p>剩下的端口自己去配置吧，出去散步，bye</p>
<p>-------------------------------------------------------------------------------------</p>
<p>7月15日更新：</p>
<p>昨天发现一个问题，那就是，如果路由器上有多个vlan，每个vlan使用不同的网段，原本默认两个vlan之间是可以互通的，启用策略路由会导致vlan之间无法互通，使用tracert命令测试发现，数据会被直接路由到外网<br />
<a href="/wp-content/uploads/2011/07/未命名_conew1.jpg"><img src="/wp-content/uploads/2011/07/未命名_conew1.jpg" alt="" title="未命名_conew1" width="499" height="128" class="alignnone size-full wp-image-396" /></a></p>
<p>解决办法就是再加一条acl，这次acl涉及到源和目的地，所以要使用acl编号为3000-3999的高级acl，这条acl是这样的：</p>
<blockquote><pre>[H3C]dis acl 3100
Advanced ACL  3100, named -none-, 1 rule,
ACL's step is 5
rule 0 permit ip source 192.168.10.0 0.0.0.255 destination 192.168.5.0 0.0.0.255</pre>
</blockquote>
<p>然后在policy-based-route最前端加一句</p>
<blockquote><pre>
[H3C]dis policy-based-route mypbr
 policy-based-route : mypbr
    Node 4 permit :
       if-match acl 3100
       apply output-interface Vlan-interface10
</pre>
</blockquote>
<p>因为我的第一条匹配是node 5 所以这次就使用node 4就好了</p>
<p>最后说明一点，本文所涉及的代码命令基本都是display出来，请勿照抄，有什么不明白可以留言</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/390.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>闽交通违章查询软件</title>
		<link>http://www.killwin.com/articles/375.html</link>
		<comments>http://www.killwin.com/articles/375.html#comments</comments>
		<pubDate>Fri, 27 May 2011 01:42:58 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=375</guid>
		<description><![CDATA[点击这里下载闽交通违法查询，需要 .NetFramework 3.0支持，本程序纯粹是一个抓取网页的东东]]></description>
			<content:encoded><![CDATA[<p>点击这里下载<a href="/wp-content/uploads/2011/05/闽交通违法查询.exe">闽交通违法查询</a>，需要 .NetFramework 3.0支持，本程序纯粹是一个抓取网页的东东</p>
<p><a href="/wp-content/uploads/2011/05/QQ截图20110527094735.jpg"><img class="alignnone size-full wp-image-379" title="QQ截图20110527094735" src="/wp-content/uploads/2011/05/QQ截图20110527094735.jpg" alt="" width="578" height="449" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/375.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>H3C ICG2000C Console线制作</title>
		<link>http://www.killwin.com/articles/370.html</link>
		<comments>http://www.killwin.com/articles/370.html#comments</comments>
		<pubDate>Wed, 04 May 2011 07:18:23 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=370</guid>
		<description><![CDATA[今天入手一台H3C ICG2000C，但是没有Console线，玩H3C没线当然不爽了，于是就自己订做一条，一端是RJ-45，一端是串口的DB-9头，按照如下方法连接 这种连接方法在ICG2000C上测试成功，不过网上也有一种说法，如下 如果第一种不行，大家可以试试第二种]]></description>
			<content:encoded><![CDATA[<p>今天入手一台H3C ICG2000C，但是没有Console线，玩H3C没线当然不爽了，于是就自己订做一条，一端是RJ-45，一端是串口的DB-9头，按照如下方法连接</p>
<p><a href="/wp-content/uploads/2011/05/QQ截图20110504150850.jpg"><img class="alignnone size-full wp-image-371" title="QQ截图20110504150850" src="/wp-content/uploads/2011/05/QQ截图20110504150850.jpg" alt="" width="531" height="498" /></a></p>
<p>这种连接方法在ICG2000C上测试成功，不过网上也有一种说法，如下</p>
<p><a href="/wp-content/uploads/2011/05/20110504151732.jpg"><img class="alignnone size-full wp-image-372" title="20110504151732" src="/wp-content/uploads/2011/05/20110504151732.jpg" alt="" width="507" height="183" /></a></p>
<p>如果第一种不行，大家可以试试第二种</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/370.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu做单臂路由实现跨网段访问</title>
		<link>http://www.killwin.com/articles/325.html</link>
		<comments>http://www.killwin.com/articles/325.html#comments</comments>
		<pubDate>Tue, 09 Nov 2010 15:51:27 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=325</guid>
		<description><![CDATA[公司有4条宽带，各条宽带分别独立，这样一点很不爽的地方就是办公室里面传文件速度跟蜗牛一样，而且传文件的时候还影响网速，解决方法有两种，第一种，将所有网段连起来，子网掩码设置255.255.0.0，就可以互相通讯了，可是这样的大网段看着不舒服，解决办法2就是购入专业的三层交换机或者路由器，这显然不现实，因为成本太高，于是我把目光瞄向办公室的一台闲置电脑，里面的系统正好是ubuntu server版，直接拿来用。本来我想装4片网卡实现的，可是这不争气的主板却只有2个pic插槽，加上板载网卡，一共才3个，不够用，于是想起了虚拟网卡加单臂路由，说干就干，开始配置。 首先查看你的系统是否支持802.1Q，必须支持802.1Q才可以让vlan互通。 执行如下命令 lsmod &#124; grep 8021q 看看有没有，没哟的话，执行下面的命令 apt-get install vlan sh -c 'grep -q 8021q /etc/modules &#124;&#124; echo 8021q >> /etc/modules' 为网卡添加虚拟ip 编辑 /etc/network/interfaces 内容大致如下 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.4.254 netmask 255.255.255.0 gateway 192.168.4.1 auto eth0:0 iface eth0:0 inet static address 192.168.1.254 netmask 255.255.255.0 [...]]]></description>
			<content:encoded><![CDATA[<p>公司有4条宽带，各条宽带分别独立，这样一点很不爽的地方就是办公室里面传文件速度跟蜗牛一样，而且传文件的时候还影响网速，解决方法有两种，第一种，将所有网段连起来，子网掩码设置255.255.0.0，就可以互相通讯了，可是这样的大网段看着不舒服，解决办法2就是购入专业的三层交换机或者路由器，这显然不现实，因为成本太高，于是我把目光瞄向办公室的一台闲置电脑，里面的系统正好是ubuntu server版，直接拿来用。本来我想装4片网卡实现的，可是这不争气的主板却只有2个pic插槽，加上板载网卡，一共才3个，不够用，于是想起了虚拟网卡加单臂路由，说干就干，开始配置。<br />
<span id="more-325"></span><br />
首先查看你的系统是否支持802.1Q，必须支持802.1Q才可以让vlan互通。</p>
<p>执行如下命令</p>
<blockquote><p>lsmod | grep 8021q</p></blockquote>
<p>看看有没有，没哟的话，执行下面的命令</p>
<blockquote><p>apt-get install vlan<br />
sh -c 'grep -q 8021q /etc/modules || echo 8021q >> /etc/modules'</p></blockquote>
<p>为网卡添加虚拟ip</p>
<p>编辑 /etc/network/interfaces 内容大致如下</p>
<blockquote><p>
auto lo<br />
iface lo inet loopback</p>
<p>auto eth0<br />
iface eth0 inet static<br />
address 192.168.4.254<br />
netmask 255.255.255.0<br />
gateway 192.168.4.1</p>
<p>auto eth0:0<br />
iface eth0:0 inet static<br />
address 192.168.1.254<br />
netmask 255.255.255.0<br />
gateway 192.168.1.1</p>
<p>auto eth0:1<br />
iface eth0:1 inet static<br />
address 192.168.2.254<br />
netmask 255.255.255.0<br />
gateway 192.168.2.1</p>
<p>auto eth0:2<br />
iface eth0:2 inet static<br />
address 192.168.3.254<br />
netmask 255.255.255.0<br />
gateway 192.168.3.1
</p></blockquote>
<p>保存并重启下网络，ifconfig看下，eth0已经有很多虚拟网卡了</p>
<blockquote><p>
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:c0:7d:9b<br />
          inet addr:192.168.4.254  Bcast:192.168.4.255  Mask:255.255.255.0<br />
          inet6 addr: fe80::2e0:4cff:fec0:7d9b/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:342738 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:336347 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:1000<br />
          RX bytes:390613917 (390.6 MB)  TX bytes:390082459 (390.0 MB)<br />
          Interrupt:20 Base address:0xa000</p>
<p>eth0:0    Link encap:Ethernet  HWaddr 00:e0:4c:c0:7d:9b<br />
          inet addr:192.168.1.254  Bcast:192.168.2.255  Mask:255.255.255.0<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          Interrupt:20 Base address:0xa000</p>
<p>eth0:1    Link encap:Ethernet  HWaddr 00:e0:4c:c0:7d:9b<br />
          inet addr:192.168.2.254  Bcast:192.168.2.255  Mask:255.255.255.0<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          Interrupt:20 Base address:0xa000</p>
<p>eth0:2    Link encap:Ethernet  HWaddr 00:e0:4c:c0:7d:9b<br />
          inet addr:192.168.3.254  Bcast:192.168.3.255  Mask:255.255.255.0<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          Interrupt:20 Base address:0xa000
</p></blockquote>
<p>下面添加vlan</p>
<p>执行如下命令</p>
<blockquote><p>
 vconfig add eth0 0<br />
 vconfig add eth0 1<br />
 vconfig add eth0 2
</p></blockquote>
<p>重启一下网络。</p>
<p>这时vlan之间还不能相互通讯，因为linux默认不允许网卡之间转发，这时，编辑 /etc/sysctl.conf 找到 net.ipv4.ip_forward 取消注释，并让其值等于1,，保存退出，执行 </p>
<blockquote><p>sysctl -p</p></blockquote>
<p>最后一步非常重要，因为我们的默认网关都是 192.168.1.1 192.168.2.1之类的，而路由器的ip是192.168.1.254 192.168.2.254之类的，所以要访问其他网段之前必须让路由器知道访问其他网段要找 192.168.x.254，所以添加静态路由表，这步很简单，不会的童鞋下面留言吧。</p>
<p>ok，所有工作完成，试试看，QQ传输文件的速度已经快了很多了，不过有一点要注意，连接所有网段的交换机必须是支持vlan的，否则dhcp报文会乱窜，等下ip就乱七八糟了，我今天就花了60大洋买了个二手的 TL-SF1008V，虽然功能不是很强，但是这个交换机的vlan功能已经够用了，打卡vlan开关，1-7口分别属于一个vlan，8口是trunk口，所以8口接路由器，其他口连接各个网段</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/325.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BELKIN 7231-4P 64M版 刷DD-WRT 恢复出厂后要执行的命令</title>
		<link>http://www.killwin.com/articles/320.html</link>
		<comments>http://www.killwin.com/articles/320.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 04:38:09 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=320</guid>
		<description><![CDATA[nvram set sdram_init=0x0008 nvram set sdram_config=0x0033 nvram set sdram_ncdl=0x0000 nvram set ip_conntrack_max=65536 nvram commit]]></description>
			<content:encoded><![CDATA[<p>nvram set sdram_init=0x0008<br />
nvram set sdram_config=0x0033<br />
nvram set sdram_ncdl=0x0000<br />
nvram set ip_conntrack_max=65536<br />
nvram commit</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/320.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDoS 遭遇记</title>
		<link>http://www.killwin.com/articles/202.html</link>
		<comments>http://www.killwin.com/articles/202.html#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:58:26 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[网络相关]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=202</guid>
		<description><![CDATA[2010年3月8日22点34分42秒，朋友赵小猫QQ发来消息说编辑帖子就会500 - Internal server error，2010年3月9日上班时，同事说报告文件无法上传，也是提示500错误，经过查看发现服务器/var 的10G空间已经满满的了，习惯的备份并删除之，后来感觉不对劲，再查看一下，发现nginx日志以每秒2M的速度上涨，这就不正常了，查看日志，发现，有人总是访问一个不存在的页面，而且useragent并不是主流浏览器 183.2.109.60 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" - 123.171.5.7 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" - 124.163.139.83 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" - 59.55.47.46 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 [...]]]></description>
			<content:encoded><![CDATA[<p>2010年3月8日22点34分42秒，朋友<a href="http://www.langmengbbs.com" target="_blank">赵小猫</a>QQ发来消息说编辑帖子就会500 - Internal server error，2010年3月9日上班时，同事说报告文件无法上传，也是提示500错误，经过查看发现服务器/var 的10G空间已经满满的了，习惯的备份并删除之，后来感觉不对劲，再查看一下，发现nginx日志以每秒2M的速度上涨，这就不正常了，查看日志，发现，有人总是访问一个不存在的页面，而且useragent并不是主流浏览器</p>
<blockquote><p>183.2.109.60 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
123.171.5.7 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
124.163.139.83 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
59.55.47.46 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
113.128.132.41 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
122.230.11.56 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
117.59.46.176 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
112.4.161.20 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
110.16.129.42 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -<br />
119.101.102.145 "09/Mar/2010:03:25:56 +0000" "GET /contribute.php HTTP/1.1" 403 169 "-" "Mozilla/3.0 (compatible; Indy Library)" -</p></blockquote>
<p>这是其中一段日志，可以看出，访问速度非常之快，当时就怀疑是被CC攻击了，由于对服务器影响并不大，所以没有重视，3月10日上午对公司网站功能模块进行了更新，下午突然发现网站访问速度变慢，起初以为是网站功能模块编写不恰当造成卡机，但是后来进行本地测试并没有发现这个问题，10 日下午3点左右，服务器突然无法访问了，联系机房后得知是被攻击，攻击流量超过1G，这里援引客服的话</p>
<blockquote><p>尊敬的客户：<br />
您好，请查看附件这个是您机器遇到攻击的流量，这只能为您划出的交换机上的流量 （最大100M），但光纤上遇到的流量已经超过1G.所以我们进行停机处理。</p>
<p><a href="/wp-content/uploads/2010/03/1.png"><img class="alignnone size-medium wp-image-203" title="1" src="/wp-content/uploads/2010/03/1-300x142.png" alt="" width="300" height="142" /></a></p></blockquote>
<p>停机后，我们对所有域名停止解析，等待一切平静，晚上9点，流量过去了，赶紧对公司主域名恢复访问，其他域名仍然是停止解析状态，回家睡觉，今天早上来到公司，大家都在议论此事，而此时一切风平浪静，公司网站访问正常，这时我将所有域名重新开启解析，本以为平安无事了，没想到没过多久，新一轮的CC攻击开始了，我们立即意识到，DDoS即将来临，赶紧叫同事把今天需要完成的订单下载下来，以防服务器被停机，暂停解析所有域名，并且通知机房做好连接日志的记录，流量刚上来，估计是域名解析生效了，没有造成太大的破坏，这时服务器还能连接上，通过查看服务器连接发现，38这个IP连接数巨大，而38这个IP是分配给<a href="http://www.l4nkor.org/" target="_blank">Vcor</a>的<a href="http://www.bhst.org" target="_blank">黑帽安全小组</a>使用，立即将38这个IP停止，并联系他本人，据他描述，由于<a href="http://www.hack58.com" target="_blank">黑客动画吧</a>想要吞并他们，但是他们拒绝了，所以黑吧就对他们的网站发动了攻击，了解到这点，我听取了<a href="http://hi.baidu.com/zyqq" target="_blank">职业欠钱</a>的建议，我启用了黑帽的域名，并且将黑帽的域名解析到了工信部，让他们去攻击，所以各位现在去访问黑帽的首页，蹦出来的就是工信部的网站了，让丫的攻击，攻击完了等着工信部去收拾你</p>
<p>以下是我们自行监视到的流量</p>
<p><a href="/wp-content/uploads/2010/03/hour.png" target="_blank"><img class="alignnone size-medium wp-image-204" title="hour" src="/wp-content/uploads/2010/03/hour-300x128.png" alt="" width="300" height="128" /></a></p>
<p>上面是按小时查看，可以很清楚的看到受到攻击的情况，后面的没有流量了说明是被机房切断了</p>
<p><a href="/wp-content/uploads/2010/03/day.png" target="_blank"><img class="alignnone size-medium wp-image-205" title="day" src="/wp-content/uploads/2010/03/day-300x128.png" alt="" width="300" height="128" /></a></p>
<p>上面是按天查看的，可以发现8-11日流量激增</p>
<p><a href="/wp-content/uploads/2010/03/month.png" target="_blank"><img class="alignnone size-medium wp-image-206" title="month" src="/wp-content/uploads/2010/03/month-300x128.png" alt="" width="300" height="128" /></a></p>
<p>上面是按月查看，可以看到，这个月才10天左右，流量就已经比上一个月多了一倍了</p>
<p>======================================</p>
<p>3月12日更新：</p>
<p>昨天晚上把Vcor的域名解析到了黑吧，结果发现他们的网站停了，今天上午把域名解析到黑吧VIP，发现VIP也停了，但是主站恢复正常</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/202.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu命令行下连接 Windows 2003 PPTP VPN服务器--译文</title>
		<link>http://www.killwin.com/articles/127.html</link>
		<comments>http://www.killwin.com/articles/127.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:05:43 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[网络相关]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PPTP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[命令行]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=127</guid>
		<description><![CDATA[引言:前段时间一直没空翻译，所以直接贴了英文版的在上面，可能难为了那些英文比我还烂的童鞋（本人至今公共英语四级未通过），今天拿来翻译下，上面一行是英文，下面一行是中文，翻译的不好的地方请大家指教 Installing the Client Program 安装客户端程序 Install PPTP Client from the Ubuntu Project: 从Ubuntu Project安装PPTP客户端 apt-get install pptp-linux 上面那行是命令，在终端输入的，不翻译了 Installing the Configuration Program 安装配置程序 Note: you may wish to skip the configuration program and configure the client by hand. 注意：你可能想要跳过安装配置程序，并且手工配置客户端 1. add the following lines to the sources list file, /etc/apt/sources.list : 1.添加下面几行到源列表，/etc/apt/sources.list # James [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>引言:前段时间一直没空翻译，所以直接贴了英文版的在上面，可能难为了那些英文比我还烂的童鞋（本人至今公共英语四级未通过），今天拿来翻译下，上面一行是英文，下面一行是中文，翻译的不好的地方请大家指教</p></blockquote>
<p>Installing the Client Program<br />
安装客户端程序<br />
Install PPTP Client from the Ubuntu Project:<br />
从Ubuntu Project安装PPTP客户端<br />
apt-get install pptp-linux<br />
上面那行是命令，在终端输入的，不翻译了<br />
Installing the Configuration Program<br />
安装配置程序<br />
Note: you may wish to skip the configuration program and configure the client by hand.<br />
注意：你可能想要跳过安装配置程序，并且手工配置客户端<br />
1. add the following lines to the sources list file, /etc/apt/sources.list :<br />
1.添加下面几行到源列表，/etc/apt/sources.list</p>
<blockquote><p># James Cameron's PPTP GUI packaging<br />
deb http://quozl.netrek.org/pptp/pptpconfig ./</p></blockquote>
<p>Note: can use a text editor, or simply cat the lines on to the end of the file using &gt;&gt;, but if you make a mistake in formatting you will likely be told by the apt-get update step.<br />
注意：你可以使用文本编辑器，或者使用  >>  cat这几行到文件末端,但是如果你的格式出错了，在apt-get update时可能会出问题</p>
<p>2. update the list of packages:<br />
2.更新包列表</p>
<p>apt-get update<br />
上面是命令</p>
<p>3. install the PPTP Client GUI:<br />
3.安装PPTP客户端GUI程序</p>
<p>apt-get install pptpconfig<br />
上面是命令</p>
<p>Note: you may be told that the packages could not be authenticated. For the moment, tell your system to install them anyway. We'll take patches to our release process if anyone can explain simply how to provide authentication.<br />
这句太麻烦，不翻译了，大概意思是如果系统提示无法验证包，请选择无论如何都安装</p>
<p>Configuration, by hand<br />
手工配置</p>
<p>1. obtain from your PPTP Server administrator:<br />
1.从你的PPTP服务器管理员处获取：</p>
<p>* the IP address or host name of the server ($SERVER),<br />
* 服务器的IP地址或名称(下面用$SERVER代替)<br />
* the name you wish to use to refer to the tunnel ($TUNNEL),<br />
* VPN连接的通道名称(下面用$TUNNEL代替)(译者注:一般情况下，通道名称可以自己起，比如我就是用vpn这三个字母做通道名称的)<br />
* the authentication domain name ($DOMAIN),<br />
* 验证域的名称(下面用$DOMAIN代替)(译者注:一般是没有这个东西，留空就好)<br />
* the username you are to use ($USERNAME),<br />
* 拨号用的用户名(下面用$USERNAME代替)<br />
* the password you are to use ($PASSWORD),<br />
* 拨号用的密码(下面用$PASSWORD代替)<br />
* whether encryption is required.<br />
* 是否要求加密</p>
<p>In the steps below, substitute these values manually. For example, where we write $PASSWORD we expect you to replace this with your password.<br />
这句话的内容都在上面的注释里了，不翻译了</p>
<p>2. create or edit the /etc/ppp/options.pptp file, which sets options common to all tunnels:<br />
2.创建或者编辑 /etc/ppp/options.pptp文件，这个是所有通道的共同设置</p>
<p>下面这个是文件的内容</p>
<blockquote><p>lock noauth nobsdcomp nodeflate</p></blockquote>
<p>3. create or add lines to the /etc/ppp/chap-secrets file, which holds usernames and passwords:<br />
3. 创建或者添加下面这些行到  /etc/ppp/chap-secrets 文件，这个文件存储用户名和密码</p>
<blockquote><p>$DOMAIN\\$USERNAME PPTP $PASSWORD * #备注:$DOMAIN可以不要</p></blockquote>
<p>Note: if you are using a PPTP Server that does not require an authentication domain name, omit the slashes as well as the domain name.<br />
这句是我上面的备注内容，不翻译了</p>
<p>Note: if the passwords contain any special characters, quote them. See man pppd for more details.<br />
注意：如果密码中有特殊字符，用双引号引起来</p>
<p>4. create a /etc/ppp/peers/$TUNNEL file:<br />
4. 创建 /etc/ppp/peers/$TUNNEL 文件内容如下</p>
<blockquote><p>pty "pptp $SERVER --nolaunchpppd"<br />
name $DOMAIN\\$USERNAME<br />
remotename PPTP<br />
require-mppe-128<br />
file /etc/ppp/options.pptp<br />
ipparam $TUNNEL</p></blockquote>
<p>Note: if you do not need MPPE support, then remove the require-mppe-128 option from this file and /etc/ppp/options.pptp.<br />
注意：如果你不需要MPPE支持，从这个文件和/etc/ppp/options.pptp删除 require-mppe-128<br />
5. start the tunnel using the pon command:<br />
5. 用pon命令连接VPN</p>
<blockquote><p>pon $TUNNEL</p></blockquote>
<p>to further diagnose a failure, add options to the command:</p>
<p>pon $TUNNEL debug dump logfd 2 nodetach</p>
<p>Note: we have further information on enabling debug mode, and on diagnosing problems.</p>
<p>6. stop the tunnel using the poff command:<br />
6. 用poff命令断开连接</p>
<blockquote><p>poff $TUNNEL</p></blockquote>
<p>注：上面的翻译已经足够连接上VPN服务器了，下面是讲创建启动脚本的，这里就不翻译了，有空继续下面的翻译</p>
<p>7. to script the tunnel connection so that something is done as soon as the tunnel is up, use either ip-up.d scripts or the updetach keyword.</p>
<p>1. see the Routing HOWTO for examples of ip-up.d scripting that adds routes or iptables rules.</p>
<p>2. using updetach will cause pppd to fork, detach, and exit with success once the network link is up. This example connects a provider link, then the tunnel, then runs fetchmail to get new e-mail:</p>
<p>pon provider updetach &amp;&amp; pon $TUNNEL updetach &amp;&amp; fetchmail</p>
<p>Note: the double ampersand &amp;&amp; means that the commands following it will only be executed if the command to the left of it was successful. If the tunnel fails to connect, the fetchmail will not happen.</p>
<p>8. to have the tunnel automatically restarted if it fails, add the option persist to either the command line or the /etc/ppp/peers/$TUNNEL file.</p>
<p>9. to have the tunnel started on system boot:</p>
<p>* for Debian Sarge and later, edit the /etc/network/interfaces file, and add this section:</p>
<p>auto tunnel<br />
iface tunnel inet ppp<br />
provider $TUNNEL</p>
<p>* for Debian Woody, edit the /etc/ppp/no_ppp_on_boot file, remove the first line comment, and change the word provider to the name of your tunnel, so that it looks like this:</p>
<p>#!/bin/sh<br />
...<br />
$PPPD call $TUNNEL</p>
<p>(The line ... means the other lines in the file, it doesn't mean a line with three dots.)</p>
<p>Then rename the no_ppp_on_boot file and make it executable:</p>
<p># mv /etc/ppp/no_ppp_on_boot /etc/ppp/ppp_on_boot<br />
# chmod +x /etc/ppp/ppp_on_boot</p>
<p>Every time your computer starts, the tunnel will be started automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/127.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Linux 路由器上安装dhcp服务器</title>
		<link>http://www.killwin.com/articles/36.html</link>
		<comments>http://www.killwin.com/articles/36.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:41:34 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[网络相关]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[路由器]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=36</guid>
		<description><![CDATA[废话不多说，直接进入正题 系统是ubuntu server 9.04 # apt-get install dhcp3-server # vim /etc/dhcp3/dhcpd.conf ddns-update-style none; option domain-name "lyun.edu.cn"; option domain-name-servers 218.193.32.1, 218.193.32.8; default-lease-time 600; max-lease-time 7200; log-facility local7; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.199; option domain-name-servers 218.183.32.1,218.193.32.8,218.85.157.99; option domain-name "lyun.edu.cn"; option routers 192.168.1.1; option broadcast-address 192.168.1.255; default-lease-time 600; max-lease-time 7200; } # vim /etc/default/dhcp3-server 把 [...]]]></description>
			<content:encoded><![CDATA[<p>废话不多说，直接进入正题</p>
<p>系统是ubuntu server 9.04</p>
<blockquote><p># apt-get install dhcp3-server</p></blockquote>
<blockquote><p># vim /etc/dhcp3/dhcpd.conf</p></blockquote>
<p><span id="more-36"></span></p>
<blockquote><p>ddns-update-style none;<br />
option domain-name "lyun.edu.cn";<br />
option domain-name-servers 218.193.32.1, 218.193.32.8;<br />
default-lease-time 600;<br />
max-lease-time 7200;<br />
log-facility local7;</p>
<p>subnet 192.168.1.0 netmask 255.255.255.0 {<br />
range 192.168.1.100 192.168.1.199;<br />
option domain-name-servers 218.183.32.1,218.193.32.8,218.85.157.99;<br />
option domain-name "lyun.edu.cn";<br />
option routers 192.168.1.1;<br />
option broadcast-address 192.168.1.255;<br />
default-lease-time 600;<br />
max-lease-time 7200;<br />
}</p></blockquote>
<blockquote><p># vim /etc/default/dhcp3-server</p></blockquote>
<p>把</p>
<blockquote><p><code>INTERFACES=""</code></p></blockquote>
<p>改成</p>
<blockquote><p><code>INTERFACES="eth1"</code></p></blockquote>
<p>重启网络</p>
<blockquote><p># /etc/init.d/networking restart</p></blockquote>
<p>DHCP服务器配置完成</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/36.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>把Linux当做路由器操作系统</title>
		<link>http://www.killwin.com/articles/19.html</link>
		<comments>http://www.killwin.com/articles/19.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 12:16:38 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[网络相关]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[路由器]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=19</guid>
		<description><![CDATA[我所在的学校使用802.1x的人证方式，每个月10元网费，有4G流量可以使用，超过1M1分钱，这TMD贵啊，但是有一点，用到40元就封顶了，这个还算人性吧，就是路由器没办法用，既然40元能封顶，而且网速还算凑合，为什么不整个宿舍使用一个账号呢？想到这里，我宿舍正好有一台电脑闲置，配置还凑合，512M 内存，2.4G CPU，40G 硬盘，跑Ubuntu的Server版是绰绰有余了，这就动手，搞成路由器！ 闲话不多说，下面看看怎么搞 系统最好能装2块网卡，一个做WAN口，一个做LAN口 首先光盘安装个Ubuntu Server的系统，哪个版本看自己喜好了，不过本人推荐使用LTS版本的，不用经常换系统 设置eth0的IP地址为校园网IP地址、eth1为内网IP（自己随便设，别冲突就好） #vim /etc/network/interfaces iface eth0 inet static address 59.77.xx.xx #改成自己的IP地址 network 59.77.72.0 #网络地址 broadcast 59.77.75.255 #广播地址 netmask 255.255.252.0 #子网掩码 gateway 59.77.72.1 #网关 auto eth0 #下面是LAN口的设置 iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 auto eth1 auto lo iface lo inet loopback 之后，常用的软件装一下，比如OpenSSH什么的，方便远程管理，现在就重点说一下怎么弄成路由器 要搞成路由器的话需要使用到NAT地址转换 首选要开启转发 #vim /etc/sysctl.conf 找到 [...]]]></description>
			<content:encoded><![CDATA[<p>我所在的学校使用802.1x的人证方式，每个月10元网费，有4G流量可以使用，超过1M1分钱，这TMD贵啊，但是有一点，用到40元就封顶了，这个还算人性吧，就是路由器没办法用，既然40元能封顶，而且网速还算凑合，为什么不整个宿舍使用一个账号呢？想到这里，我宿舍正好有一台电脑闲置，配置还凑合，512M 内存，2.4G CPU，40G 硬盘，跑Ubuntu的Server版是绰绰有余了，这就动手，搞成路由器！</p>
<p>闲话不多说，下面看看怎么搞<br />
<span id="more-19"></span><br />
系统最好能装2块网卡，一个做WAN口，一个做LAN口</p>
<p>首先光盘安装个Ubuntu Server的系统，哪个版本看自己喜好了，不过本人推荐使用LTS版本的，不用经常换系统</p>
<p>设置eth0的IP地址为校园网IP地址、eth1为内网IP（自己随便设，别冲突就好）</p>
<blockquote><p>#vim /etc/network/interfaces</p></blockquote>
<blockquote><p>iface eth0 inet static<br />
address 59.77.xx.xx #改成自己的IP地址<br />
network 59.77.72.0 #网络地址<br />
broadcast 59.77.75.255 #广播地址<br />
netmask 255.255.252.0 #子网掩码<br />
gateway 59.77.72.1 #网关<br />
auto eth0<br />
#下面是LAN口的设置<br />
iface eth1 inet static<br />
address 192.168.1.1<br />
netmask 255.255.255.0<br />
auto eth1</p>
<p>auto lo<br />
iface lo inet loopback</p></blockquote>
<p>之后，常用的软件装一下，比如OpenSSH什么的，方便远程管理，现在就重点说一下怎么弄成路由器</p>
<p>要搞成路由器的话需要使用到NAT地址转换<br />
首选要开启转发</p>
<blockquote><p>#vim /etc/sysctl.conf</p></blockquote>
<p>找到</p>
<blockquote><p>net.ipv4.ip_forward</p></blockquote>
<p>取消前面的注释，并且让其值等于1</p>
<p>保存并退出</p>
<p>执行一下</p>
<blockquote><p>#sysctl -p</p></blockquote>
<p>使其生效</p>
<p>执行</p>
<blockquote><p># iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE<br />
# iptables --append FORWARD --in-interface eth1 -j ACCEPT</p></blockquote>
<p>保存一下iptables</p>
<blockquote><p>#iptables-save &gt; /etc/iptables-rule</p></blockquote>
<p>配置好linux1x这个人证软件，然后让其开机自动启动</p>
<blockquote><p>#vim /etc/rc.local</p></blockquote>
<p>里面加一句</p>
<blockquote><p>/usr/local/bin/linux1x -d</p></blockquote>
<p>让iptables规则开机加载</p>
<blockquote><p>#vim /etc/network/interfaces</p></blockquote>
<p>加一行</p>
<blockquote><p>pre-up iptables-restore &lt; /etc/iptables-rule</p></blockquote>
<p>OK了，其实还可以再装上VPN服务器，DHCP服务器等等，下次再写吧</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/19.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

