手当たり次第に書くんだ

飽きっぽいのは本能

VyOS 1.4 PPPoE インターネット接続設定

VyOS 1.4 で PPPoE を使ってインターネット接続する設定例です。PPPoE インターフェイス、外向き firewall、NAPT をセットで考えると整理しやすくなります。

firewall

configure
set firewall name outside-in default-action 'drop'
set firewall name outside-in enable-default-log
set firewall name outside-in rule 10 action 'accept'
set firewall name outside-in rule 10 state established 'enable'
set firewall name outside-in rule 10 state related 'enable'
set firewall name outside-local default-action 'drop'
set firewall name outside-local enable-default-log
set firewall name outside-local rule 10 action 'accept'
set firewall name outside-local rule 10 state established 'enable'
set firewall name outside-local rule 10 state related 'enable'
commit
save

PPPoE インターフェイス

configure
set interfaces ethernet eth0 description 'wan'
set interfaces pppoe pppoe0 authentication user 'pppoe-user'
set interfaces pppoe pppoe0 authentication password 'pppoe-password'
set interfaces pppoe pppoe0 source-interface 'eth0'
set interfaces pppoe pppoe0 firewall in name 'outside-in'
set interfaces pppoe pppoe0 firewall local name 'outside-local'
commit
save

NAPT

configure
set nat source rule 500 outbound-interface 'pppoe0'
set nat source rule 500 source address '192.168.0.0/16'
set nat source rule 500 translation address 'masquerade'
commit
save

確認

show interfaces pppoe
show nat source rules
show firewall name outside-in
ping 8.8.8.8

まとめ

PPPoE は WAN インターフェイスそのものを作るため、firewall と NAT の適用先も `pppoe0` になります。PPPoE、firewall、NAPT、デフォルトルートを一体で確認することが重要です。

VyOS 1.4 PPPoE インターネット接続設定

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)

トップへ戻る