VyOS で PPPoE を使ってインターネット接続する設定例です。PPPoE インターフェイス、外向き firewall、NAPT をセットで考えると整理しやすくなります。
参考
書籍
書籍
参考書籍
マスタリング TCP/IP ルーティング編
ルーティング、NAT、VPN、ネットワーク設計の基礎を体系的に確認したい場合の参考書籍です。価格や在庫はリンク先で確認してください。
Amazon で見るこのリンクは Amazon アソシエイトリンクです。
この記事は、現在の主軸である VyOS 1.5 で読むことを前提に、過去の VyOS 1.4 記事の内容も整理しています。PPPoE 接続設定 はバージョン差よりも、インターフェイス、経路、NAT、firewall をどう組み合わせるかが重要です。細かなコマンドや表示は利用している ISO で確認してください。
PPPoE 接続で決めること
PPPoE では、物理 WAN インターフェイスの上に pppoe0 のような論理インターフェイスを作ります。そのため、firewall や NAPT の適用先も、物理インターフェイスではなく PPPoE インターフェイスを基準に確認します。
外向き 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
savePPPoE インターフェイス
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
saveNAPT
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、デフォルトルート、MTU / MSS を一体で確認することが重要です。
VyOS PPPoE インターネット接続設定


