Yamaha RTX ルータのセキュリティのデフォルト設定解説(CLIの場合)

スポンサーリンク

CLIでYamaha RTXのWAN(lan2)を設定した場合のセキュリティ設定について解説します。Yamaha RTXとほぼ同じ価格帯のNEC IXはデフォルトでWANからの接続は許可されませんが、yamaha RTXのCLI設定ではデフォルトでは全許可になっていますので、手動のセキュリティ設定が必要である事に注意ください。

設定まとめ

ファイアウォール設定

CLIで設定した場合は、デフォルトではファイアウォールルールは設定されません。インターネットからの全てのアクセスを許容する設定になっています。

ルータに対するアクセス

Yamaha RTXのルータに対するアクセス設定は以下の通りです。

ファームウェアバージョンによってはshow config実施時にデフォルト設定が見えない事もあります

telnetd host lan

show configの出力ではやや分かりづらいと思います。この設定は、GUIでは以下のように表示されます。

以下のスクリーンショットの通り、「同一ネットワーク」からのtelnetおよびhttpは許可されます。

GUIで設定した場合は、デフォルトでファイアウォールルールが適用されますので、WAN側から侵入される事はありません。WANからの侵入が許可されるのはCLIで設定した場合のみです。

Yamaha RTX セキュリティのデフォルト設定

動作確認

動作確認の構成

以下の環境で動作確認を行います。

+-----------------+
| Rocky Linux 8.4 |
|      host201    |
+-------+---------+
 ens192 | .201
        |
        | 201.201.201.0/24
        |
 ens224 | .200
+-------+---------+
| Rocky Linux 8.4 |
|      host200    |
+-------+---------+
 ens192 | .200
        |
        | 200.200.200.0/24
        | 
   lan2 | .1 
+-------+---------+ 
|  Yamaha RTX 810 | 
|       R1        |
+-------+---------+
   lan1 | .1
        |
        | 192.168.100.0/24
        |
 ens192 | .100
+-------+---------+
| Rocky Linux 8.4 |
|      host100    |
+-------+---------+
 ens224 | .100
        |
        | 192.168.101.0/24
        |
 ens192 | .101
+-------+---------+
| Rocky Linux 8.4 |
|      host101    |
+-----------------+

初期設定

lan2へのip addressとstatic routeが設定されている状態で動作確認をします。

[R1:RTX810]
ip route default gateway 200.200.200.200
ip route 192.168.0.0/16 gateway 192.168.100.100
ip lan1 address 192.168.100.1/24
ip lan2 address 200.200.200.1/24
telnetd host lan
dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.100.2-192.168.100.191/24

host100, host200はルーティングを許可する設定を投入します。

/sbin/sysctl -w net.ipv4.ip_forward=1

host100, host101, host200, host201はfirewalldを無効化します。

systemctl disable firewalld.service --now

動作確認 (1) LAN/WAN間のデフォルト設定の疎通確認

LANからWANへの疎通を確認します。host101からhost201へのping, traceroute, sshが可能である事を確認します。

[Host100:Rocky8.4]
[root@host101 ~]# ping -c 3 201.201.201.201
PING 201.201.201.201 (201.201.201.201) 56(84) bytes of data.
64 bytes from 201.201.201.201: icmp_seq=1 ttl=61 time=0.961 ms
64 bytes from 201.201.201.201: icmp_seq=2 ttl=61 time=1.29 ms
64 bytes from 201.201.201.201: icmp_seq=3 ttl=61 time=1.20 ms

--- 201.201.201.201 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 0.961/1.150/1.293/0.139 ms
[root@host101 ~]# 
[root@host101 ~]# 
[root@host101 ~]# 
[root@host101 ~]# traceroute -n 201.201.201.201
traceroute to 201.201.201.201 (201.201.201.201), 30 hops max, 60 byte packets
 1  192.168.101.100  0.837 ms  0.769 ms  0.729 ms
 2  192.168.100.1  0.676 ms  0.639 ms  0.603 ms
 3  200.200.200.200  0.889 ms  0.843 ms  0.807 ms
 4  201.201.201.201  0.971 ms  1.319 ms  1.298 ms
[root@host101 ~]# 
[root@host101 ~]# 
[root@host101 ~]# 
[root@host101 ~]# ssh 201.201.201.201
Last login: Sat Jul  3 17:22:18 2021 from 192.168.101.101
[root@host201 ~]# 

