generated at
FortiGate 50E にOpenWrtをインストールする
FortiGate 50EOpenWrtをインストールする手順

基本的には以下の記事のとおり

詰まったところ
ipアドレスの設定
家のルータに繋ぐのはLAN1の方

firewall
wanからssh


イメージの取得
リリース版だとOpenWrtをインストールできない個体がときどきあるので、SNAPSHOT版を使用する必要がある
以下のページからSNAPSHOT版のイメージをダウンロードする
initramfs と sysupgrade イメージの両方必要
initramfs イメージ
snapshot版を普通にダウンロードする
sysupgrade イメージ
インストールされるパッケージのカスタマイズ から luci を含めるようにする

FTPサーバの起動
openwrt-mvebu-cortexa9-fortinet_fg-50e-initramfs-kernel.bin をカレントディレクトリに置いたうえで、以下のコマンドを実行する
sh
docker run --rm -p 69:69/udp -v "$(pwd)"/openwrt-mvebu-cortexa9-fortinet_fg-50e-initramfs-kernel.bin:/tftpboot/image.out:ro jumanjiman/tftp-hpa
メモ
tftp-hpaはDebianプロジェクト推奨のTFTPサーバらしいので、割と安心して使える

シリアルコンソールへの接続
電源を切る
コンソールケーブルをCONSOLEポートに挿す
CISCOのコンソールケーブルと同じものが使える
以下のコマンドを実行する
sh
screen /dev/ttyUSB0
デバイス名はコンソールケーブルや環境によって違うことがある
電源をいれる
Please wait for OS to boot, or press any key to display configuration menu.. と出てきたらすかさずEnterキーを押す



ブートメニュー
txt
FortiGate-50E (17:37-01.31.2017) Ver:05000016 Serial number: FGT50E3U17043203 CPU(00): 1600MHz Total RAM: 2GB Initializing boot device... Initializing MAC... egiga1 Please wait for OS to boot, or press any key to display configuration menu.. [C]: Configure TFTP parameters. [R]: Review TFTP parameters. [T]: Initiate TFTP firmware transfer. [F]: Format boot device. [I]: System information. [B]: Boot with backup firmware and set as default. [Q]: Quit menu and continue to boot. [H]: Display this list of options. Enter C,R,T,F,I,B,Q,or H:

R を押すと現在のTFTPサーバの設定が確認できる


Review TFTP parameters
txt
Image download port: WAN1 DHCP status: Disabled Local VLAN ID: <NULL> Local IP address: 192.168.1.188 Local subnet mask: 255.255.255.0 Local gateway: 192.168.1.254 TFTP server IP address: 192.168.1.168 Firmware file name: image.out Enter C,R,T,F,I,B,Q,or H:


Configure TFTP parameters
txt
[P]: Set firmware download port. [D]: Set DHCP mode. [I]: Set local IP address. [S]: Set local subnet mask. [G]: Set local gateway. [V]: Set local VLAN ID. [T]: Set remote TFTP server IP address. [F]: Set firmware file name. [E]: Reset TFTP parameters to factory defaults. [R]: Review TFTP parameters. [N]: Diagnose networking(ping). [Q]: Quit this menu. [H]: Display this list of options. Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:

N を押すとpingなどがおこなえる