OpenWrtでIPv4 over IPv6(DS-Lite,固定IP)を設定する


はじめに

本ページは、フレッツ光ネクストでHG/W配下に、OpenWrtをインストールしたルーターを配置して、
次に挙げる複数の外部接続を構成して、LAN内のDHCPクライアントが、IPv6とIPv4でインターネット接続を可能とし、
かつクライアント毎にIPv4の接続経路を分ける等を行う、各種設定をステップバイステップで記述します。
  • IPv4 「Transix IPv4 over IPv6 固定IP(IPIP方式)※1」、「Transix IPv4 over IPv6 DS-Lite※2」方式、PPPoE
  • IPv6 IPoE

※1 同様のIPIP方式(RFC2473)を利用する、JPIXのv6プラス、アルテリアネットワークスのXpass、朝日ネットのv6コネクトについても同様の設定で出来るはずです。
※2 同様のDS-Lite方式(RFC6333)を利用する、アルテリアネットワークスのXpass、朝日ネットのv6コネクトについても同様の設定で出来るはずです。

各社 IPoE IPv4 over IPv6の方式について(参考 2023.04時点)

提供元 サービス名 シェアード方式 固定 IP方式
JPIX v6プラス MAP-E あり(IPIP)
NTTCom OCNバーチャルコネクト MAP-E あり(MAP-E)
インターネットマルチフィード Transix DS-Lite あり(IPIP)
アルテリアネットワークス クロスパス(Xpass) DS-Lite あり(IPIP)
朝日ネット v6 コネクト DS-Lite あり(IPIP)

※本記事ではDS-Lite方式とIPIP方式の構成のみ説明しています。

前提条件

  • OpenWrt 22.03.3がインストールされている
  • WAN(eth0)および、LAN(eth1)の物理ポートが存在する
  • オフィシャル配布イメージ モデル:Generic x86/64 の既定のパッケージが導入されている
  • HGW
    • 192.168.1.1/24で、DHCPv4が有効な状態で構成されており、IPv4 PPPoE、IPv6 PPPoE等は接続状態ではない
    • フレッツ・ジョイントで、HGWに DS-LiteやMap-Eなどのソフトが配信されていたり、有効になっていない
    • 詳細設定 > IPv6パケットフィルタ設定(IPoE)
      • IPv6セキュリティのレベル
        • IPv6ファイアウォール機能:有効
        • IPv6セキュリティのレベル:高度
      • IPv6パケットフィルタ設定(IPoE)
        • 全エントリなし


必要な追加パッケージ


事前状態

設定操作を行う端末(以降 PC)のLANポートを、OpenWrt(以降 ルーター)のLANポートに接続します
HGWのLANポートと、ルーターのWANポートはこの時点では接続していないものとします
以降 コマンドと記載のあるものは、SSHでルーターに接続、またはコンソール、または luci-app-commandsで実行する想定です


手順0 IPIP6パッケージの追加

  • 方法1.配布パッケージ Github HiraokaHyperTools/openwrt-ipip6⇒/ipip6_0.1-6_all.ipk
  • 方法2.ルーターのWAN側にインターネット接続可能なルーターを配置し(HG/WにPPPoE IPv4等を構成し)、以下のコマンドで導入
wget -O /lib/netifd/proto/ipip6.sh https://github.com/HiraokaHyperTools/openwrt-ipip6/raw/main/net/ipv6/ipip6/files/ipip6.sh
wget -O /www/luci-static/resources/protocol/ipip6.js https://github.com/HiraokaHyperTools/openwrt-ipip6/raw/main/net/ipv6/ipip6/files/ipip6.js
chmod +x /lib/netifd/proto/ipip6.sh

手順1 ルートテーブルの追加

次のコマンドで 3つのルートテーブルを追加して、再起動します。
echo "200 pppoe" >> /etc/iproute2/rt_tables
echo "201 dslite" >> /etc/iproute2/rt_tables
echo "202 ipip6" >> /etc/iproute2/rt_tables
reboot

手順2 ファイアウォールゾーンの追加

