Skip to content
cccskills
FreePublished on GitHub

tftp-server

Docker TFTP サーバ。jumanjiman/tftp-hpa コンテナで一時的な TFTP サービスを提供する。

The English summary is being prepared. Showing the original description.

Works withDocker
See how to install

Files included (1)

  • SKILL.md3.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

TFTP Server スキル

Docker コンテナで一時的な TFTP サーバを起動する。

概要

項目値
コンテナイメージjumanjiman/tftp-hpa
プロトコルUDP 69
TFTP ルートコンテナ内 /tftpboot/
用途iDRAC FW アップデート (firmimg.d7 配信)

起動コマンド

docker run --rm -d --name tftp-server \
    -p 69:69/udp \
    -v /path/to/firmimg.d7:/tftpboot/firmimg.d7:ro \
    jumanjiman/tftp-hpa
  • --rm: 停止時にコンテナ自動削除
  • -d: バックグラウンド実行
  • -p 69:69/udp: ホストの UDP 69 をコンテナに転送
  • -v ...:/tftpboot/...:ro: ファイルをコンテナ内の TFTP ルートにマウント

ファイルパーミッション要件

TFTP で配信するファイルは 644 (全ユーザ読み取り可) が必須。

chmod 644 /path/to/firmimg.d7

tftpd-hpa は File must have global read permissions エラーを返し、600 (owner のみ) のファイルは配信できない。

動作確認

Python UDP テスト

TFTP RRQ パケットを送信し、DATA 応答を確認する:

import socket
import struct

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(5)

filename = b"firmimg.d7"
mode = b"octet"
rrq = struct.pack("!H", 1) + filename + b"\x00" + mode + b"\x00"

sock.sendto(rrq, ("127.0.0.1", 69))
data, addr = sock.recvfrom(1024)

opcode = struct.unpack("!H", data[:2])[0]
if opcode == 3:
    print("OK: TFTP DATA received")
elif opcode == 5:
    errmsg = data[4:].decode(errors="replace").rstrip("\x00")
    print(f"ERROR: {errmsg}")
sock.close()
  • opcode 3 = DATA (成功)
  • opcode 5 = ERROR

テストスクリプトは tmp/<session-id>/tftp-test.py に書いて python3 tmp/<session-id>/tftp-test.py で実行する。

docker logs 確認

docker logs tftp-server

ファイル差し替え

FW ファイルを差し替える場合はコンテナを再起動する:

docker stop tftp-server
docker run --rm -d --name tftp-server \
    -p 69:69/udp \
    -v /path/to/new-firmimg.d7:/tftpboot/firmimg.d7:ro \
    jumanjiman/tftp-hpa

停止

docker stop tftp-server

--rm フラグにより停止時にコンテナが自動削除される。

注意事項

  • UDP ポート 69: 他のプロセスが使用中でないことを確認。sudo ss -ulnp sport = :69 でチェック
  • ファイアウォール: iptables/nftables で UDP 69 が許可されていること。ラボ環境ではデフォルトで開放済み
  • iDRAC からの接続: iDRAC → ローカルマシンの IP (10.1.6.1 等) に TFTP で接続する。iDRAC から ping 確認してから使用すること
  • ローカル UDP テストの制限: Docker の UDP ポートフォワーディングは環境によってはローカルホスト (127.0.0.1) からのテストに応答しないことがある。Python TFTP テストがタイムアウトする場合は、実際の iDRAC からの接続で動作確認すること

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Supermicro X11DPU/X10DRT-P BIOS Setup 操作。KVM スクリーンショット + キーストロークで BIOS メニューを操作する。BIOS 設定変更、確認、保存を行う。4-6号機 + 10号機対応。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

Dell ファームウェアダウンロード。Playwright で dl.dell.com から BIN を取得し firmimg.d7 を抽出する。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

Mellanox SX6036 InfiniBand スイッチのシリアルコンソール操作。ステータス確認、show コマンド、IB 設定、FW 管理を行う。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

idrac7

Free

iDRAC7 基本操作。SSH 経由で racadm コマンドを実行し、サーバ管理を行う。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

iDRAC7 ファームウェアアップデート。段階的アップグレードパスに従い TFTP 経由で適用する。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

Fujitsu iRMC S4 (TX1320 M3 等) の電源・BIOS・RAID 操作 + BIOS 設定リファレンス。Redfish (HTTPS + SECLEVEL=0) 経由の電源/ブート操作 + iRMC Web UI/KVM 経由の手動 BIOS/RAID 操作手順 + 全 BIOS 設定項目の網羅リファレンス (bios/)。training-tx1320 対応。

The English summary is being prepared. Showing the original description.

miminashi/pvese19Updated Jul 6, 2026

See all skills by miminashi

Report a problem with this skill