<?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>深度VPS &#187; udp</title>
	<atom:link href="http://www.deepvps.com/tag/udp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.deepvps.com</link>
	<description>专注VPS技术，关注前端技术</description>
	<lastBuildDate>Sat, 04 Feb 2023 14:00:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>利用iptables防止php-ddos对外udp发包</title>
		<link>http://www.deepvps.com/use-iptables-to-prevent-php-ddos.html</link>
		<comments>http://www.deepvps.com/use-iptables-to-prevent-php-ddos.html#comments</comments>
		<pubDate>Sun, 01 Apr 2012 16:22:21 +0000</pubDate>
		<dc:creator>deepvps</dc:creator>
				<category><![CDATA[VPS安全]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[php-ddos]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://www.deepvps.com/?p=1082</guid>
		<description><![CDATA[最近一段时间php-ddos泛滥，尤其是织梦dede一堆洞洞，你懂得。其实，我们可以利用iptables，从根源上禁止php-ddos对外发包。
这样你就不必担心你的VPS或者虚拟空间因为漏洞问题被植入php-ddos，对外发送大量的数据包而被主机商关闭。 
# iptables -I OUTPUT -p udp &#8211;dport 53 -d 8.8.8.8 -j ACCEPT
# iptables -I OUTPUT -p udp &#8211;dport 53 -d 8.8.4.4 -j ACCEPT

“53”，为DNS所需要的UDP端口，“8.8.8.8”部分为DNS IP，根据您服务器的设定来定，若您不知您当前服务器使用的DNS IP，可在SSH中执行以下命令获取：
# cat /etc/resolv.conf &#124;grep nameserver &#124;awk &#8216;NR==1{print $2 }&#8217;
禁止本机对外发送UDP包
# iptables -A OUTPUT -p udp -j DROP
]]></description>
			<content:encoded><![CDATA[<p>最近一段时间php-ddos泛滥，尤其是织梦dede一堆洞洞，你懂得。其实，我们可以利用iptables，从根源上禁止php-ddos对外发包。</p>
<p>这样你就不必担心你的VPS或者虚拟空间因为漏洞问题被植入php-ddos，对外发送大量的数据包而被主机商关闭。 </p>
<blockquote><p><span style="color: #008000;"># iptables -I OUTPUT -p udp &#8211;dport 53 -d 8.8.8.8 -j ACCEPT<br />
# iptables -I OUTPUT -p udp &#8211;dport 53 -d 8.8.4.4 -j ACCEPT</span></p></blockquote>
<p><span id="more-1082"></span><br />
“53”，为DNS所需要的UDP端口，“8.8.8.8”部分为DNS IP，根据您服务器的设定来定，若您不知您当前服务器使用的DNS IP，可在SSH中执行以下命令获取：</p>
<blockquote><p><span style="color: #008000;"># cat /etc/resolv.conf |grep nameserver |awk &#8216;NR==1{print $2 }&#8217;</span></p></blockquote>
<p>禁止本机对外发送UDP包</p>
<blockquote><p><span style="color: #008000;"># iptables -A OUTPUT -p udp -j DROP</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.deepvps.com/use-iptables-to-prevent-php-ddos.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