既定の構成で、PCにはルーターから、DHCPでIPアドレス(192.168.1.x/24)が割り当てられているものとします
PCからLuCI(192.168.1.1)に接続し、ログインします。
これ以降、言及のない項目は既定値のまま設定される前提とします。

ネットワーク>ファイアウォール>一般設定>ファイアウォール - ゾーン設定>ゾーン
追加ボタンから、以下の表のとおり3つのゾーンを追加します

設定項目 設定値 設定値 設定値
名前 IPIP6 DSLITE PPPoE
受信 拒否 拒否 拒否
送信 許可 許可 許可
転送 拒否 拒否 拒否
マスカレード チェックあり チェックなし チェックあり
MSSクランプ チェックあり チェックあり チェックあり
送信元ゾーンからの転送を許可する lan lan lan

事前状態

事後状態


操作した結果のコマンドを以下に示します。
# /etc/config/firewall
uci add firewall zone # =cfg10dc81
uci set firewall.@zone[-1].name='IPIP6'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].mtu_fix='1'
uci add firewall forwarding # =cfg11ad58
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='IPIP6'
uci add firewall zone # =cfg12dc81
uci set firewall.@zone[-1].name='DSLITE'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].mtu_fix='1'
uci add firewall forwarding # =cfg13ad58
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='DSLITE'
uci add firewall zone # =cfg14dc81
uci set firewall.@zone[-1].name='PPPoE'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].mtu_fix='1'
uci add firewall forwarding # =cfg15ad58
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='PPPoE'

手順3 PPPoEインターフェースの追加

ネットワーク>インターフェースのインターフェースを新規作成から、以下の表のとおりインターフェースを追加します。
ページ 構成名 構成値
一般設定 名前 PPPOE
プロトコル PPPoE
デバイス eth0
ブート時に起動 チェックなし
PAP/CHAPユーザー名 //プロバイダから提供されるPPPoEの認証ID
PAP/CHAPユーザー名 //プロバイダから提供されるPPPoEの認証PW
詳細設定 MTUを上書き 1454
ピアから通知されたDNSサーバーを使用 チェックなし
IPv4 ルーティングテーブルのオーバーライド pppoe
ファイアウォール設定 ファイアウォールゾーンの作成または割り当て PPPOE
DHCPサーバー DHCPサーバーをセットアップ
-一般 インターフェースを無視 チェックあり
-IPv6設定 RA-Service 無効
DHCPv6-サービス 無効
NDPプロキシ 無効


操作した結果のコマンドを以下に示します。
# /etc/config/dhcp
uci set dhcp.PPPOE=dhcp
uci set dhcp.PPPOE.interface='PPPOE'
uci set dhcp.PPPOE.ignore='1'
# /etc/config/firewall
uci add_list firewall.cfg14dc81.network='PPPOE'
# /etc/config/network
uci set network.PPPOE=interface
uci set network.PPPOE.proto='pppoe'
uci set network.PPPOE.device='eth0'
uci set network.PPPOE.username='{プロバイダから提供されるPPPoEの認証ID}'
uci set network.PPPOE.password='{プロバイダから提供されるPPPoEの認証PW}'
uci set network.PPPOE.ipv6='auto'
uci set network.PPPOE.mtu='1454'
uci set network.PPPOE.peerdns='0'
uci set network.PPPOE.ip4table='pppoe'

手順5 DS-Liteインターフェースの追加

ネットワーク>インターフェースのインターフェースを新規作成から、以下の表のとおりインターフェースを追加します。
ページ 構成名 構成値
一般設定 名前 DSLITE
プロトコル Dual-Stack Lite (RFC6333)
ブート時に起動 チェックなし
DS-Lite AFTRアドレス gw.transix.jp
ローカルIPv6アドレス 空欄のまま
詳細設定 トンネルリンク wan6
トンネルインターフェースでMTUを使用 1460
IPv4 ルーティングテーブルのオーバーライド dslite
ファイアウォール設定 ファイアウォールゾーンの作成または割り当て DSLITE
DHCPサーバー DHCPサーバーをセットアップ
-一般 インターフェースを無視 チェックあり
-IPv6設定 RA-Service 無効
DHCPv6-サービス 無効
NDPプロキシ 無効

