File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ * .swp
12build /*
3+ _build /*
Original file line number Diff line number Diff line change 22==================================================
33蘑菇碎碎念
44==================================================
5+
56vim插件及使用
67-----------------------
78
@@ -14,3 +15,25 @@ vim插件及使用
14152. 使用pyflakes进行语法检查
1516
1617 :SyntasticCheck pyflakes
18+
19+ iptables
20+ -----------------------
21+ 1. 列出所有规则
22+
23+ `iptables -nvL -t nat --line-number `
24+
25+ 列出nat表的所有规则并显示行号
26+
27+ #. 删除
28+
29+ `iptables -t nat -D DOCKER 13 `
30+
31+ 删除nat表DOCKER链的第13行的规则
32+
33+ #. 用iptables给Docker添加端口映射
34+
35+ `iptables -t nat -A DOCKER --in-interface \!docker0 -p tcp --dport 6666 -j DNAT --to 172.17.0.5:6666 `
36+
37+ docker会在系统中创建一个叫docker0的网卡,本例中172.17.0.5就是docker0的IP地址
38+
39+
You can’t perform that action at this time.
0 commit comments