JuniperのvSRX(JUNOS)を試す

最低動作環境

- CPU : 2コア - RAM : 4GB - HDD : 16GB - NIC : WAN用 - NIC : LAN用

サポート環境

- VMware ESXi, NSX, - KVM (Centos, Ubuntu) - vRealize Orchestrator - OpenStack - Amazon Web Service - Microsoft Azure

vSRXの本体のダウンロード

  1. Juniper.net  でアカウント登録

  2. vSRXのイメージ 「vSRX VMware Appliance with IDE virtual disk」をダウンロード

  3. VMware ESXiにvSRXイメージを取り込む

vSRXの初期設定

rootでログイン

login : root pass : そのままEnterを押下

モードの移動

表示コマンドモード名用途
ログイン時シェルモード UNIXコマンドが使用可能 
>cliオペレーションモード パラメータの表示、プロセスのシャットダウンや再起動、情報のClearが可能 
#configureコンフィグレーションモード設定の編集が可能

シェルモード → オペレーションモード → コンフィグレーションモードの陣に入る

以下はコンフィグレーションモードでの作業です。

ホスト名の設定

root# set system host-name 任意のホスト名

rootパスワードの変更

root# set system root-authentication plain-text-password New password:任意のrootパスワード Retype new password:上記のrootパスワード

タイムゾーンの設定

root# set system time-zone Asia/Tokyo

ユーザの作成

root# set system login user ユーザ名 class super-user root# set system login user ユーザ名 authentication plain-text-password New password:任意のユーザパスワード Retype new password:上記のユーザパスワード

WAN側インターフェース(ge-0/0/0.0)の設定

DHCPによるアドレス自動割当を設定する。

root# set interfaces ge-0/0/0 unit 0 family inet dhcp root# commit

固定IPアドレスを設定する。

root# set interfaces ge-0/0/0 unit 0 family inet address 任意のWAN側IPアドレス/マスク長 root# set routing-options static route 0/0 next-hop ゲートウェイIPアドレス root# commit

設定の確認と適用

root# commit check root# commit

コンフイグレーションモードからオペレーションモードへ移動する.

root# exit

WAN側インターフェース(ge-0/0/0.0)にIPが降られているかを確認する。

root> show interfaces terse
Interface Admin Link Proto Local     Renote ge-0/0/0 up up ge-0/0/0.0 up up inet WAN側IPアドレス ge-0/0/0 up up

ここまでできればSSHやHTTPによる接続が可能になる。

FireWallとして利用する。

モード:Flow-based forwarding (Default)

LAN側インターフェース(ge-0/0/1.0)の設定

固定IPアドレスを設定する。

root# set interfaces ge-0/0/1 unit 0 family inet address 任意のLAN側IPアドレス/マスク長 root# commit check root# commit

上位ルータに対するデフォルトルートを指定する。

root# set routing-options static route 0.0.0.0/0 next-hop

セキュリティゾーン(FireWall)の設定。

WAN側:untrust LAN側:trust

root# set security zones security-zone trust interfaces ge-0/0/1.0 host-inbound-traffic system-service ssh root# set security zones security-zone trust interfaces ge-0/0/1.0 host-inbound-traffic system-service ping root# set security zones security-zone trust interfaces ge-0/0/1.0 host-inbound-traffic system-service http root# set security zones security-zone trust interfaces ge-0/0/1.0 host-inbound-traffic system-service https

NATの設定

root# set security nat source rule-set trust-to-untrust from zone trust root# set security nat source rule-set trust-to-untrust to zone untrust root# set security nat source rule-set trust-to-untrust rule trust-to-untrust-rule match source-address 0.0.0.0/0 root# set security nat source rule-set trust-to-untrust rule trust-to-untrust-rule then source-nat interface root# commit check root# commit

DHCPサーバの設定

root# set system services dhcp pool ネットワークアドレス/マスク長 address-range low 開始IP high 末尾IP root# set system services dhcp pool ネットワークアドレス/マスク長 router LAN側IP root# set security zones security-zone trust interfaces ge-0/0/1.0 host-inbound-traffic system-services dhcp

運用関連

ショートカットキー

カーソルの移動

コマンドコマンドの意味
Ctrl+BBack on character
Ctrl+FForward one character
Ctrl+ATo beginning of line
Ctrl+ETo end of line

文字の削除

コマンドコマンドの意味
Delete or
backspace keyDelete character before cursor
Ctrl+DDelete character under cursor
Ctrl+KDelete from cursor to end of line
Ctrl+UDelete all Characters
Ctrl+WDelete entire word to left of cursor

その他

コマンドコマンドの意味
Ctrl+LRedraw yhe current line
Ctrl+PMove backwords through command history
Ctrl+NMove forward through command history

Help

コマンドコマンドの意味
次に入力すべきコマンドやパラメータのヒント

tabもしくはspaceでキーコマンドを補完できる

参考資料