操作した結果のコマンドを以下に示します。
# /etc/config/dhcp
uci set dhcp.DSLITE=dhcp
uci set dhcp.DSLITE.interface='DSLITE'
uci set dhcp.DSLITE.ignore='1'
# /etc/config/firewall
uci add_list firewall.cfg12dc81.network='DSLITE'
# /etc/config/network
uci set network.DSLITE=interface
uci set network.DSLITE.proto='dslite'
uci set network.DSLITE.auto='0'
uci set network.DSLITE.peeraddr='gw.transix.jp'
uci set network.DSLITE.tunlink='wan6'
uci set network.DSLITE.encaplimit='ignore'
uci set network.DSLITE.mtu='1460'
uci set network.DSLITE.ip4table='dslite'

手順6 IPIP6インターフェースの追加

ネットワーク>インターフェースのインターフェースを新規作成から、以下の表のとおりインターフェースを追加します。
ページ 構成名 構成値
一般設定 名前 IPIP6
プロトコル IPv4 over IPv6 (ipip6)
ブート時に起動 チェックなし
Tunnel remote IPv6 address //固定IPトンネル終端装置 IPv6アドレス ※
Your global IPv4 address //グローバル固定IPv4アドレス ※
詳細設定 トンネルリンク wan6
トンネルインターフェースでMTUを使用 1460
IPv4 ルーティングテーブルのオーバーライド ipip6
ファイアウォール設定 ファイアウォールゾーンの作成または割り当て IPIP6
DHCPサーバー DHCPサーバーをセットアップ
-一般 インターフェースを無視 チェックあり
-IPv6設定 RA-Service 無効
DHCPv6-サービス 無効
NDPプロキシ 無効
※ インターリンク ZOOT NATIVE IPv4固定IP1個 を契約している場合、
「マイメニューTOP > 各コントロールパネルへ > ZOOT NATIVE 現在のご利用状況 >IPv4固定IP情報」から値を確認可能です。

操作した結果のコマンドを以下に示します。
# /etc/config/dhcp
uci set dhcp.IPIP6=dhcp
uci set dhcp.IPIP6.interface='IPIP6'
uci set dhcp.IPIP6.ignore='1'
# /etc/config/firewall
uci add_list firewall.cfg10dc81.network='IPIP6'
# /etc/config/network
uci set network.IPIP6=interface
uci set network.IPIP6.proto='ipip6'
uci set network.IPIP6.peeraddr='{固定IPトンネル終端装置 IPv6アドレス}'
uci set network.IPIP6.ip4ifaddr='{グローバル固定IPv4アドレス}'
uci set network.IPIP6.tunlink='wan6'
uci set network.IPIP6.encaplimit='ignore'
uci set network.IPIP6.mtu='1460'
uci set network.IPIP6.ip4table='ipip6'
uci set network.IPIP6.auto='0'

手順7 lan(ブリッジ デバイス)の設定変更

ネットワーク>インターフェースから、以下の表のとおりlan(ブリッジ デバイス)の設定を変更します。
ページ 構成名 構成値
一般設定 IPv4アドレス 192.168.2.1
詳細設定 カスタムDNSサーバーを使用 HGWの 情報 > DHCPv6サーバ払い出し状況 > DNSサーバアドレス を指定
HGWの 情報 > DHCPv4サーバ払い出し状況 > DNSサーバアドレス を指定
DHCPサーバー>IPv6設定 RA-Service サーバーモード
DHCPv6-サービス サーバーモード
アナウンスされるIPv 6DNSサーバー HGWの 情報 > DHCPv6サーバ払い出し状況 > DNSサーバアドレス を指定
NDP プロキシ 無効
DHCPサーバー>IPv6 RA 設定 RAフラグ なし

