LoginSignup
4
3

More than 1 year has passed since last update.

ASUSのルーターのCLIで遊ぶ

Last updated at Posted at 2021-01-16

はじめに

ASUSのルーターは, CLIでログインできる.
個人的に, よく使うコマンドや参照するファイルをまとめる.

CLIログインの有効化の方法は, 以下の公式FAQを参照

確認機種

管理画面は, 以下のASUS公式でデモがあるので, 試しに触ることができる.

nw_map.png

基本

  • NVRAMに保存するパラメータ一覧を表示
# nvram show

なお, JFFS (/jffs/nvram) のディレクトリ配下でも確認できる.

ネットワーク

管理画面で確認できる接続 (NAT) 履歴 は, CLIでは /tmp/connect.log で確認できる.

nat.png

ワイヤレス

wlコマンドを使う.

# wl status
SSID: "skkzsh12ap"
Mode: Managed   RSSI: 0 dBm     SNR: 0 dB       noise: -87 dBm  Channel: 10
BSSID: AA:BB:CC:DD:EE:FF        Capability: ESS ShortSlot RRM
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HE Capable:
        Chanspec: 2.4GHz channel 10 20MHz (0x100a)
        Primary channel: 10
        HT Capabilities: 40MHz SGI20 SGI40
        Supported HT MCS : 0-15
        Supported VHT MCS:
                NSS1 Tx: 0-11        Rx: 0-11
                NSS2 Tx: 0-11        Rx: 0-11
        Supported HE MCS:
            20/40/80 MHz:
                NSS1 Tx: 0-11        Rx: 0-11
                NSS2 Tx: 0-11        Rx: 0-11

DHCP

# nvram get dhcp_staticlist

また, 以下のようにプロセスを確認すると, dnsmasqを使用していることが分かる.

# ps | grep dns | grep -v grep
 1359 nobody    2380 S    dnsmasq --log-async

よって, DHCPの設定/etc/dnsmasq.conf で確認できる.
DHCPリースの状態 (リース時間, MACアドレス, IPアドレス, ホスト名)/var/lib/misc/dnsmasq.leases で確認できる.

dhcp_lease.png

IPv6

# nvram get ipv6_fw_rulelist

デーモン

# ps | grep :22 | grep -v grep
 1282 nobody    2312 S    dropbear -p 192.168.50.1:22 -a

より, SSHサーバはdropbearを使っていることが分かる.

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3