ネットワーク技術者の工具ベルト。 SSH / Telnet / シリアルのターミナルに、現場で必要な受信サーバ (Syslog・SNMP Trap・FTP・TFTP・SFTP)をひとまとめにした Windows 向けデスクトップツールです。
ターミナルソフトと、config・イメージを受け渡すためのサーバ類を別々に立ち上げる必要がありません。
English speakers: see English at the bottom. Note that the user interface is in Japanese only.
- SSH / Telnet / シリアル接続
- デバイス管理 — グループに整理してツリーから接続
- 複数タブ — 複数機器へ同時接続してタブで切り替え
- マクロ — よく使うコマンド列を登録して一括実行
- 自動実行コマンド — グループごとに登録したコマンドを、接続直後に自動投入(
terminal length 0など)。ツリーでグループを右クリック →「グループを編集」から設定します。そのグループに登録した機器なら、SSH / Telnet / コンソール(シリアル)のどれで接続しても送られます。ツリーの「コンソール接続」に自動で並ぶ COM ポートはどのグループにも属さないため、送られません。config.json に平文で保存されるため、パスワードは書かないでください - セッションログ — 画面の内容をファイルへ保存
- コピー / ペースト — マウスで範囲を選ぶと、その時点でクリップボードへコピーされます(
Ctrl+Shift+Cでもコピーできます。ターミナルのCtrl+Cは機器への中断送信(0x03)に使うため、端末ソフトの慣習に合わせています)。貼り付けはターミナルの右クリックで、接続中のタブでのみ動きます。改行を含む内容(行ごとにコマンドとして実行されます)や、Ctrl+Zなどの制御文字(タブを除く)を含む内容は、送る前に確認ダイアログで中身を表示します(既定のボタンは「キャンセル」)。貼り付けにキーボードのショートカットはありません - フォントサイズ変更 — 表示メニューから 6〜32pt。開いているタブすべてに即反映され、以降に開くタブにも引き継ぎます
- Syslog 受信 — UDP / TCP、レベルフィルタ付き(既定 514)
- SNMP Trap 受信 — v1 / v2c / v3(USM)に対応。MIB による OID の名前解決、CSV エクスポート(既定 162/UDP)
- SNMP GET / WALK — v1 / v2c / v3(USM)に対応。任意の OID の取得と巡回、結果の CSV / JSON / テキスト出力
- TFTP サーバ — ネットワーク機器の config / イメージ授受(既定 69/UDP)
- FTP サーバ — 同上。匿名・認証の両対応(既定 21/TCP)
- SFTP サーバ / クライアント — 双方向のファイル転送、転送履歴(既定 2222/TCP)。クライアントはターミナルの SSH セッションを使うため、機器へ SSH 接続すると利用できます(機器が SFTP に対応していない場合は使えません)
- ツールエリアのタブ化・切り離し — 各サーバのパネルを別ウィンドウへ分離可能
GET / WALK は認証に MD5 / SHA-1 / SHA-224 / SHA-256 / SHA-384 / SHA-512、 暗号化に DES / 3DES / AES-128 / AES-192 / AES-256 が使えます (AES-192 / AES-256 はベンダー実装で広く使われている Reeder 方式です)。 実際に使える方式は接続先機器の実装に依存します。 SNMP パネルでバージョンに v3 を選ぶと「v3認証」タブが有効になり、 v1/v2c 認証タブは無効になります。ユーザ名は必須で、認証なしでの暗号化は 選べません(実行前に警告して止まります)。
Trap 受信のバージョン選択は「両方」「v1/v2c」「v3」から選べ、既定は 「両方」です。「両方」で v3 のユーザを設定すると、v1/v2c と v3 を同一 ポートで同時に受信します。v3 のユーザを設定しなければ v1/v2c だけを 受信します。
Trap を v3 で受信する場合は、送信元機器の EngineID の登録が必要です。
SNMPv3 の Trap では送信側が authoritative engine となるため、受信側が
あらかじめ機器の EngineID を知っていないと復号・認証ができません。
Cisco IOS なら show snmp engineID で確認できます。EngineID は偶数桁の
16進で(例: 8000000001020304)、複数台から受ける場合は1行に1つずつ
入力してください。v3 のユーザ名を入力したまま EngineID を登録せずに
受信を開始しようとすると、警告が出て止まります。v3 の受信を有効に
するには、まずユーザ名を設定し、その上で EngineID を登録してから
開始してください。
v3 の認証情報は保存されません。アプリを起動するたびに入力が必要です。
受信した Trap の一覧には、どの版・どの保護レベルで届いたかを示す
「セキュリティ」列があり、v3 の場合はユーザ名も出ます(例:
v3 authPriv / netbelt)。この列はエクスポートにも含まれます。
パスワードと、v1/v2c のコミュニティ文字列は出ません。
画面の処理が追いつかない間に届いた Trap は、表示を待つ列に溜まります。
この列の上限は 1000 件(settings.snmp.max_traps をそれより大きくして
いればその値)で、あふれている間に届いた Trap は捨てて数えます(先に
届いていた方が残ります)。捨てた件数は「受信状態」の下に
「取りこぼし: N 件(配送待ちの上限 1000 件。最後 HH:MM:SS)」と出て、
受信開始とクリアで 0 に戻ります。一覧とエクスポートには入りません。
あふれ始めたときと、捌けたあとの件数・時間帯はログ(exe 版は
%LOCALAPPDATA%\NetBelt\logs\。Trap backlog を含む行)にも残ります。
NetBelt を閉じたときと更新を当てたときに、まだ一覧に出ていなかった
Trap は、出し終わるのを待たずに捨て、その件数を別の行
(Discarded N undelivered trap(s) at exit。0 件のときは書きません)に
残します。
NetBelt が数えられるのは、自分の表示待ちで捨てた分だけです。それより
手前で Windows の受信バッファがあふれて落ちた分(毎秒数千件の嵐で
起こります)は NetBelt に届かないので数えられません。取りこぼしが
無かったかは、送信側機器の Trap の送信数(Cisco IOS なら show snmp の
Trap PDUs)と一覧の件数を比べて確かめてください。ただし一覧に残るのは
settings.snmp.max_traps 件(既定 1000 件)までで、それを超えた分は
落ちていなくても古い方から消えます。比べられるのは、送った数が
その件数以下のときだけなので、確かめる前に一覧をクリアしてください。
一覧に残す件数を増やすには、NetBelt を閉じてから config.json の
settings の中に "snmp": {"max_traps": 5000} のように書き足して
(既定の config.json にこの項目はありません。あればその値を大きく
して)、起動し直してください。なお
netstat -s -p udp の「IPv4 の UDP 統計」の「受信エラー」(英語版の
Windows では「UDP Statistics for IPv4」の「Receive Errors」)は、
Windows 11 で 127.0.0.1 宛てに試した範囲では、受信バッファで落ちた分を
数えませんでした。
- ポートチェッカー — この PC のポートが空いているかを調べます(ツール → ポートチェッカー)。指定ポートへ実際にバインドを試し、使用中なら
netstatとtasklistで占有しているプロセスを特定します。Syslog・TFTP・SNMP Trap などの受信サーバが起動できないときの切り分け用です。リモート機器へのポートスキャンではありません - 設定 — ターミナルの配色とフォント、SFTP クライアントの動作、起動時の更新確認を変更できます(ツール → 設定)
- パスワードは Windows DPAPI で暗号化して保存(OS・ユーザーアカウントに紐付け)
- SSH ホストキーの TOFU(Trust On First Use)検証
- GitHub Releases を見に行く自動更新チェック — ダウンロードした ZIP は SHA-256 で照合し、一致しなければ適用しません
1.2.0 以前から更新する場合の注意 更新を当てるのは、いま入っている版に同梱された
updater.batです。そのため 1.2.0 以前から上げるときは、そちらの古い不具合がそのまま出ます(実物の 配布物で確認済み)。
- NetBelt を終了してから更新してください。 起動したままだと実行ファイルを 置き換えられず、1.1.x では失敗を繰り返します。
- 1.2.0 からの更新では、途中で英語のエラー(
ERROR: could not create a work folder in TEMPなど)が出ることがありますが、最後に「更新が完了しました!」が 出ていれば当たっています。- 1.1.x からの更新では、最後まで英語のエラーで終わることがあります。この場合も 実行ファイルは置き換わっているので、
NetBelt.exeを手で起動して版を確かめて ください(ヘルプ → バージョン情報)。- 1.3.0 以降どうしの更新では、これらは起きません。
TEMP のパスに
[や]がある場合 1.3.0 以前からの自動更新は、ZIP の展開で止まります(「ZIPファイルの展開に失敗しました」。 元の版はそのまま残ります)。その 1 回だけ、Releases の ZIP を手で展開して NetBelt の フォルダへ上書きすれば、1.3.1 以降は自動更新で当たります。
- Windows 10 / 11 専用
- パスワードの暗号化に Windows DPAPI を使うため、他 OS では動作しません
- ポータブル版(
.exe)は Python のインストール不要
Releases から
NetBelt-vX.Y.Z-Windows-Portable.zip を取得し、展開して NetBelt.exe を実行してください。
Windows SmartScreen の警告が出る場合は「詳細情報」→「実行」を選んでください (コード署名証明書を持たないため、署名なしの実行ファイルとして扱われます)。
設定(機器・グループなど)は、起動したフォルダの config.json に保存されます(無ければ作ります)。
NetBelt.exe と同じフォルダから起動してください。別のフォルダから起動すると、そのフォルダの
config.json を使うので、設定が分かれます。使っているファイルの場所は、ヘルプ → バージョン情報の
「設定ファイル」に出ます。
受信サーバ(FTP / TFTP / Syslog / SFTP / SNMP Trap)は、起動しても Windows Defender ファイアウォールの受信許可ルールを追加しません。起動しただけで管理者権限(UAC)を求めないためです。 NetBelt を管理者として実行する必要はありません。
そのポートで受信できないときは、各パネルの**「ファイアウォールで許可(管理者)」**を一度押してください。 押したときだけ UAC が表示され、次の 3 つを行います。
NetBelt - <サービス> (<プロトコル>/<ポート>)という名前で、そのポートの受信許可ルールを 追加します(プログラムを限定せず、すべてのプロファイルで有効)。- NetBelt.exe を対象にした既存の受信ルールを、手動で作ったものやブロックのルールも含めて すべて削除します。Windows の初回の確認画面をキャンセルしたときに作られるブロックのルールを 消すためです。ただし、グループ ポリシーで配られたルールは消せず、そのブロックのルールが あると 3 の許可を足しても受信できません。消えたかどうかは確かめないので、1〜3 がすべて 済んだときも、パネルには「既存のブロック規則の除去は確認していません」と添えて表示されます。
- NetBelt.exe のすべてのポートの受信を、すべてのプロファイルで許可するルール
NetBelt - app inbound (self)を追加します。
UAC は、1 のルールのうち無いものや有効な許可になっていないもの 1 つにつき 1 回(FTP のパッシブの ポート範囲は 1 つのルールです)と、2・3 で 1 回表示されます。初めて押したときは最大 3 回(FTP と、 UDP・TCP の両方で受信中の Syslog。ほかは 2 回)、1 のルールがそろった後は 1 回です。 途中の UAC を拒否しても、残りの UAC は表示されます。
v1.3.0 より前の版が自動で作ったルールは、そのまま残っています。同じポートを使い続けるなら 追加の操作は要りません。
アンインストール時にルールを消すには、管理者権限の PowerShell で次を実行してください。
Get-NetFirewallRule -DisplayName 'NetBelt - *' | Remove-NetFirewallRule内蔵の各サーバは 0.0.0.0(すべてのネットワークインターフェース)で待ち受けます。
必要なときだけ起動し、使い終わったら停止してください。
SFTP サーバと FTP サーバのユーザー名・パスワードに既定値はありません。起動のたびに指定が必要です。
TFTP サーバはプロトコル上そもそも認証がありません。既定のルートは ./tftp_root です。
FTP サーバの匿名アクセスを有効にすると、認証なしで読み書きできる状態になります。 ネットワーク機器から認証なしで config を受け取る用途(3CDaemon 的な使い方)を想定した挙動です。
git clone https://github.com/gomanizm/NetBelt.git
cd NetBelt
pip install -r requirements.txt
python src/main.pypip install -r requirements.txt
python -m PyInstaller --clean NetBelt.specdist/NetBelt.exe が生成されます。updater.bat を dist/ へコピーして、
exe と同じフォルダに置いたまま配布してください(build.bat を使う場合は
自動でコピーされます)。自動更新は最後にこのスクリプトを exe の隣から
探すため、無いと更新を適用できません。
python -m pytest tests -qMIB は同梱していません(理由)。 無くても動作し、標準 MIB-II の主要な OID は内蔵の定義で名前解決されます。
ベンダー固有の OID を名前で表示したい場合は、各ベンダーの公式配布元から入手して
mibs/ に置いてください。手順は mibs/README.md にあります。
大量に置くと、初回起動時の解析に時間がかかります(数千本で数分)。 解析が終わるまで SNMP Trap の受信は開始できません。
GNU General Public License v3.0 or later(GPL-3.0-or-later)
GUI に PyQt6(GPL-3.0)を使用しているため、プロジェクト全体も GPL-3.0 に従います。 全文は LICENSE を参照してください。
配布バイナリに対応するソースコードの入手方法(GPL-3.0 第6条)、第三者パッケージの ライセンス表示、MIB を同梱していない理由などは LICENSING.md に まとめています。
個人が自分の業務効率化のために作ったツールを、そのまま公開しているものです。 他人が使うことを主眼に設計してはいないため、UI は日本語のみ、対象は Windows のみで、 既定値も作者の使い方に合わせてあります。サポートは行いません。
- 使い方の質問、導入支援、動作保証には対応できません
- 不具合の報告は Issue で受け付けますが、返信や修正をお約束するものではありません
- 手が空いたときに、低頻度で修正を行う可能性があります
- 現状のまま(AS IS)で提供され、いかなる保証もありません(GPL-3.0 の免責条項のとおり)
以上は作りとサポートの話で、利用の許諾とは別です。ライセンス上は 業務・商用を問わず自由に利用できます(GPL-3.0 は利用目的を制限しません)。 社内で使う分に追加のライセンスは不要です(詳しくは LICENSING.md)。
フォークして自分で直していただくのが確実です。GPL-3.0 なのでご自由にどうぞ。
NetBelt is a Windows desktop tool for network engineers. It combines an SSH / Telnet / serial terminal with the file-transfer and log-collection servers you normally need alongside it, so you do not have to run a separate terminal application and a set of daemons.
The user interface is in Japanese only. There is no localisation at present. Menus, dialogs and log messages are all in Japanese.
- Terminal — SSH, Telnet and serial, with device grouping, tabs, command macros and session logging
- Receivers — Syslog (UDP/TCP 514) with level filtering; SNMP trap (UDP 162, v1/v2c/v3 with USM) with MIB name resolution, community filtering and CSV export
- File transfer — TFTP (UDP 69), FTP (TCP 21) and SFTP (TCP 2222) servers, plus an SFTP client, for moving configs and images to and from network devices. The client rides the terminal's SSH session, so it becomes available once you connect to a device — provided that device supports SFTP.
- Auto commands — commands registered per group are sent right after connecting (e.g.
terminal length 0). Configure them by right-clicking a group in the tree and choosing 「グループを編集」 ("Edit group"). They are sent to the group's registered devices whether you connect over SSH, Telnet or a console (serial) line; COM ports listed automatically under 「コンソール接続」 ("Console connections") belong to no group, so nothing is sent to them. They are stored in plain text inconfig.json, so do not put passwords there. - Copy / paste — selecting text with the mouse copies it to the clipboard right away (
Ctrl+Shift+Calso copies, following terminal-emulator convention:Ctrl+Cin a terminal tab is left free to send an interrupt (0x03) to the device). Right-click in the terminal to paste; this only works on a connected tab. If the text contains a line break (each line would run as a command) or a control character such asCtrl+Z(tabs excepted), a confirmation dialog shows it before anything is sent, with Cancel as the default. There is no keyboard shortcut for paste. - SNMP GET / WALK — v1/v2c/v3 with USM; fetch or walk arbitrary OIDs, export results as CSV / JSON / text
- Port checker — checks whether a port on this PC is free (Tools → ポートチェッカー). It attempts a real bind, and when the port is taken it identifies the owning process via
netstatandtasklist. Meant for troubleshooting why a receiving server (Syslog, TFTP, SNMP Trap, …) will not start. It is not a port scanner for remote devices. - Settings — terminal colors and font, SFTP client behavior, and the startup update check (Tools → 設定)
- Passwords are encrypted with Windows DPAPI, tied to the OS user account
- SSH host keys are verified on a trust-on-first-use basis
- Update checks against GitHub Releases, with SHA-256 verification of the downloaded package
GET/WALK support authentication with MD5, SHA-1, SHA-224, SHA-256, SHA-384 or SHA-512, and encryption with DES, 3DES, AES-128, AES-192 or AES-256 (AES-192 and AES-256 use the Reeder variant, the one most vendor implementations use). Which of these are actually usable depends on the device you connect to. Selecting v3 in the SNMP panel enables the "v3" auth tab and disables the v1/v2c one. A username is required, and encryption cannot be selected without authentication — the app blocks the request and warns instead.
Trap version selection is "Both" / "v1/v2c" / "v3", defaulting to Both. With a v3 user configured, "Both" receives v1/v2c and v3 traps on the same port at the same time; without one it receives v1/v2c only.
Receiving v3 traps requires registering the sending device's EngineID.
In SNMPv3 traps the sender is the authoritative engine, so the receiver
must already know the device's EngineID to authenticate and decrypt the
message. On Cisco IOS, show snmp engineID shows it. EngineIDs are
entered as even-length hex (e.g. 8000000001020304), one per line for
multiple devices. Starting the receiver with a v3 username but no
EngineID registered will warn and refuse to start. To enable v3
reception, set the username first, then register the EngineID,
then start the receiver.
v3 credentials are never saved to disk — they must be re-entered every time the app starts.
The trap list has a security column showing which version and protection
level each trap arrived with, including the v3 username (e.g.
v3 authPriv / netbelt). It is carried into the exports too. Passwords
and v1/v2c community strings are not shown anywhere.
Traps that arrive while the GUI cannot keep up wait in a queue capped at
1000 (or settings.snmp.max_traps, if that is larger). While it is full,
newly arriving traps are dropped and counted, and the earlier ones are
kept. The count appears under the receiver status as
「取りこぼし: N 件…」 ("N dropped"), is reset when reception starts or the
list is cleared, and never goes into the list or the exports. The log
(%LOCALAPPDATA%\NetBelt\logs\ for the exe; lines containing
Trap backlog) records when an overflow
started and, once it drained, how many traps were dropped and when.
Traps not yet shown when NetBelt closes or quits to apply an update are
discarded without waiting for them, and their count goes on a separate
line, Discarded N undelivered trap(s) at exit (omitted when there are
none).
NetBelt can only count what it drops itself. Datagrams that Windows
discards because the receive buffer overflowed (storms of thousands per
second) never reach it. To check for those, compare the sending device's
trap counter (Trap PDUs in Cisco IOS show snmp) with the list. The list
keeps at most settings.snmp.max_traps traps (1000 by default) and removes
the oldest beyond that even when none were lost, so the comparison only
works if no more traps were sent than that. Clear the list first. To
keep more, close NetBelt, add "snmp": {"max_traps": 5000} (or another
number) under settings in config.json (the default file does not have
it; if yours does, raise the value) and start it again. In a test
against 127.0.0.1 on Windows 11, the "Receive Errors" line of
netstat -s -p udp did not count receive-buffer overflows.
Windows 10 / 11 only. The password store uses Windows DPAPI, so it does not run on other platforms. The portable build does not require Python.
See Releases. Windows SmartScreen will warn about the executable because it is not code-signed; choose More info then Run anyway.
Settings (devices, groups and so on) are kept in config.json in the folder
NetBelt is started from, which is created if it is missing. Start NetBelt.exe
from its own folder: started from another folder, it uses the config.json
there, so your settings end up split. Help → バージョン情報 ("Version info")
shows the full path of the file in use.
Starting a server does not add Windows Defender Firewall rules, so NetBelt never asks for administrator rights (UAC) just by starting, and it does not need to be run as administrator. If a server receives nothing, press 「ファイアウォールで許可(管理者)」 ("Allow through firewall (admin)") in its panel. It:
- adds an inbound allow rule for that port,
NetBelt - <service> (<protocol>/<port>)(any program, all profiles); - deletes every existing inbound rule for NetBelt.exe, including rules you created yourself and block rules (this is how it removes the block rule Windows creates when its first-run prompt is cancelled). Rules pushed by Group Policy are not deleted, and a block rule among them still stops traffic after step 3. The deletion is not checked, so the panel says so even when every step succeeds;
- allows all inbound traffic to NetBelt.exe on all profiles
(
NetBelt - app inbound (self)).
UAC appears once for each step 1 rule that is missing or not an enabled allow rule (the FTP passive port range is a single rule), plus once for steps 2 and 3: up to 3 times on the first press, and once per press after the step 1 rules exist.
Each server listens on 0.0.0.0. Start them only when needed and stop them
afterwards. SFTP and FTP require a username and password to be entered every
time — there are no defaults. TFTP has no authentication at all, by protocol design.
None are bundled — see LICENSING.md
for the reason. The application works without them; common MIB-II OIDs are
resolved from a built-in table. To resolve vendor-specific OIDs, obtain the MIBs
from your vendor and place them in mibs/ (see mibs/README.md).
GPL-3.0-or-later. The GUI uses PyQt6, which is GPL-3.0, so the project as a whole follows GPL-3.0. See LICENSE for the full text.
Corresponding source for released binaries (GPL-3.0 section 6), third-party notices, and the reasoning behind the bundling decisions are documented in LICENSING.md.
None. This is a personal tool the author built to speed up their own work, published as is. It is not designed with other users in mind: the interface is Japanese only, it runs on Windows only, and the defaults suit the author's workflow. Bug reports are welcome as issues, but replies and fixes are not promised; fixes may happen infrequently, if at all.
That is a statement about design and support, not about permission. You are free to use it commercially and at work — GPL-3.0 places no restriction on purpose. Using it inside your organisation needs no additional licence; see LICENSING.md for the details. Forking and fixing it yourself is the reliable option — GPL-3.0, so please do.