<?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>R2S &#187; H3C</title> <atom:link href="http://www.road2stat.com/cn/tag/h3c/feed" rel="self" type="application/rss+xml" /><link>http://www.road2stat.com/cn</link> <description>江湖一散人</description> <lastBuildDate>Thu, 26 Jan 2012 08:18:36 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Linux Mint 9 + MAC地址修改 + H3C iNode第三方客户端接入测试</title><link>http://www.road2stat.com/cn/unix_study/linux_h3c_inode.html</link> <comments>http://www.road2stat.com/cn/unix_study/linux_h3c_inode.html#comments</comments> <pubDate>Thu, 08 Jul 2010 18:21:26 +0000</pubDate> <dc:creator>Xiao Nan</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[H3C]]></category> <category><![CDATA[iNode]]></category> <category><![CDATA[MAC地址]]></category> <category><![CDATA[Mint]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[客户端]]></category> <category><![CDATA[第三方]]></category><guid isPermaLink="false">http://www.road2stat.com/cn/?p=518</guid> <description><![CDATA[一个多月没更新了, 无奈期末突击忙. 丢上来一篇没什么技术含量的. 发这篇博文时, 遇到了一个很无语的问题, 预览不能, 草稿不能保存, 反复提示HTTP 501 Method Not Implemented, 不能以ＧＥＴ方式访问post.php, Google一番后发现原来是因为主机的Apache启用了mod_security所致, 不能发表含有某些关键词的文章, 无语. 这个破烂规则就在这儿, 有兴趣的可以看看. 用了这rule以后是避免webshell了, 可是大大的影响到用户体验了 .. 所以拜此mod所赐, 本文有一句英文命令是用全角打出来的, 使用时不要直接复制, 手动打一下. 而这个关键词, 大约就是／ｅｔｃ／之流. 由于Linux Mint 9 "Isadora"基于Ubuntu 10.04制作而成, 故本文所述亦适用于Ubuntu 10.04 LTS (Lucid Lynx). 我所在的铁道校区的校园网很bt, 上网时需要使用一个叫做H3C iNode客户端进行802.1x认证, &#8230; <a href="http://www.road2stat.com/cn/unix_study/linux_h3c_inode.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>一个多月没更新了, 无奈期末突击忙. 丢上来一篇没什么技术含量的.</p><p>发这篇博文时, 遇到了一个很无语的问题, 预览不能, 草稿不能保存, 反复提示HTTP 501 Method Not Implemented, 不能以ＧＥＴ方式访问post.php, Google一番后发现原来是因为主机的Apache启用了mod_security所致, 不能发表含有某些关键词的文章, 无语.</p><p>这个破烂规则<a href="http://www.gotroot.com/downloads/ftp/mod_security/rules.conf" target="_blank">就在这儿</a>, 有兴趣的可以看看.</p><p>用了这rule以后是避免webshell了, 可是大大的影响到用户体验了 .. 所以拜此mod所赐, 本文有一句英文命令是用全角打出来的, 使用时不要直接复制, 手动打一下. 而这个关键词, 大约就是／ｅｔｃ／之流.</p><p>由于Linux Mint 9 "Isadora"基于Ubuntu 10.04制作而成, 故本文所述亦适用于Ubuntu 10.04 LTS (Lucid Lynx).</p><p>我所在的铁道校区的校园网很bt, 上网时需要使用一个叫做H3C iNode客户端进行802.1x认证, 学校又在Server端绑定了客户机的MAC地址, 而我要使用另外一台只装了Linux Mint的台式机上网, 所以简单地把认证的过程记录一下, 也让后来的同学少走些弯路.</p><p>本文假设这台暂时无法上网的机器网卡原有的MAC地址为<strong>00:11:22:33:44:55</strong>, 可以进行认证上网的网卡MAC地址为<strong>AA:BB:CC:DD:EE:FF</strong>.</p><p><span id="more-518"></span></p><h3>修改MAC地址</h3><p>如果你在原来使用Windows可以正常上网的主力机器中安装了Linux Mint或Ubuntu, 那么大可跳过这步. 而我遇到的是一种极端的情况, 完全是另外一块网卡.</p><p>打开终端, 输入ifconfig, 查看想要修改MAC地址的那块以太网卡的名字. 一般情况下是eth0, Hwaddr后面就是这块网卡目前的MAC地址, 见图1.</p><div id="attachment_501" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_1.png"><img class="size-medium wp-image-501" title="图1" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_1-300x209.png" alt="图1" width="300" height="209" /></a><p class="wp-caption-text">图1</p></div><p>打开终端, 输入ｓｕｄｏ　ｇｅｄｉｔ／ ｅｔｃ／ｉｎｉｔ．ｄ／ｒｃ．ｌｏｃａｌ, 会询问root密码. 输入密码后将弹出gedit, 在rc.local的最后添加如下指令后保存:</p><p>sudo ifconfig eth0 down<br /> sudo ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF<br /> sudo ifconfig eth0 up</p><p>至于MAC地址AA:BB:CC:DD:EE:FF, 可在Windows下的命令提示符使用命令ipconfig -all获取.</p><p>重新启动.</p><h3>修改连接信息</h3><p>重启以后, 使用ifconfig查看一下是不是已经修改好了? 如图2.</p><div id="attachment_502" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_2.png"><img class="size-medium wp-image-502" title="图2" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_2-300x209.png" alt="图2" width="300" height="209" /></a><p class="wp-caption-text">图2</p></div><p>下面暂时告别一下终端, 使用图形界面进行修改会方便一些.</p><p>在桌面右下角的那个网络连接的icon上右键, "Edit Connections...".</p><div id="attachment_503" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_3.png"><img class="size-medium wp-image-503" title="图3" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_3-300x145.png" alt="图3" width="300" height="145" /></a><p class="wp-caption-text">图3</p></div><p>在弹出窗口中选择Add, 在"Wired"这个Tab的MAC Address处填入AA:BB:CC:DD:EE:FF.</p><div id="attachment_504" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_4.png"><img class="size-medium wp-image-504" title="图4" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_4-300x286.png" alt="图4" width="300" height="286" /></a><p class="wp-caption-text">图4</p></div><p>切换到"IPv4 Settings", 设置Method为Manual(手动), 点击"Add", 在下面的Address, Netmask和Gateway处分别填入学校分配的IP地址/子网掩码/网关地址. 因为学校的政策不同, 所以可能有人不需要进行这步设置或要根据实际情况进行设置. 引用njit8021xclient的ReadMe里的一句话就是"如果你们学校配置的是动态分配IP地址, njit-RefreshIP会自动通知操作系统获取IP地址. 如果学校分配的是静态IP地址，则需要你在网络管理小程序(nm-applet)中手动设置IP地址."</p><div id="attachment_505" class="wp-caption aligncenter" style="width: 285px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_5.png"><img class="size-medium wp-image-505" title="图5" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_5-275x300.png" alt="图5" width="275" height="300" /></a><p class="wp-caption-text">图5</p></div><p>右击网络连接icon, 勾掉"Enable Networking", 即禁用网络连接. 等屏幕右上角Disconnect的提示蹦的差不多了以后, 再次勾选"Enable Networking", 启用网络连接. 然后又会出现效果很炫的提示说Connection Established ...</p><div id="attachment_506" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_6.png"><img class="size-medium wp-image-506" title="图6" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_6-300x145.png" alt="图6" width="300" height="145" /></a><p class="wp-caption-text">图6</p></div><h3>使用第三方客户端进行认证</h3><p>在可以上网的机器上, 去<a href="http://wiki.ubuntu.org.cn/%E5%8D%97%E4%BA%AC%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2802.1X%E5%AE%A2%E6%88%B7%E7%AB%AF" target="_blank">此页面</a>下载南京工程学院的同学们倾情制作的H3C iNode 802.1x第三方兼容客户端, 在这里我根据系统版本选择了2009年11月19日更新的版本.</p><p>用U盘将压缩包复制到Linux Mint(Ubuntu)中, 将解压后得到的两个文件"njit-client"和"njit-RefreshIP"放入 /home/你的用户名/ 目录下.</p><p>假设我们在H3C iNode中使用的认证用户名为username, 密码为password. 打开终端, 输入</p><p>sudo ./njit-client username password</p><p>出现如图7所示的认证信息即表示认证成功. 不要关闭这个终端窗口, 因为每隔几秒server端还会发包要求回应以检测你是不是仍然在线, 够bt吧. 至此已成功联网, 并持续稳定运行了几小时, 暂时没有发现问题.</p><div id="attachment_507" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_7.png"><img class="size-medium wp-image-507" title="图7" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_7-300x210.png" alt="图7" width="300" height="210" /></a><p class="wp-caption-text">图7</p></div><p>其实这里我还尝试了其他两个客户端, 一个是xclient作者flyx大侠制作的Linux兼容客户端, 实验失败. 华为官方放出的H3C iNode for Linux v3.60 E6208也不行, 不过原因似乎是学校的设备不支持版本号如此高的客户端.</p><div id="attachment_508" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_8.png"><img class="size-medium wp-image-508" title="图8" src="http://www.road2stat.com/cn/attachments/2010/07/h3c_inode_linux_8-300x247.png" alt="图8" width="300" height="247" /></a><p class="wp-caption-text">图8</p></div><p>(本文系纯技术测试, 请自行斟酌行为后果, 作者不承担任何责任)</p> ]]></content:encoded> <wfw:commentRss>http://www.road2stat.com/cn/unix_study/linux_h3c_inode.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
