mirror of
https://gitcode.com/huyuchengus/gitcode_knowledge.git
synced 2025-07-13 20:23:28 +00:00
备份博文内容
This commit is contained in:
parent
c9a8bde5d3
commit
e43babe97c
1
CSDN博文备份/Ubuntu防火墙配置-146990030.md
Normal file
1
CSDN博文备份/Ubuntu防火墙配置-146990030.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>Ubuntu 的防火墙配置可以参考文章:<a href="https://documentation.ubuntu.com/server/how-to/security/firewalls/index.html" rel="nofollow" title="Firewall - Ubuntu Server documentation">Firewall - Ubuntu Server documentation</a></p> <br><h3>22 端口</h3> <br><p>需要注意的是,在启动防火墙之前,需要先开放 22 端口。</p> <br><p>否则 SSH 将会拒绝你连接防火墙。</p> <br><p>开放 22 端口的命令为:<code>sudo ufw allow 22</code></p> <br><h3>添加端口</h3> <br><p>如果还希望添加其他端口。</p> <br><p>可以使用命令:<code>sudo ufw allow 8161</code> 来逐次添加。</p> <br><h3>关闭端口</h3> <br><p>如果想关闭特定的端口,使用命令:<code>sudo ufw deny 22</code></p> <br><h3>启动服务</h3> <br><p><code>sudo ufw enable</code> 命令是用来启动服务的。</p> <br><h3>关闭服务</h3> <br><p><code>sudo ufw deny 22</code> 命令用来关闭服务。</p> <br><p>这是因为有时候我们可能需要暂时关闭防火墙来确定是不是网络配置问题。</p> <br><p>最后,可能还需要使用状态查看命令来看看开放的端口情况。</p> <br><p></p> <br><p></p> <br><p class="img-center"><a href="https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/f/9/f9a08b5b80229d705b095dee690cabe4db6efd43.jpeg" rel="nofollow"><img alt="2025-04-03_10-06-13" height="201" src="https://i-blog.csdnimg.cn/img_convert/f682b4c276a79f2c001fed6b399d06ac.jpeg" width="470" /></a></p> <br><p></p> <br><p><a class="has-card" href="https://www.isharkfly.com/t/ubuntu/13527" rel="nofollow" title="https://www.isharkfly.com/t/ubuntu/13527"><span class="link-card-box" contenteditable="false"><span class="link-title">https://www.isharkfly.com/t/ubuntu/13527</span><span class="link-link"><img class="link-link-icon" src="https://csdnimg.cn/release/blog_editor_html/release2.3.8/ckeditor/plugins/CsdnLink/icons/icon-default.png?t=P1C7" />https://www.isharkfly.com/t/ubuntu/13527</span></span></a></p>
|
Loading…
x
Reference in New Issue
Block a user