見出し画像

ヤマハルーター「NVR510」の設定

2020年の秋、自宅のルーターをヤマハNVR510に変更しました。それまではNTTからのレンタル品を使っていましたが、IPv6の恩恵を最大化するためにPPPoE接続からIPoE接続への変更が目的です。しかし、設定の参考情報はネット上に多くあるものの、自宅の環境に設定するには、NVR510のGUIでの設定だけでは困難でconfigを書く必要がありました。私、ネットワークエンジニアではありませんので、まぁまぁ苦労しました。更に、特定の機器のみPPPoEで接続しなければならない状況も発生してしまいまして、その設定も追加しなくてはならなくなりました。

フレッツ 光ネクスト IPoE+ひかり電話

現在、NTTのフレッツ 光ネクストを使っています。ひかり電話も契約していますのでルーターに有線で電話機がつながっています。その環境は継続しますので『フレッツ光ネクスト インターネット(IPv6 IPoE)接続+ひかり電話』の設定が必要です。

IPv4 over IPv6技術(DS-Lite方式)

IPoEについては、現在契約しているISPはtransix(トランジックス)サービスを利用していますので、transix IPv4接続(DS-Lite)設定をする必要があります。IPv4 over IPv6技術(DS-Lite方式)は、IPv6インターネット上でIPv4インターネット接続を実現するものです。

特定の機器のPPPoE接続

なんとか設定が終わり順調だったのですが、iPhoneのWeb会議のあるアプリで音声が通じない事象が出てしまいました。回避方法が見つからないため仕方なく、iPhoneのWiFiに固定IPアドレスを設定し、その固定IPアドレスのTCPとUDPのみPPPoEで接続することにしました。

最終的に

GUIで、ユーザー、フィルター、監視、ログ採取、メール通知、時刻同期などの設定を行いました。それらを含んだconfigは以下の通りです。多くの方のサイトやメーカーの提供する情報を参考に作成しました。あくまでも素人の作成したconfigですので間違いもあると思いますが、多くの方々に感謝するとともに、この情報が他の方の参考になれば幸いです。

免責

このページの情報を利用して生じた不具合やあらゆる損害等については、理由の如何に関わらず一切責任を負いません。ご了承ください。

