Update iptables.md

This commit is contained in:
小弟调调™ 2017-07-19 03:02:40 +08:00 committed by GitHub
parent 318c3e54f6
commit 60af6fb4aa
1 changed files with 22 additions and 21 deletions

View File

@ -68,31 +68,32 @@ iptables -t 表名 <-A/I/D/R> 规则链名 [规则号] <-i/o 网卡名> -p 协
```bash
┎╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
┌───────────────┐ ┃ Network ┃
│ table: filter │ ┖━━━━━━━━━━━━━━┛
│ chain: INPUT ◀────┐
└───────┬───────┘ │ │
│ ┌─────────▼─────────┐
┌ ▼ ┐ │ table: nat │
│local process│ │ chain: PREROUTING │
└ ┘ └─────────┬─────────┘
▼ ┌─────────────────┐
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ │table: nat │
Routing decision └───── outing decision ─────▶│chain: PREROUTING│
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ └────────┬────────┘
│ table: filter │ ┖━━━━━━━━━━━━━━┛
│ chain: INPUT ◀────┐ │
└───────┬───────┘ │ ▼
│ ┌───────────────────┐
┌ ▼ ┐ │ table: nat │
│local process│ │ chain: PREROUTING │
└ ┘ └─────────┬─────────┘
▼ ┌─────────────────┐
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ │table: nat │
Routing decision └───── outing decision ─────▶│chain: PREROUTING│
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ └────────┬────────┘
│ │
┌──────────────┐ │
┌──────────────┐ │
│ table: nat │ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ │
│ chain: OUTPUT │ ┌─────▶ outing decision ◀──────────────┘
└───────┬───────┘ │ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
└───────┬───────┘ │ ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
│ │ │
┌───────▼───────┐ │ ┌──────────▼─────────┐
│ table: filter │ │ │ table: nat │
│ chain: OUTPUT ├────┘ │ chain: POSTROUTING │
└───────────────┘ └──────────┬─────────┘
┎╍╍╍╍╍╍╍▼╍╍╍╍╍╍╍┓
▼ │ ▼
┌───────────────┐ │ ┌────────────────────┐
│ table: filter │ │ │ chain: POSTROUTING │
│ chain: OUTPUT ├────┘ └──────────┬─────────┘
└───────────────┘ │
┎╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
┃ Network ┃
┖━━━━━━━━━━━━━━━┛
```