linux:commands:network:iptables

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
linux:commands:network:iptables [2020/02/09 17:06] – [設定内容をチェインごとに表示] ともやんlinux:commands:network:iptables [2020/02/10 01:30] – [nat テーブルの削除] ともやん
行 31: 行 31:
 REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:80 redir ports 3128 REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:80 redir ports 3128
 REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:443 redir ports 3129 REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:443 redir ports 3129
 +</code>
 +
 +===== nat テーブルの削除 =====
 +**iptables -t <table> -nL <chain> --line-numbers** - ルール番号の表示\\
 +**iptables -t <table> -D <chain> <rule num>** - ルールの削除\\
 +<code>
 +$ sudo iptables -t nat -nL PREROUTING --line-numbers
 +Chain PREROUTING (policy ACCEPT)
 +num  target     prot opt source               destination
 +1    REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:80 redir ports 3128
 +2    REDIRECT   tcp  --  0.0.0.0/           0.0.0.0/           tcp dpt:443 redir ports 3129
 +
 +$ sudo iptables -t nat -D PREROUTING 2
 +$ sudo iptables -t nat -D PREROUTING 1
 +
 +$ sudo iptables -t nat -nL PREROUTING --line-numbers
 +Chain PREROUTING (policy ACCEPT)
 +num  target     prot opt source               destination
 +
 </code> </code>
  
  • linux/commands/network/iptables.txt
  • 最終更新: 2020/02/10 08:53
  • by ともやん