読者です 読者をやめる 読者になる 読者になる

labunix's blog

labunixのラボUnix

vmplayerでvSRXを試す。

■vmplayerでvSRXを試す。
 アカウントが必要。60日間の評価版。

 Firefly VMware Appliance - FOR EVALUATION!
 https://www.juniper.net/uk/en/products-services/security/srx-series/vsrx/

$ vmplayer -v
VMware Player 7.1.0 build-2496824

■ライセンスは各自確認するものとして。
 2コアCPU、2GB Mem、IDE接続の1.8GBディスク、2NIC。

$ sudo ovftool dlsv/junos-vsrx-12.1X47-D20.7-domestic.ova 2>&1 | tail -40

Download Size:  224.97 MB

Deployment Sizes:
  Flat disks:   1.80 GB
  Sparse disks: 263.06 MB

Networks:
  Name:        VM Network
  Description: The VM Network network

Virtual Machines:
  Name:               Juniper Virtual SRX
  Operating System:   freebsdguest
  Virtual Hardware:
    Families:         vmx-07 
    Number of CPUs:   2
    Cores per socket: 1
    Memory:           2.00 GB

    Disks:
      Index:          0
      Instance ID:    5
      Capacity:       1.80 GB
      Disk Types:     IDE 

    NICs:
      Adapter Type:   E1000
      Connection:     VM Network

      Adapter Type:   E1000
      Connection:     VM Network

Deployment Options:
  Id:          2GvRAM
  Label:       2G vRAM
  Description: 
                          2G Memory
                          

■vmxに変換

$ mkdir vSRX && mv junos-vsrx-12.1X47-D20.7-domestic.ova vSRX/
$ ovftool "vSRX/junos-vsrx-12.1X47-D20.7-domestic.ova" "vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx"
Opening OVA source: vSRX/junos-vsrx-12.1X47-D20.7-domestic.ova
The manifest validates
Opening VMX target: vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx
Info:    
             Firefly Perimeter LICENSE
             
License: 
             Juniper Networks End User License Agreement
...

Accept end-user license agreement?
Write 'yes' or 'no' (write 'read' to reread the EULA): 
yes
Writing VMX file: vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx
Transfer Completed                    
Source is signed but could not verify certificate (possibly self-signed) 
Completed successfully

$ du vSRX/*
269624	vSRX/junos-vsrx-12.1X47-D20.7-domestic-disk1.vmdk
230436	vSRX/junos-vsrx-12.1X47-D20.7-domestic.ova
4	vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx

$ md5sum vSRX/*
3f2aef238089da9c48a0f474c18450df  vSRX/junos-vsrx-12.1X47-D20.7-domestic-disk1.vmdk
5a992d618b8b40fa4a3cffd234636643  vSRX/junos-vsrx-12.1X47-D20.7-domestic.ova
9807befda6229843c70bc72be155b270  vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx

■OSは当然、BSD

$ grep guestos vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx 
guestos = "freeBSD"

■ブリッジをnatに変えると以下のようになる。

$ grep nat ~/vmware/vSRX/junos-vsrx-12.1X47-D20.7-domestic.vmx 
ethernet0.connectionType = "nat"
ethernet1.connectionType = "nat"

■ホスト側のNAT IPを確認して。

$ /sbin/ifconfig vmnet8 | grep inet.*255
          inetアドレス:192.168.152.1 ブロードキャスト:192.168.152.255  マスク:255.255.255.0

■sshで接続する準備をする。
 ログインはrootの空パス。英語配列のキーボード

login: root
root@% cli
root>  configure
[edit]
root#  set system root-authentication plain-text-password
New password: ******
Retype new password: ******
root#  commit
[edit]
root# edit interfaces ge-0/0/0 
[edit interfaces ge-0/0/0]
root# set unit 0 family inet address 192.168.152.15/24
root# commit                                                                  
commit complete

[edit interfaces ge-0/0/0]
root# exit 

[edit]
root# run ping 192.168.152.15 count 1 
PING 192.168.152.15 (192.168.152.15): 56 data bytes
64 bytes from 192.168.152.15: icmp_seq=0 ttl=64 time=0.110 ms

--- 192.168.152.15 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.110/0.110/0.110/0.000 ms

[edit]
root# edit system 

[edit system]
root# show services 
ssh;
web-management {
    http {
        interface ge-0/0/0.0;
    }
}

[edit system]
root# exit
roor# save terminal


■Linuxからsshログイン

$ ssh root@192.168.152.15
Password:
pam_unix: pam_sm_authenticate: UNIX authentication refused


Password:
X11 forwarding request failed on channel 0
--- JUNOS 12.1X47-D20.7 built 2015-03-03 21:53:50 UTC
root@% cli
root> show version 
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D20.7]