<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>linux on Two Tigers Engineering</title>
    <link>https://blog.twotigers.xyz/series/linux/</link>
    <description>Recent content in linux on Two Tigers Engineering</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 18 Nov 2022 09:10:25 +0800</lastBuildDate><atom:link href="https://blog.twotigers.xyz/series/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>vim 中文乱码</title>
      <link>https://blog.twotigers.xyz/posts/linux/vim/</link>
      <pubDate>Fri, 18 Nov 2022 09:10:25 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/linux/vim/</guid>
      <description>原因 字符集配置不匹配 mac 上是 UTF-8 解决方法 更新配置 vim ~/.zshrc 在最后加上 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 配置生效 source ~/.zshrc </description>
    </item>
    
    <item>
      <title>ufw 无法禁用 docker端口问题</title>
      <link>https://blog.twotigers.xyz/posts/docker/</link>
      <pubDate>Sun, 06 Nov 2022 13:00:00 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/docker/</guid>
      <description>装好了docker,以及 ufw 然后禁用了 3000 端口, ufw deny 3000
并且启动了一个容器 启动命令是这样的 docker run -it -p 3000:3000 python 但之后发现一个问题, IP:3000 居然可以访问到
查询资料得知, 淦, 发现这是个陈年老问题了 查到一个好用的 repo, https://github.com/chaifeng/ufw-docker 并且按照他的教程进行了设置
但是紧接着发现了问题 这样设置完之后, 开放端口3000(ufw allow 3000), 居然不生效了 看了下 readme 显示 现在外部就已经无法访问 Docker 发布出来的任何端口了，但是容器内部以及私有网络地址上可以正常互相访问，而且容器也可以正常访问外部的网络。 显然这不是我想要的结果
最终在stackoverflow找到了符合我需求的解决方案
cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /etc/docker/daemon.json { &amp;#34;iptables&amp;#34;: false } EOF echo &amp;#34;DOCKER_OPTS=\&amp;#34;--iptables=false\&amp;#34;&amp;#34; &amp;gt;&amp;gt; /etc/default/docker service docker restart -参考资料: https://stackoverflow.com/a/67641547</description>
    </item>
    
    <item>
      <title>常用 Linux 命令</title>
      <link>https://blog.twotigers.xyz/posts/linux/command/</link>
      <pubDate>Sat, 09 Oct 2021 17:10:25 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/linux/command/</guid>
      <description>文件夹大小 du -h --max-depth=1 </description>
    </item>
    
  </channel>
</rss>
