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の本体のダウンロード
-
Juniper.net でアカウント登録
-
vSRXのイメージ 「vSRX VMware Appliance with IDE virtual disk」をダウンロード
-
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+B | Back on character |
Ctrl+F | Forward one character |
Ctrl+A | To beginning of line |
Ctrl+E | To end of line |
文字の削除
コマンド | コマンドの意味 |
---|---|
Delete or | |
backspace key | Delete character before cursor |
Ctrl+D | Delete character under cursor |
Ctrl+K | Delete from cursor to end of line |
Ctrl+U | Delete all Characters |
Ctrl+W | Delete entire word to left of cursor |
その他
コマンド | コマンドの意味 |
---|---|
Ctrl+L | Redraw yhe current line |
Ctrl+P | Move backwords through command history |
Ctrl+N | Move forward through command history |
Help
コマンド | コマンドの意味 |
---|---|
? | 次に入力すべきコマンドやパラメータのヒント |
tabもしくはspaceでキーコマンドを補完できる