差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:commands:network [2015/03/08 13:05] – ともやん | linux:commands:network [2025/03/13 07:22] (現在) – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
====== ネットワーク関連 ====== | ====== ネットワーク関連 ====== | ||
+ | [[: | ||
+ | [[linux: | ||
+ | [[linux: | ||
+ | [[linux: | ||
+ | [[linux: | ||
[[linux: | [[linux: | ||
+ | [[linux: | ||
+ | [[linux: | ||
+ | [[linux: | ||
+ | [[linux: | ||
- | |||
- | ==== 設定内容をチェインごとに表示 ==== | ||
- | < | ||
- | $ sudo iptables -nL | ||
- | </ | ||
- | |||
- | ==== 保存形式で表示 ==== | ||
- | < | ||
- | $ sudo iptables-save | ||
- | </ | ||
- | |||
- | ===== iptables ===== | ||
- | ==== 設定内容の確認 ==== | ||
- | < | ||
- | $ sudo iptables -nL | ||
- | </ | ||
- | |||
- | ※管理者でパスが通っていない場合は、以下のように呼び出す必要がある。 | ||
- | < | ||
- | $ sudo / | ||
- | </ | ||
- | |||
- | ==== ファイルに保存 ==== | ||
- | < | ||
- | $ sudo iptables-save > iptables_save.txt | ||
- | </ | ||
- | |||
- | ==== ファイルより復元 ==== | ||
- | < | ||
- | $ sudo iptables-restore < iptables_save.txt | ||
- | </ |