操作した結果のコマンドを以下に示します。
# /etc/config/dhcp
uci del dhcp.lan.ra_slaac
# /etc/config/network
uci set network.lan.ipaddr='192.168.2.1'
uci add_list network.lan.dns='{HGWの 情報 > DHCPv6サーバ払い出し状況 > DNSサーバアドレス }'
uci add_list network.lan.dns='{HGWの 情報 > DHCPv4サーバ払い出し状況 > DNSサーバアドレス }'


手順8 wan6(eth0)の設定変更

ネットワーク>インターフェースから、以下の表のとおりwan6(eth0)の設定を変更します。
ページ 構成名 構成値
DHCPサーバー DHCPサーバーをセットアップ
DHCPサーバー>IPv6設定 Designated master チェック
RA-Service リレーモード
DHCPv6-サービス リレーモード
NDP プロキシ リレーモード

操作した結果のコマンドを以下に示します。
# /etc/config/dhcp
uci set dhcp.wan6=dhcp
uci set dhcp.wan6.interface='wan6'
uci set dhcp.wan6.ignore='1'
uci set dhcp.wan6.master='1'
uci set dhcp.wan6.ra='relay'
uci set dhcp.wan6.dhcpv6='relay'
uci set dhcp.wan6.ndp='relay'
# /etc/config/network
uci set network.wan6.reqaddress='try'
uci set network.wan6.reqprefix='auto'



手順9 WAN6のインターフェースIDの固定

手順2~8が完了したら、諸々保存してルーターを再起動しましょう。
ルーターは192.168.2.1で立ち上がり、PCのDHCPを再取得することで、192.168.2.xのIPが取得できると思います。

最後に、次のコマンドで WAN6のIPv6アドレスを固定化します。
この設定項目は、LuCIから設定できないものです。(wan6>詳細設定>IPv6サフィックスはこの設定項目とは異なります)
uci set network.wan6.ifaceid='::feed'
uci commit
/etc/init.d/network restart

※ 指定する値は、Transixの場合、「インターフェースID」として提供されている値です。
 JPIX(v6プラス)、朝日ネット(v6 コネクト)も同様の名称で提供されているようです(値は異なると思われます)。
 アルテリアネットワークス クロスパスは`::1`固定であるようです。

手順10 接続確認

  • HGWのLANポートとルーターのWANポートを接続します
  • しばらく待ってから以下を確認します
    • DHCPv4によって、wan(eth0)にIPv4(192.168.1.x)が取得される
    • RAによって、wan6(eth0)にIPv6(aaa:bbb:ccc:dd00::feed/64)が取得される
    • DHCPv6 PDによって、wan6(eth0)にaaa:bbb:ccc:dd10::/60が委任される
    • PCのDHCPを再取得すると、IPv6でaaa:bbb:ccc:dd:10::が割り当たる
  • ここまで確認できたら、ネットワーク>インターフェースから ds-DSLITE、ipip6-IPIP6、pppoe-PPPOEを起動します
    • それぞれのインターフェースにIPv4が表示されることが確認できると思います
  • 次に、ルーターから各インターフェースを通じて、インターネットに接続できることを確認します。
    • 定期的に利用する可能性があるため、luci-app-commandsがお勧めです。

説明 コマンド
curl 6 eth0 curl -6 https://domains.google.com/checkip --interface eth0
curl 4 DSLITE curl -4 https://domains.google.com/checkip --interface ds-DSLITE
curl 4 PPPOE curl -4 https://domains.google.com/checkip --interface pppoe-PPPOE
curl 4 IPIP6 curl -4 https://domains.google.com/checkip --interface ipip6-IPIP6

それぞれのサービス毎のアウトバウンド接続のIPアドレスが確認できたら、まずはOKです。
luci-app-commandsで設定した場合のコマンドを以下に示します。
# /etc/config/luci
uci add luci command # =cfg099944
uci set luci.@command[-1].name='curl 6 eth0'
uci set luci.@command[-1].command='curl -6 https://domains.google.com/checkip --interface eth0'
uci add luci command # =cfg0a9944
uci set luci.@command[-1].name='curl 4 DSLITE'
uci set luci.@command[-1].command='curl -4 https://domains.google.com/checkip --interface ds-DSLITE'
uci add luci command # =cfg0b9944
uci set luci.@command[-1].name='curl 4 PPPOE'
uci set luci.@command[-1].command='curl -4 https://domains.google.com/checkip --interface pppoe-PPPOE'
uci add luci command # =cfg0c9944
uci set luci.@command[-1].name='curl 4 IPIP6'
uci set luci.@command[-1].command='curl -4 https://domains.google.com/checkip --interface ipip6-IPIP6'