WANからLANへの疎通を確認します。host201からhost101へのping, traceroute, sshが可能である事を確認します。

[Host100:Rocky8.4]
[root@host201 ~]# ping -c 3 192.168.101.101
PING 192.168.101.101 (192.168.101.101) 56(84) bytes of data.
64 bytes from 192.168.101.101: icmp_seq=1 ttl=61 time=1.01 ms
64 bytes from 192.168.101.101: icmp_seq=2 ttl=61 time=1.16 ms
64 bytes from 192.168.101.101: icmp_seq=3 ttl=61 time=1.10 ms

--- 192.168.101.101 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 1.007/1.089/1.160/0.068 ms
[root@host201 ~]# 
[root@host201 ~]# 
[root@host201 ~]# traceroute -n 192.168.101.101
traceroute to 192.168.101.101 (192.168.101.101), 30 hops max, 60 byte packets
 1  201.201.201.200  1.324 ms  1.282 ms  1.230 ms
 2  200.200.200.1  1.175 ms  0.993 ms  0.915 ms
 3  192.168.100.100  0.870 ms  0.655 ms  0.578 ms
 4  192.168.101.101  1.078 ms  1.003 ms  0.958 ms
[root@host201 ~]# 
[root@host201 ~]# 
[root@host201 ~]# ssh 192.168.101.101
Last login: Sat Jul  3 17:25:26 2021 from 201.201.201.201
[root@host101 ~]# 

動作確認 (2) WAN接続許可のデフォルト設定の疎通確認

Yamaha RTXと同一セグメントに属するhost200からYamaha RTXに対して、httpとtelnetの接続が可能である事を確認します。

[root@host200 ~]# curl -I -u ":" http://200.200.200.1
HTTP/1.0 200 OK
Date: Sat, 3 Jul 2021 09:23:13 GMT
Expires: Sat, 3 Jul 2021 09:23:13 GMT
Server:  Router 
Allow: HEAD, GET, POST
Content-Type: text/html
X-Frame-Options: SAMEORIGIN

[root@host200 ~]# 
[root@host200 ~]# 
[root@host200 ~]# telnet 200.200.200.1
Trying 200.200.200.1...
Connected to 200.200.200.1.
Escape character is '^]'.

Password: 

RTX810 BootROM Ver. 1.00
RTX810 FlashROM Table Ver. 1.01

RTX810 Rev.11.01.34 (Tue Nov 26 18:39:12 2019)
Copyright (c) 1994-2019 Yamaha Corporation. All Rights Reserved.
To display the software copyright statement, use 'show copyright' command.
00:a0:de:b0:7b:53, 00:a0:de:b0:7b:54
Memory 128Mbytes, 2LAN

The login password is factory default setting. Please request an administrator to change the password by the 'login password' command.
> 

Yamaha RTXとは別セグメントに属するhost201からはYamaha RTXに対して、httpとtelnetは拒否されている事を確認します。

[root@host201 ~]# curl -I -u ":" http://200.200.200.1
HTTP/1.0 503 Service Unavailable
Date: Sat, 3 Jul 2021 09:25:59 GMT
Expires: Sat, 3 Jul 2021 09:25:59 GMT
Server:  Router 
Allow: HEAD, GET, POST
Content-Type: text/html
X-Frame-Options: SAMEORIGIN

[root@host201 ~]# 
[root@host201 ~]# 
[root@host201 ~]# telnet 200.200.200.1
Trying 200.200.200.1...
Connected to 200.200.200.1.
Escape character is '^]'.
Connection closed by foreign host.
[root@host201 ~]# 

動作確認 (3) セキュリティ設定の強化

telnet, httpともにLAN(lan1)側からの接続のみを許可する設定を入れます。

[R1:RTX810]
telnetd host lan1 
httpd host lan1 

host200からの接続を拒否している事を確認します。

[root@host200 ‾]# curl -I -u ":" http://200.200.200.1
HTTP/1.0 503 Service Unavailable
Date: Sat, 3 Jul 2021 09:29:36 GMT
Expires: Sat, 3 Jul 2021 09:29:36 GMT
Server:  Router 
Allow: HEAD, GET, POST
Content-Type: text/html
X-Frame-Options: SAMEORIGIN

[root@host200 ‾]# 
[root@host200 ‾]# telnet 200.200.200.1
Trying 200.200.200.1...
Connected to 200.200.200.1.
Escape character is '^]'.
Connection closed by foreign host.
[root@host200 ‾]# 
タイトルとURLをコピーしました