<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-04-10T07:23:53+00:00</updated><id>/feed.xml</id><title type="html">Fayne’s Blog</title><subtitle>Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.</subtitle><entry><title type="html">AWS EC2 添加安全组规则</title><link href="/%E6%8A%80%E6%9C%AF/2025/04/08/aws-ec2-%E6%B7%BB%E5%8A%A0%E5%AE%89%E5%85%A8%E7%BB%84%E8%A7%84%E5%88%99.html" rel="alternate" type="text/html" title="AWS EC2 添加安全组规则" /><published>2025-04-08T17:00:00+00:00</published><updated>2025-04-08T17:00:00+00:00</updated><id>/%E6%8A%80%E6%9C%AF/2025/04/08/aws-ec2-%E6%B7%BB%E5%8A%A0%E5%AE%89%E5%85%A8%E7%BB%84%E8%A7%84%E5%88%99</id><content type="html" xml:base="/%E6%8A%80%E6%9C%AF/2025/04/08/aws-ec2-%E6%B7%BB%E5%8A%A0%E5%AE%89%E5%85%A8%E7%BB%84%E8%A7%84%E5%88%99.html"><![CDATA[<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>aws ec2 authorize-security-group-ingress <span class="se">\</span>
<span class="nt">--group-id</span> sg-39f1285d <span class="se">\</span>
<span class="nt">--ip-permissions</span> <span class="s2">"IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges=[{CidrIp=180.159.36.25/32,Description='MN 508(2025/04/08)'}]"</span>
</code></pre></div></div>

<p>可以通过以下命令配置多个AWS账号，方便管理</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>aws configure <span class="nt">--profile</span> mn
aws configure <span class="nt">--profile</span> generali
</code></pre></div></div>

<p>当然，如果添加别名，后期运行命令也更方便</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># ~/.zshrc</span><span class="w">
</span><span class="n">alias</span><span class="w"> </span><span class="nx">awsmn</span><span class="o">=</span><span class="s1">'aws --profile mn'</span><span class="w">
</span><span class="n">alias</span><span class="w"> </span><span class="nx">awsgenerali</span><span class="o">=</span><span class="s1">'aws --profile generali'</span><span class="w">
</span></code></pre></div></div>]]></content><author><name>Fayne</name></author><category term="技术" /><category term="AWS" /><summary type="html"><![CDATA[AWS EC2 添加安全组规则命令，方便后期扩展和复制]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://res.cloudinary.com/fayne/image/upload/c_scale,f_auto,q_auto,w_160/v1744103546/WechatIMG261_mts7jq.png" /><media:content medium="image" url="https://res.cloudinary.com/fayne/image/upload/c_scale,f_auto,q_auto,w_160/v1744103546/WechatIMG261_mts7jq.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Welcome</title><link href="/2018/07/01/welcome.html" rel="alternate" type="text/html" title="Welcome" /><published>2018-07-01T00:00:00+00:00</published><updated>2018-07-01T00:00:00+00:00</updated><id>/2018/07/01/welcome</id><content type="html" xml:base="/2018/07/01/welcome.html"><![CDATA[]]></content><author><name></name></author><summary type="html"><![CDATA[]]></summary></entry></feed>