※ 本当に初回のIPIP6の接続は、次の手順のIPv6アドレス通知を行った後、インターフェースの再起動が必要になる可能性があります

手順11 IPv6アドレス通知の設定

IPIPトンネリング(IPv4 over IPv6トンネル接続)によるIPv4の通信を行う為には、プロバイダ側にその対向のIPv6アドレスを通知する必要があります。
また、フレッツ光のIPv6プレフィックスは半固定で、NTT局舎工事等でプレフィックスが変更になる場合があります。
これを TransixではアップデートサーバーにIPv6のHTTPリクエストを送ることで行っています。

  • luci-app-commandsで設定した場合のコマンドを以下に示します。
# /etc/config/luci
uci add luci command # =cfg0d9944
uci set luci.@command[-1].name='update ipip6'
uci set luci.@command[-1].command='curl {アップデートサーバーの URL}?username={ユーザー名}&password={パスワード}'

  • 各サービス毎の設定値の名称などを以下の表にまとめています。
提供元
サービス名
接続関連の構成値 アップデート関連の構成値
インターネットマルチフィード
Transix
固定IPトンネル終端装置のIPv6アドレス
インターフェースID(指定される値)
固定IPv4アドレス
アップデートサーバーの URL
ユーザー名
パスワード
JPIX
v6プラス
BR の IPv6 アドレス
インターフェースID
固定 IPv4 アドレス
アップデートサーバーの URL
ユーザー名
パスワード
朝日ネット
v6 コネクト
固定 IP トンネル終端装置の IPv6 アドレス
インターフェース ID
固定 IPv4 アドレス
アップデートサーバーの URL
認証キー
認証パスワード
アルテリアネットワークス
クロスパス(Xpass)
固定IPトンネル終端装置のIPv6アドレス
::1(固定値?)
固定IPv4アドレス
DDNSアップデート先URL
FQDN
DDNS ID
DDNS パスワード
Basic認証ID
Basic認証パスワード

  • 各サービス毎の通知コマンドのサンプルを以下に示します。Transix以外は未確認です。
    • インターネットマルチフィード(Transix)
curl {アップデートサーバーの URL}?username={ユーザー名}&password={パスワード}
    • JPIX(v6プラス)
curl {アップデートサーバーの URL}?user={ユーザー名}&pass={パスワード}
    • 朝日ネット(v6コネクト)
curl {アップデートサーバーの URL}?key={認証キー}&pass={認証パスワード}
    • アルテリアネットワークス(クロスパス)
curl -u {Basic認証ID}:{Basic認証パスワード} {DDNSアップデート先URL}?d={FQDN}&p={DDNS パスワード}&a={IPv6アドレス}&u={DDNS ID}

手順12 ルーティングの構成

ネットワーク>ルーティング>IPv4ルールにて、ルートを設定します。
ここでは、単純にすべてのLAN内のクライアントが指定したルートを通るよう構成する例示を行います。



設定後、PCからインターネットにアクセスし、IPv4アドレスを確認してください。
ルーティングの有効なルールに従って、接続経路が切り替わることが確認できるはずです。

操作した結果のコマンドを以下に示します。
# /etc/config/network
uci add network rule # =cfg0f92bd
uci set network.@rule[-1].priority='30000'
uci set network.@rule[-1].in='lan'
uci set network.@rule[-1].lookup='pppoe'
uci add network rule # =cfg1092bd
uci set network.@rule[-1].in='lan'
uci set network.@rule[-1].lookup='dslite'
uci set network.@rule[-1].priority='30000'
uci set network.cfg0f92bd.disabled='1'
uci add network rule # =cfg1092bd
uci set network.@rule[-1].in='lan'
uci set network.@rule[-1].lookup='ipip6'
uci set network.@rule[-1].priority='30000'
uci set network.cfg0f92bd.disabled='1'