#
# USER情報
#
administrator password [password]
login user [user] [password]
user attribute connection=serial,telnet,remote,ssh,sftp,http gui-page=dashboard,lan-map,config login-timer=300
user attribute tkstyshr connection=serial,telnet,remote,ssh,sftp,http gui-page=dashboard,lan-map,config login-timer=1200
#
# 経路設定
#
ip route default gateway pp 1 filter 500001 500002 gateway tunnel 1
ipv6 route default gateway dhcp lan2
#
# LANの設定(LAN1ポート)
#
ip lan1 address [ip address]/24
ipv6 lan1 address dhcp-prefix@lan2::1/64
ipv6 lan1 rtadv send 1 o_flag=on
#
# NGNとの接続設定(LAN2ポート)
#
description lan2 NTT-IPoE
ipv6 prefix 1 dhcp-prefix@lan2::/64
ipv6 lan1 dhcp service server
ip lan2 address dhcp
ipv6 lan2 address dhcp
ipv6 lan2 dhcp service client
ngn type lan2 ntt
#
# DHCPの設定
#
dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 [ip address]-[ip address]/24
dhcp client release linkdown on
#
# 特定IPアドレスのPPPoE設定
#
pp disable all
pp select 1
description pp NTT-PPPoE
pp keepalive interval 30 retry-interval=30 count=12
pppoe use lan2
pppoe auto disconnect off
pp auth accept pap chap
pp auth myname [id] [password]
ppp lcp mru on 1454
ppp ipcp ipaddress on
ppp ipcp msext on
ppp ccp type none
ip pp secure filter in 200003 200020 200021 200022 200023 200024 200025 200030 200032
ip pp secure filter out 200013 200020 200021 200022 200023 200024 200025 200026 200027 200099 dynamic 200080 200081 200082 200083 200084 200085 200098 200099
ip pp nat descriptor 1000
pp enable 1
#
# AFTRに対するIPIPの設定
#
no tunnel enable all
tunnel select 1
tunnel encapsulation ipip
tunnel endpoint name gw.transix.jp fqdn
tunnel enable 1
#
# フィルターの設定
#
ip filter 200000 reject 10.0.0.0/8 * * * *
ip filter 200001 reject 172.16.0.0/12 * * * *
ip filter 200002 reject 192.168.0.0/16 * * * *
ip filter 200003 reject 192.168.1.0/24 * * * *
ip filter 200010 reject * 10.0.0.0/8 * * *
ip filter 200011 reject * 172.16.0.0/12 * * *
ip filter 200012 reject * 192.168.0.0/16 * * *
ip filter 200013 reject * 192.168.1.0/24 * * *
ip filter 200020 reject * * udp,tcp 135 *
ip filter 200021 reject * * udp,tcp * 135
ip filter 200022 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 200023 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 200024 reject * * udp,tcp 445 *
ip filter 200025 reject * * udp,tcp * 445
ip filter 200026 restrict * * tcpfin * www,21,nntp
ip filter 200027 restrict * * tcprst * www,21,nntp
ip filter 200030 pass * 192.168.1.0/24 icmp * *
ip filter 200031 pass * 192.168.1.0/24 established * *
ip filter 200032 pass * 192.168.1.0/24 tcp * ident
ip filter 200033 pass * 192.168.1.0/24 tcp ftpdata *
ip filter 200034 pass * 192.168.1.0/24 tcp,udp * domain
ip filter 200035 pass * 192.168.1.0/24 udp domain *
ip filter 200036 pass * 192.168.1.0/24 udp * ntp
ip filter 200037 pass * 192.168.1.0/24 udp ntp *
ip filter 200099 pass * * * * *
# 特定IPアドレスの設定
ip filter 500000 restrict * * * * *
ip filter 500001 pass-log [ip address] * tcp * *
ip filter 500002 pass-log [ip address] * udp * *
#
ip filter dynamic 200080 * * ftp
ip filter dynamic 200081 * * domain
ip filter dynamic 200082 * * www
ip filter dynamic 200083 * * smtp
ip filter dynamic 200084 * * pop3
ip filter dynamic 200085 * * submission
ip filter dynamic 200098 * * tcp
ip filter dynamic 200099 * * udp
#
# NATの設定
#
nat descriptor type 1000 masquerade
#
# DNSの設定
#
dns server dhcp lan2
#
# 電話の設定
#
analog supplementary-service pseudo call-waiting
analog extension emergency-call-dial type normal-number
analog extension dial prefix sip prefix="9#"
analog extension dial prefix port=1 ngn lan2
analog extension dial prefix port=2 ngn lan2
analog call route-table 1 1
analog call route 1 * * ngn lan2 * line
sip use on
sip codec permit lan2 g711u
#
# 時刻調整設定
#
schedule at 1 */* 00:00:00 * ntpdate ntp.nict.jp syslog
#
# メール通知設定
#
mail server name 1 [name]
mail server smtp 1 [address] port=[port] smtp-auth [username] [password] plain
mail template 1 1 From:[mail address] To:[mail address] "Subject:YAMAHA NVR510 Status"
mail notify 1 1 trigger lan-map
mail notify 2 1 trigger status interface
#
# SDログ設定
#
external-memory syslog filename "sd1:/System Volume Information/IndexerVolumeGuid" limit=10 backup=10
#
# トラフィック統計設定
#
statistics traffic on
#
# アラーム音設定
#
alarm connection data off
alarm usbhost off
alarm sd off
#
# WAN監視設定
#
switch control use lan1 on terminal=on
ip lan2 intrusion detection in on
ip lan2 intrusion detection in ip on reject=off
ip lan2 intrusion detection in ip-option on reject=off
ip lan2 intrusion detection in fragment on reject=off
ip lan2 intrusion detection in icmp on reject=off
ip lan2 intrusion detection in udp on reject=off
ip lan2 intrusion detection in tcp on reject=off
ip lan2 intrusion detection in default off
ip lan2 intrusion detection out on
ip lan2 intrusion detection out ftp on reject=off
ip lan2 intrusion detection out winny on reject=off
ip lan2 intrusion detection out share on reject=off

この記事が気に入ったらサポートをしてみませんか?