From 60af6fb4aa2c913682c224acd4fb79b5cee2b5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=9F=E8=B0=83=E8=B0=83=E2=84=A2?= <398188662@qq.com> Date: Wed, 19 Jul 2017 03:02:40 +0800 Subject: [PATCH] Update iptables.md --- command/iptables.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/command/iptables.md b/command/iptables.md index e58786858f..3677ee4ce1 100644 --- a/command/iptables.md +++ b/command/iptables.md @@ -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 ┃ ┖━━━━━━━━━━━━━━━┛ ```