labunix's blog

labunixのラボUnix

vSRX15.1の評価版(60日間)をvSphere6.0で試してみる。

■vSRX15.1の評価版(60日間)をvSphere6.0で試してみる。
 以下の評価版のダウンロードにはアカウントが必要。

 The best way to try our next-gen vSRX firewall? Download it.
 http://www.juniper.net/us/en/dm/free-vsrx-trial/

■ホスト環境

# vmware -v -l
VMware ESXi 6.0.0 build-3029758
VMware ESXi 6.0.0 Update 1

# vim-cmd hostsvc/hosthardware | \
    awk -F\" '/description/{print $(NF-1)}'
Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz

# vim-cmd hostsvc/hosthardware | \
    awk '/memorySize.*,/{print $3/1024/1024/1024"GB"}'
15.8742GB

■OVAのサイズも2GBもある。

$ md5sum < media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova 
374a8f8fe6c0472e95dd48584acc8d67  -

$ du media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova 
2106276	media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova

■OVFをデプロイ
 2コアCPUの4GBメモリと要求も高いです。

$ ovftool iso_system/vSRX/media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova | \
    grep -v "^\$" | tail -26 | head -20
Virtual Machines:
  Name:               Juniper Virtual SRX
  Operating System:   other3xlinux64guest
  Virtual Hardware:
    Families:         vmx-09 
    Number of CPUs:   2
    Cores per socket: 1
    Memory:           4.00 GB
    Disks:
      Index:          0
      Instance ID:    5
      Capacity:       16.00 GB
      Disk Types:     IDE 
    NICs:
      Adapter Type:   VmxNet3
      Connection:     VM Network
      Adapter Type:   VmxNet3
      Connection:     VM Network
      Adapter Type:   VmxNet3
      Connection:     VM Network

■基本的には以下のとおり。

 vSRX Installation Guide for VMware
 http://www.juniper.net/techpubs/en_US/vsrx15.1x49/information-products/pathway-pages/security-vsrx-vmware-install-guide-pwp.pdf

 vSRX Administration Guide for VMware
 http://www.juniper.net/techpubs/en_US/vsrx15.1x49/information-products/pathway-pages/security-vsrx-vmware-admin-guide-pwp.pdf

■ホスト側のNICではプロミスキャスモードが有効になっている
 必要がある点に注意すれば、特に問題は無い。

# vim-cmd hostsvc/net/info | grep -A 3 -B 3 "allowPromiscuous = true"
         vswitch = <vim.host.VirtualSwitch:key-vim.host.VirtualSwitch-vSwitch0>, 
         computedPolicy = (vim.host.NetworkPolicy) {
            security = (vim.host.NetworkPolicy.SecurityPolicy) {
               allowPromiscuous = true, 
               macChanges = true, 
               forgedTransmits = true
            }, 
--
            vswitchName = "vSwitch0", 
            policy = (vim.host.NetworkPolicy) {
               security = (vim.host.NetworkPolicy.SecurityPolicy) {
                  allowPromiscuous = true, 
                  macChanges = <unset>, 
                  forgedTransmits = <unset>
               }, 

■また、J-Webを使う前提で固定IPを振るだけなら
 configureモードで以下の2行を流し込む。

set interfaces fxp0 unit 0 family inet address 172.31.31.202/24
set routing-options static route 0.0.0.0/0 next-hop 172.31.31.252

■rootのパスワードを設定、commitで反映。

# set system root-authentication plain-text-password
New password:
Retype new password:

[edit]
#commit and-quit

■管理NICがfxp0という点に気を付ければ、後は問題無いはず。
 J-Webへのアクセスはデフォルトで許可されている。

> show configuration | display set | grep web 
set system services web-management http interface fxp0.0
set system services web-management http interface ge-0/0/0.0

■後は普通に。

set system host-name sample
set system time-zone Asia/Tokyo

■出来れば、root以外のユーザを作っておいた方が良い。

set system login user labunix class super-user
set system login user labunix authentication plain-text-password

■sshの公開鍵登録は物理のSRXと変わらない。

 SRX100Hの設定を公開鍵認証(パスフレーズなし)のscpでバックアップする。
 http://labunix.hateblo.jp/entry/20150920/1442686263