その他メモ

参考にしたサイト



スペシャルサンクス

【無線LAN】OpenWrt【強化ファーム】22
https://mao.5ch.net/test/read.cgi/network/1661212984/596
IPv6 Prefixの下位8bitについての教示をいただいた

本ページでは HGW配下で、RAで Prefix下位 8bitが00(hex)となる構成としている(つもり)。
ひかり電話なしのRAや、DHCP-PDから自身に割り当てる?等はどのように構成するか不明。(試した方が居たら、ぜひコメントなどください。)

課題1:MTUについて

PPPoEは1454、DSLite,IPIP6は1460とある。
このページの手順で構成した場合、しばしばWEBページの表示が遅いことがあった。

ネットワーク>インターフェース>デバイスから見える、eth0のMTUが1454となっていたり、pppoe-PPPOEのMTUが1446となっていたり、
PCのPowerShellコマンド`Get-NetIPConfiguration -Detailed -InterfaceAlias "イーサネット"`で確認できる、
NetIPv6Interface.NlMTUが1454、NetIPv4Interface.NlMTUが1500となっていたり
色々なMTU設定箇所を弄った後、このページの手順で構成した値に戻したら 表示される値が変わったりとなかなか よくわからない事象に遭遇した。

設定手段は不明だが、デバイスページのMTUが次の画像の通り、
かつ、PCで確認できる、NetIPv6Interface.NlMTUが1500、NetIPv4Interface.NlMTUが1500という状態の時、
全ての通信が安定するようになった。
(多分低い方に合わせて広報する?等が出来ればいい気がするんだけど、よくわからない)


課題2:IPv6アドレス通知の定期実行

現状は定期実行を構成していない。
そもそも頻繁に変わるものではないそうなので、まぁいいかなと

定期的にやるなら、↓あたり
  • スクリプトを書いて、cronで回す
  • パッケージ ddns-scriptsを入れて実行する…?
 Prefix変更時、ホットプラグイベントが発生するかどうか?するならそれをトリガに~とかありそう

課題3:各種セキュリティ

このページの構成手順で構成した環境に対し、IPv6、各IPv4のグローバルIPアドレスに対してポートスキャン等を行って 到達しないことは確認した(つもり)
(記述者が)ネットワークの専門家ではないので、何等か考慮漏れがある可能性があります。

事前・事後のインターフェース



ファイアウォール

既定値のまま。

uci showした結果を以下に示します。
firewall.@defaults[0]=defaults
firewall.@defaults[0].input='REJECT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@defaults[0].synflood_protect='1'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].network='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].masq='1'
firewall.@zone[1].network='wan' 'wan6'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].forward='REJECT'
firewall.@zone[1].mtu_fix='1'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@zone[2]=zone
firewall.@zone[2].name='IPIP6'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='REJECT'
firewall.@zone[2].network='IPIP6'
firewall.@zone[2].input='REJECT'
firewall.@zone[2].masq='1'
firewall.@zone[2].mtu_fix='1'
firewall.@zone[3]=zone
firewall.@zone[3].name='DSLITE'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].network='DSLITE'
firewall.@zone[3].input='REJECT'
firewall.@zone[3].forward='REJECT'
firewall.@zone[3].mtu_fix='1'
firewall.@zone[4]=zone
firewall.@zone[4].name='PPPoE'
firewall.@zone[4].output='ACCEPT'
firewall.@zone[4].network='PPPOE'
firewall.@zone[4].input='REJECT'
firewall.@zone[4].forward='REJECT'
firewall.@zone[4].masq='1'
firewall.@zone[4].mtu_fix='1'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='lan'
firewall.@forwarding[1].dest='DSLITE'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src='lan'
firewall.@forwarding[2].dest='IPIP6'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].src='lan'
firewall.@forwarding[3].dest='PPPoE'

タグ:

+ タグ編集
  • タグ:
最終更新:2023年09月26日 10:03