LoginSignup
0
0

More than 5 years have passed since last update.

LinuxのFW(iptables)

Posted at

現状の設定確認

# iptables -L

OUTPUTチェイン、INPUTチェイン、FOWORDチェインに分かれる

INPUT
入力(受信)に対するチェイン

OUTPUT
出力(送信)に対するチェイン

FORWARD
フォアード(転送)に対するチェイン

PREROUTING
受信時に宛先アドレスを変換するチェイン。タイミングとしてはfilterで適用されるルールより手前

POSTROUTING
送信時に送信元アドレスを変換するチェイン。これもfilterの後でパケットが送信される直前

■追加
【iptables -I OUTPUT {行番号} -d {宛先IP/サブネットマスク} -p {プロトコル} -m {モジュール} --sport {ポート番号} --dport {ポート番号} -j ACCEPT】

■確認
iptables -L -n --line-number

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0