<?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>iCodex&#039;s Blog &#187; Linux</title>
	<atom:link href="http://icodex.org/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://icodex.org</link>
	<description>诡谲</description>
	<lastBuildDate>Fri, 13 Jan 2012 13:50:14 +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>CentOS最小化安装Gnome和VNC</title>
		<link>http://icodex.org/2010/03/centos%e6%9c%80%e5%b0%8f%e5%8c%96%e5%ae%89%e8%a3%85gnome%e5%92%8cvnc/</link>
		<comments>http://icodex.org/2010/03/centos%e6%9c%80%e5%b0%8f%e5%8c%96%e5%ae%89%e8%a3%85gnome%e5%92%8cvnc/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:58:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[小日子]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://icodex.org/?p=258</guid>
		<description><![CDATA[小内存的VNC解决方案。关于VNC的介绍和安装可以参考这篇:http://www.vpser.net/manage/linux-vps-install-kde-gnome-vnc.html 这里采用tightvncserver作为VNC服务端,比较省内存,另外也可以在安装有java运行环境的浏览器直接远程打开VNC客户端连接.当然你也可以继续用通常的VNC连接方式连接登录. 运行截图 SSH终端截图.按内存使用大小排序 很简单吧.只要你有安装java运行环境(Java Runtime Environment)就可以直接通过浏览器登录你的Linux服务器. 安装教程(简单三步,step by step!) 1.安装x-window桌面和Gnome环境先. yum groupinstall "X Window System" "GNOME Desktop Environment" 2.添加中文支持和浏览器 yum -y install fonts-chinese firefox 3.安装tightvnc. (CentOS 5 64Bit) wget http://packages.sw.be/tightvnc/tightvnc-server-1.3.9-3.el5.rf.x86_64.rpm rpm -ivh tightvnc-server-1.3.9-3.el5.rf.x86_64.rpm --force --nodeps (CentOS 5 32Bit) wget http://packages.sw.be/tightvnc/tightvnc-server-1.3.9-3.el5.rf.i386.rpm rpm -ivh tightvnc-server-1.3.9-3.el5.rf.i386.rpm --force --nodeps 其他版本到http://packages.sw.be/tightvnc找对应的rpm包. 补充:必须做以下操作,否则会因找不到字体路径而无法启动! mkdir -p /usr/X11R6/lib/X11 ln -s /usr/share/X11/fonts /usr/X11R6/lib/X11/fonts [...]]]></description>
			<content:encoded><![CDATA[<p>小内存的VNC解决方案。关于VNC的介绍和安装可以参考这篇:http://www.vpser.net/manage/<a href="http://icodex.org/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">linux</a>-<a href="http://icodex.org/tag/vps/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VPS">vps</a>-install-kde-<a href="http://icodex.org/tag/gnome/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Gnome">gnome</a>-<a href="http://icodex.org/tag/vnc/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VNC">vnc</a>.html 这里采用tightvncserver作为VNC服务端,比较省内存,另外也可以在安装有java运行环境的浏览器直接远程打开VNC客户端连接.当然你<strong>也可以继续用通常的VNC连接方式连接登录</strong>.<span id="more-258"></span></p>
<h2>运行截图</h2>
<p>SSH终端截图.按内存使用大小排序</p>
<p><a href="http://www.icodex.org/wp-content/uploads/2010/03/shell.jpg?e97550"><img class="aligncenter size-medium wp-image-259" title="shell" src="http://www.icodex.org/wp-content/uploads/2010/03/shell-550x346.jpg?e97550" alt="" width="550" height="346" /></a></p>
<p><a href="http://www.icodex.org/wp-content/uploads/2010/03/with-tcp-port.jpg?e97550"><img class="aligncenter size-full wp-image-277" title="with-tcp-port" src="http://www.icodex.org/wp-content/uploads/2010/03/with-tcp-port.jpg?e97550" alt="" width="497" height="367" /></a></p>
<p><a href="http://www.icodex.org/wp-content/uploads/2010/03/screen.jpg?e97550"><img class="aligncenter size-medium wp-image-278" title="screen" src="http://www.icodex.org/wp-content/uploads/2010/03/screen-550x406.jpg?e97550" alt="" width="550" height="406" /></a></p>
<p>很简单吧.只要你有安装java运行环境(<a href="http://java.com/zh_CN/download/index.jsp"><em>Java</em> Runtime Environment</a>)就可以直接通过浏览器登录你的Linux服务器.</p>
<h2>安装教程(简单三步,step by step!)</h2>
<p>1.安装x-window桌面和Gnome环境先.</p>
<blockquote><p><code>yum groupinstall "X Window System" "GNOME Desktop Environment"</code></p></blockquote>
<p>2.添加中文支持和浏览器</p>
<blockquote><p><code>yum -y install fonts-chinese firefox</code></p></blockquote>
<p>3.安装tightvnc.<br />
(<a href="http://icodex.org/tag/centos/" class="st_tag internal_tag" rel="tag" title="Posts tagged with CentOS">CentOS</a> 5 64Bit)</p>
<blockquote><p><code>wget http://packages.sw.be/tightvnc/tightvnc-server-1.3.9-3.el5.rf.x86_64.rpm<br />
rpm -ivh tightvnc-server-1.3.9-3.el5.rf.x86_64.rpm --force --nodeps</code></p></blockquote>
<p>(CentOS 5 32Bit)</p>
<blockquote><p><code>wget http://packages.sw.be/tightvnc/tightvnc-server-1.3.9-3.el5.rf.i386.rpm<br />
rpm -ivh tightvnc-server-1.3.9-3.el5.rf.i386.rpm --force --nodeps</code></p></blockquote>
<p>其他版本到http://packages.sw.be/tightvnc找对应的rpm包.</p>
<p><span style="color: #ff0000;">补充:必须做以下操作,否则会因找不到字体路径而无法启动!</span></p>
<blockquote><p><code>mkdir -p /usr/X11R6/lib/X11<br />
ln -s /usr/share/X11/fonts /usr/X11R6/lib/X11/fonts</code></p></blockquote>
<p>------- end -------</p>
<p>使用方法(以会话ID:1为例)</p>
<p>启动vnc.执行命令:</p>
<blockquote><p><code>vncserver :1 -httpport 9001 -name icodex_desktop -depth 24 -geometry 1024x768</code></p></blockquote>
<p>关闭vnc,执行命令:</p>
<blockquote><p><code>vncserver -kill :1</code></p></blockquote>
<p><strong>参数说明:</strong></p>
<blockquote><p>usage: vncserver [:&lt;number&gt;] [-nohttpd] [-name &lt;desktop-name&gt;] [-depth &lt;depth&gt;]<br />
[-geometry &lt;width&gt;x&lt;height&gt;]<br />
[-pixelformat rgbNNN|bgrNNN]<br />
&lt;Xvnc-options&gt;...</p>
<p>vncserver -kill &lt;X-display&gt;</p></blockquote>
<p>:1 &gt; 会话ID.你可以建立多几个会话ID<br />
-httpport|-nohttpd &gt; 打开的TCP访问端口或者关闭TCP访问<br />
-name &gt; 命名.这个随意了...<br />
-depth &gt; 色彩深度 设置16位或24位,32位是不启动的.<br />
-geometry &gt; 屏幕纵横比<br />
-pixelformat &gt; 像素格式,默认即可</p>
<p>vncserver -kill &lt;X-display&gt; 杀死会话ID.&lt;X-display&gt;为会话ID.如:<strong>vncserver -kill :1</strong></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://icodex.org/2011/06/%e9%80%82%e7%94%a8%e4%ba%8e-centos-5%e7%b3%bb%e5%88%97%e7%9a%84-virt-manager-0-8-6-rpm%e4%b8%8b%e8%bd%bd/" title="适用于 CentOS 5系列的 Virt-manager 0.8.6 RPM下载">适用于 CentOS 5系列的 Virt-manager 0.8.6 RPM下载</a> (2)</li><li><a href="http://icodex.org/2010/05/directadmin-nginx-automated-installer/" title="[更新]适用于Directadmin面板的Nginx自动安装脚本">[更新]适用于Directadmin面板的Nginx自动安装脚本</a> (55)</li><li><a href="http://icodex.org/2010/03/centos-%e9%80%82%e7%94%a8%e7%9a%84%e7%ac%ac%e4%b8%89%e6%96%b9yum%e6%9b%b4%e6%96%b0%e6%ba%90/" title="CentOS 适用的第三方yum更新源">CentOS 适用的第三方yum更新源</a> (4)</li><li><a href="http://icodex.org/2010/03/powerful-firewall-advanced-policy-firewall-apf/" title="APF:Linux下强大的防火墙组件">APF:Linux下强大的防火墙组件</a> (8)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://icodex.org/2010/03/centos%e6%9c%80%e5%b0%8f%e5%8c%96%e5%ae%89%e8%a3%85gnome%e5%92%8cvnc/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>APF:Linux下强大的防火墙组件</title>
		<link>http://icodex.org/2010/03/powerful-firewall-advanced-policy-firewall-apf/</link>
		<comments>http://icodex.org/2010/03/powerful-firewall-advanced-policy-firewall-apf/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 05:37:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[codex]]></category>
		<category><![CDATA[APF]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://icodex.org/?p=137</guid>
		<description><![CDATA[什么是APF？ APF(Advanced Policy Firewall)是 Rf-x Networks 出品的Linux环境下的软件防火墙,被大部分Linux服务器管理员所采用,使用iptables的规则,易于理解及使用.可算是Linux使用较多的防火墙.APF的配置参数众多,有效利用这些配置参数可加强你的服务器安全,APF应该在每一台Linux服务器中得到应用. 安装APF 1.下载最新的安装包并解压缩,APF项目详细信息. #cd /usr/local/src #wget http://www.rfxn.com/downloads/apf-current.tar.gz #tar -zxf apf-current.tar.gz #cd apf-9.7-1/ 2.执行安装 #sh ./install.sh 结束安装好你会得到一些信息: ... Installation Details: Install path:         /etc/apf/ Config path:          /etc/apf/conf.apf Executable path:      /usr/local/sbin/apf ... 3.进行详细配置 #vi /etc/apf/conf.apf 默认的参数适合大多数场合,按照需要进行修改即可 DEVEL_MODE="1" &#62;&#62; DEVEL_MODE="0" RAB="0" &#62;&#62; RAB="1" RAB_PSCAN_LEVEL="2" &#62;&#62; RAB_PSCAN_LEVEL="3" TCR_PASS="1" &#62;&#62; TCR_PASS="0" DLIST_PHP="0" &#62;&#62; DLIST_PHP="1" DLIST_SPAMHAUS="0" [...]]]></description>
			<content:encoded><![CDATA[<h2>什么是APF？</h2>
<p><a href="http://icodex.org/tag/apf/" class="st_tag internal_tag" rel="tag" title="Posts tagged with APF">APF</a>(Advanced Policy Firewall)是 <a href="http://www.rfxn.com/">Rf-x Networks</a> 出品的Linux环境下的软件防火墙,被大部分Linux服务器管理员所采用,使用iptables的规则,易于理解及使用.可算是Linux使用较多的防火墙.APF的配置参数众多,有效利用这些配置参数可加强你的服务器安全,APF应该在每一台Linux服务器中得到应用.<span id="more-137"></span></p>
<h2>安装APF</h2>
<p>1.下载最新的安装包并解压缩,<a href="http://www.rfxn.com/projects/advanced-policy-firewall/">APF项目详细信息</a>.</p>
<blockquote><p><code>#cd /usr/local/src<br />
#wget <a href="http://www.rfxn.com/downloads/apf-current.tar.gz">http://www.rfxn.com/downloads/apf-current.tar.gz</a><a href="http://www.rfxn.com/downloads/apf-current.tar.gz"><strong> </strong></a><br />
#tar -zxf apf-current.tar.gz<br />
#cd apf-9.7-1/</code></p></blockquote>
<p>2.执行安装</p>
<blockquote><p><code>#sh ./install.sh</code></p></blockquote>
<p>结束安装好你会得到一些信息:</p>
<blockquote><p><code>...<br />
Installation Details:<br />
Install path:         /etc/apf/<br />
Config path:          /etc/apf/conf.apf<br />
Executable path:      /usr/local/sbin/apf<br />
...</code></p></blockquote>
<p>3.进行详细配置</p>
<blockquote><p><code>#vi /etc/apf/conf.apf</code></p></blockquote>
<p>默认的参数适合大多数场合,按照需要进行修改即可</p>
<blockquote><p><code>DEVEL_MODE="1" &gt;&gt; DEVEL_MODE="0"<br />
RAB="0" &gt;&gt; RAB="1"<br />
RAB_PSCAN_LEVEL="2" &gt;&gt; RAB_PSCAN_LEVEL="3"<br />
TCR_PASS="1" &gt;&gt; TCR_PASS="0"<br />
DLIST_PHP="0" &gt;&gt; DLIST_PHP="1"<br />
DLIST_SPAMHAUS="0" &gt;&gt; DLIST_SPAMHAUS="1"<br />
DLIST_DSHIELD="0" &gt;&gt; DLIST_DSHIELD="1"<br />
DLIST_RESERVED="0" &gt;&gt; DLIST_RESERVED="1"</code></p></blockquote>
<p>流入端口过滤</p>
<blockquote><p><code># Common ingress (inbound) TCP ports<br />
IG_TCP_CPORTS="20,21,22,25,26,53,80,110,143,443,465,993,995,3306"<br />
# Common ingress (inbound) UDP ports<br />
IG_UDP_CPORTS="21,53,465"</code></p></blockquote>
<p>流出端口过滤,<span style="color: #ff0000;">虚拟主机推荐开启</span></p>
<blockquote><p><code># Outbound (egress) filtering<br />
EGF="1"<br />
# Common outbound (egress) TCP ports<br />
EG_TCP_CPORTS="21,22,25,26,37,43,53,80,110,113,443,465,3306"<br />
# Common outbound (egress) UDP ports<br />
EG_UDP_CPORTS="20,21,53,465"</code></p></blockquote>
<p>ICMP过滤</p>
<blockquote><p><code># Common ICMP outbound (egress) types<br />
# 'internals/icmp.types' for type definition; 'all' is wildcard for any<br />
EG_ICMP_TYPES="all"</code></p></blockquote>
<p>另外还有两个值得注意的设置文件: /etc/apf/allow_hosts.rules 和 /etc/apf/deny_hosts.rules 可设置目标主机的过滤规则.如添加信任主机操作等.</p>
<p>启动APF</p>
<blockquote><p><code>#/usr/local/sbin/apf -s</code></p></blockquote>
<p>重启APF</p>
<blockquote><p><code>#/usr/local/sbin/apf -r</code></p></blockquote>
<p>查看运行日志</p>
<blockquote><p><code>#tail -f /var/log/apf_log</code></p></blockquote>
<p>添加为系统启动</p>
<blockquote><p><code>#vi /etc/rc.local</code></p></blockquote>
<p>在其中添加 "/usr/local/sbin/apf -s" 即可(不含双引号).</p>
<p>详细参数说明</p>
<blockquote>
<pre>usage /usr/local/sbin/apf [OPTION]
-s|--start ......................... load all firewall rules
-r|--restart ....................... stop (flush) &amp; reload firewall rules
-f|--stop........ .................. stop (flush) all firewall rules
-l|--list .......................... list all firewall rules
-t|--status ........................ output firewall status log
-e|--refresh ....................... refresh &amp; resolve dns names in trust rules
-a HOST CMT|--allow HOST COMMENT ... add host (IP/FQDN) to allow_hosts.rules and
 immediately load new rule into firewall
-d HOST CMT|--deny HOST COMMENT .... add host (IP/FQDN) to deny_hosts.rules and
 immediately load new rule into firewall
-u|--remove HOST ................... remove host from [glob]*_hosts.rules
 and immediately remove rule from firewall
-o|--ovars ......................... output all configuration options</pre>
</blockquote>
<p>此外,APF自9.6 (rev:2)版本之后增加了RAB模块.该模块取代了旧版本的antidos模块.可有效减轻拒绝服务攻击带来的影响,但需要iptables的内核模块ipt_recent的支持.如下图我在VPS上启动APF后的屏显,提示RAB模块无法启用.内核模块ipt_recent没有找到.因此建议在内核支持以及iptables模块支持的情况下使用.</p>
<p><a rel="attachment wp-att-145" href="http://icodex.org/2010/03/powerful-firewall-advanced-policy-firewall-apf/apf/"><img class="alignnone size-medium wp-image-145" title="apf" src="http://www.icodex.org/wp-content/uploads/2010/03/apf-400x160.jpg?e97550" alt="" width="400" height="160" /></a></p>
<h3><strong>Faq</strong></h3>
<blockquote><p><strong><span style="color: #ff0000;">Problem</span>:</strong> If you get  this error apf(xxxxx): {glob} unable to load iptables module  (ip_tables), aborting.<br />
<strong><span style="color: #339966;">Solution</span>:</strong> Try  changing SET_MONOKERN=”0″ to SET_MONOKERN=”1″ , then apf -r</p>
<p><strong><span style="color: #ff0000;">Problem</span>:</strong> If you get  this message: apf(xxxxx): {glob} !!DEVELOPMENT MODE ENABLED!! – firewall  will flush every 5 minutes.<br />
<strong><span style="color: #339966;">Solution</span>:</strong> you need  to change DEVEL_MODE=1 to DEVEL_MODE=0, make sure your config is working  first.</p></blockquote>
<p>Via:http://www.securecentos.com/basic-security/install-firewall/</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://icodex.org/2010/03/help-you-mitigate-dos-atacks-with-dos-deflate/" title="DOS-Deflate:帮助您有效减轻 DOS 攻击伤害">DOS-Deflate:帮助您有效减轻 DOS 攻击伤害</a> (12)</li><li><a href="http://icodex.org/2010/04/setting-up-pptpd-with-apf/" title="设置pptpd与apf">设置pptpd与apf</a> (0)</li><li><a href="http://icodex.org/2010/04/vps%e6%8e%a8%e8%8d%90-photonvps/" title="VPS推荐:Photonvps">VPS推荐:Photonvps</a> (0)</li><li><a href="http://icodex.org/2010/03/centos%e6%9c%80%e5%b0%8f%e5%8c%96%e5%ae%89%e8%a3%85gnome%e5%92%8cvnc/" title="CentOS最小化安装Gnome和VNC">CentOS最小化安装Gnome和VNC</a> (8)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://icodex.org/2010/03/powerful-firewall-advanced-policy-firewall-apf/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching 9/30 queries in 0.014 seconds using disk: basic
Object Caching 509/535 objects using disk: basic
Content Delivery Network via www.icodex.org

Served from: icodex.org @ 2012-02-06 12:46:04 -->
