<?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>服务器安全维护工作室 &#187; 构建阿里云专网下的生产环境</title>
	<atom:link href="https://www.fuwuqiok.com/tag/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqiok.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Mar 2020 07:28:40 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.26</generator>
	<item>
		<title>构建阿里云专网下的生产环境</title>
		<link>https://www.fuwuqiok.com/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/</link>
		<comments>https://www.fuwuqiok.com/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/#comments</comments>
		<pubDate>Fri, 10 Mar 2017 23:52:56 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[aliyun服务器代维]]></category>
		<category><![CDATA[linux代维]]></category>
		<category><![CDATA[构建阿里云专网下的生产环境]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=3187</guid>
		<description><![CDATA[<p>默认的阿里云经典网络有个主要问题，每个ECS要么需要有公有IP地址，要么就无法直接访问外网（设置带宽为0的情况 [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/">构建阿里云专网下的生产环境</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>默认的阿里云经典网络有个主要问题，每个ECS要么需要有公有IP地址，要么就无法直接访问外网（设置带宽为0的情况下就没有公网ip地址）。</p>
<p>另外，经典网络也不利于隐藏服务器细节，不安全。</p>
<h2 id="部署图">部署图</h2>
<p>使用阿里云创建的基于专网的服务器如下图：</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2017/03/topo2.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2017/03/topo2.png" alt="topo2" width="1020" height="743" /></a><span class="caption">阿里云专网服务器部署拓扑</span></p>
<h2 id="部署方法说明">部署方法说明</h2>
<p>主要步骤是：</p>
<ul>
<li>创建专有网络VPC，我选择的是<code>10.0.0.0</code>网络</li>
<li>路由器不需要创建，创建专网会默认自带</li>
<li>创建交换机，设置子网，这里是<code>10.0.1.0</code></li>
<li>在交换机下创建ECS，并且设置网络带宽为0，这样不会分配公网IP，因此无法直接访问外网
<ul>
<li>创建多个web服务器ESC</li>
<li>创建一个最低配置的ESC，目的是用于控制其他服务器，比如接受外网SSH登录，安装docker-machine控制其他内网服务器等</li>
</ul>
</li>
<li>创建NAT网关，创建好之后在NAT网关下设置：
<ul>
<li>购买1个带宽包
<ul>
<li>没有带宽包就访问不了外网</li>
<li>购买带宽包，同时要在该带宽包里购买2个公网ip地址，默认只购买1个</li>
</ul>
</li>
<li>设置SNAT，指定到上面创建的交换机，目的是让该交换机下所有主机都能访问外网，这里要使用带宽包中的1个ip地址</li>
<li>设置NAT，将另一个带宽包ip地址的22端口，指向到上面创建的控制服务器</li>
</ul>
</li>
<li>创建负载均衡器，类型是公网，然后加入所有的Web服务器</li>
</ul>
<h2 id="主要目的">主要目的</h2>
<p>方案的主要目的是：</p>
<ul>
<li>外网不能直接访问内网的业务服务器，这里指的是Web服务器</li>
<li>外网要通过登录控制服务器，再从控制服务器访问内网服务器</li>
<li>内网所有服务器，通过统一的NAT网关访问外网</li>
<li>用户通过负载均衡器访问内网要暴露的服务</li>
</ul>
<p>后续要以这个方案为基础，构建基于docker swarm mode的容器集群服务。</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/">构建阿里云专网下的生产环境</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/%e6%9e%84%e5%bb%ba%e9%98%bf%e9%87%8c%e4%ba%91%e4%b8%93%e7%bd%91%e4%b8%8b%e7%9a%84%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
