SRXのパスワードリカバリー

Recovering the Root Password - JUNOS 9.5 System Basics Configuration Guideに、Junos?でのパスワードリカバリー方法が載っていたのでやってみた。
要は、コンソールでつないでシングルユーザーモードで起動し、set system root-authentication plain-text-password でrootパスワードを設定する、というもの。

Aug  6 20:AWaiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `vnlru_mem' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...0 0 0 0 0 done

syncing disks... All buffers synced.
Uptime: 4m16s
Rebooting...
cpu_reset: Stopping other CPUs


U-Boot 1.1.6-JNPR-2.7 (Build time: Nov 26 2013 - 19:04:49)

Initializing memory this may take some time...
Measured DDR clock 266.62 MHz
SRX_100_HIGHMEM board revision major:0, minor:0, serial #: AT4912AF0122
OCTEON CN5020-SCP pass 1.1, Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
DRAM:  1024 MB
Starting Memory POST...
Checking datalines... OK
Checking address lines... OK
Checking 512K memory for U-Boot... OK.
Running U-Boot CRC Test... OK.
Flash:  4 MB
USB:   scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
Clearing DRAM........ done
BIST check passed.
Boot Media: nand-flash usb
Net:   pic init done (err = 0)octeth0
POST Passed
Press SPACE to abort autoboot in 1 seconds
ELF file is 32 bit
Loading .text @ 0x8f0000a0 (246560 bytes)
Loading .rodata @ 0x8f03c3c0 (14144 bytes)
Loading .reginfo @ 0x8f03fb00 (24 bytes)
Loading .rodata.str1.4 @ 0x8f03fb18 (16516 bytes)
Loading set_Xcommand_set @ 0x8f043b9c (96 bytes)
Loading .rodata.cst4 @ 0x8f043bfc (20 bytes)
Loading .data @ 0x8f044000 (5744 bytes)
Loading .data.rel.ro @ 0x8f045670 (120 bytes)
Loading .data.rel @ 0x8f0456e8 (136 bytes)
Clearing .bss @ 0x8f045770 (11600 bytes)
## Starting application at 0x8f0000a0 ...
Consoles: U-Boot console
Found compatible API, ver. 2.7

FreeBSD/MIPS U-Boot bootstrap loader, Revision 2.7
(ccheng@svl-junos-d081.juniper.net, Tue Nov 26 19:05:43 PST 2013)
Memory: 1024MB
[0]Booting from nand-flash slice 1
Un-Protected 1 sectors
writing to flash...
Protected 1 sectors
Loading /boot/defaults/loader.conf
/kernel data=0xb0fcc4+0x134784 syms=[0x4+0x8b310+0x4+0xc9ee7]


Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [/kernel] in 1 second...

Type '?' for a list of commands, 'help' for more detailed help.
loader> boot -s
Kernel entry at 0x801000e0 ...
init regular console
Primary ICache: Sets 64 Size 128 Asso 4
Primary DCache: Sets 1 Size 128 Asso 64
Secondary DCache: Sets 128 Size 128 Asso 8
GDB: debug ports: uart
GDB: current port: uart
KDB: debugger backends: ddb gdb
KDB: current backend: ddb
kld_map_v: 0x8ff80000, kld_map_p: 0x0
Copyright (c) 1996-2014, Juniper Networks, Inc.
All rights reserved.
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
       The Regents of the University of California. All rights reserved.
JUNOS 12.1X46-D20.5 #0: 2014-05-14 20:00:03 UTC
    builder@dagmath.juniper.net:/volume/build/junos/12.1/service/12.1X46-D20.5/obj-octeon/junos/bsd/kernels/JSRXNLE/kernel
JUNOS 12.1X46-D20.5 #0: 2014-05-14 20:00:03 UTC
    builder@dagmath.juniper.net:/volume/build/junos/12.1/service/12.1X46-D20.5/obj-octeon/junos/bsd/kernels/JSRXNLE/kernel
real memory  = 1073741824 (1024MB)
avail memory = 509661184 (486MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
Security policy loaded: JUNOS MAC/pcap (mac_pcap)
Security policy loaded: JUNOS MAC/runasnonroot (mac_runasnonroot)
netisr_init: !debug_mpsafenet, forcing maxthreads from 2 to 1
cpu0 on motherboard
: CAVIUM's OCTEON 5020 CPU Rev. 0.1 with no FPU implemented
        L1 Cache: I size 32kb(128 line), D size 8kb(128 line), sixty four way.
        L2 Cache: Size 128kb, 8 way
obio0 on motherboard
uart0: <Octeon-16550 channel 0> on obio0
uart0: console (9600,n,8,1)
twsi0 on obio0
dwc0: <Synopsis DWC OTG Controller Driver> on obio0
usb0: <USB Bus for DWC OTG Controller> on dwc0
usb0: USB revision 2.0
uhub0: vendor 0x0000 DWC OTG root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 1 port with 1 removable, self powered
uhub1: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2
uhub1: single transaction translator
uhub1: 2 ports with 1 removable, self powered
umass0: STMicroelectronics ST72682  High Speed Mode, rev 2.00/2.10, addr 3
umass1: Kingston DataTraveler 2.0, rev 2.00/1.00, addr 4
cpld0 on obio0
pcib0: <Cavium on-chip PCI bridge> on obio0
Disabling Octeon big bar support
PCI Status: PCI 32-bit: 0xc041b
pcib0: Initialized controller
pci0: <PCI bus> on pcib0
pci0: <serial bus, USB> at device 2.0 (no driver attached)
pci0: <serial bus, USB> at device 2.1 (no driver attached)
pci0: <serial bus, USB> at device 2.2 (no driver attached)
gblmem0 on obio0
octpkt0: <Octeon RGMII> on obio0
cfi0: <AMD/Fujitsu - 4MB> on obio0
Timecounter "mips" frequency 500000000 Hz quality 0
###PCB Group initialized for udppcbgroup
###PCB Group initialized for tcppcbgroup
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <ST ST72682 2.10> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1000MB (2048000 512 byte sectors: 64H 32S/T 1000C)
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <Kingston DataTraveler 2.0 1.00> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: 15287MB (31309760 512 byte sectors: 255H 63S/T 1948C)
Trying to mount root from ufs:/dev/da0s1a
MFSINIT: Initialising MFSROOT
Process-1 beginning MFSROOT initialization...
Creating MFSROOT...
/dev/md0: 20.0MB (40956 sectors) block size 16384, fragment size 2048
       using 4 cylinder groups of 5.00MB, 320 blks, 640 inodes.
super-block backups (for fsck -b #) at:
 32, 10272, 20512, 30752
Populating MFSROOT...
Creating symlinks...
Setting up mounts...
Continuing boot from MFSROOT...
Attaching /cf/packages/junos via /dev/mdctl...
Mounted junos package on /dev/md1...
ABooting single-user
System watchdog timer disabled
Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery

Performing system setup ...
Checking integrity of BSD labels:
  s1: Passed
  s2: Passed
  s3: Passed
  s4: Passed
** /dev/bo0s3e
FILE SYSTEM CLEAN; SKIPPING CHECKS
clean, 12410 free (26 frags, 1548 blocks, 0.2% fragmentation)
** /dev/bo0s3f
FILE SYSTEM CLEAN; SKIPPING CHECKS
clean, 149577 free (153 frags, 18678 blocks, 0.1% fragmentation)
Checking integrity of licenses:
  JUNOS165298.lic: Passed
  JUNOS535359.lic: Passed
  JUNOS535360.lic: Passed
  JUNOS535361.lic: Passed
  JUNOS535362.lic: Passed
  JUNOS535363.lic: Passed
  JUNOS535364.lic: Passed
  JUNOS535365.lic: Passed
Checking integrity of configuration:
  rescue.conf.gz: Passed
Loading configuration ...
mgd: commit complete
Setting initial options: .
Starting optional daemons:  usbd.
Doing initial network setup:.
Initial interface configuration:
additional daemons: eventd.
ls: /tmp/mnt_usb_dev.1022: No such file or directory
umount: /tmp/mnt_usb_dev.1022: statfs: No such file or directory
umount: /tmp/mnt_usb_dev.1022: unknown file system
Time and ticks drifted too much,                                resetting synchronization...
Additional routing options:kern.module_path: /boot//kernel;/boot/modules -> /boot/modules;/modules/ifpfe_drv;/modules;
kld netpfe drv: ifpfed_dialer ipsec kld.
Doing additional network setup:.
Starting final network daemons:.
setting ldconfig path: /usr/lib /opt/lib
starting standard daemons: cron.
Initial rc.mips initialization:.
Local package initialization:.
starting local daemons:set cores for group access
.
Creating JAIL MFS partition...
JAIL MFS partition created
boot.upgrade.uboot="0xBFC00000"
boot.upgrade.loader="0xBFE00000"
Boot media /dev/da0 has dual root support
WARNING: JUNOS versions running on dual partitions are not same
** /dev/da0s2a
FILE SYSTEM CLEAN; SKIPPING CHECKS
clean, 71421 free (101 frags, 8915 blocks, 0.1% fragmentation)
Wed Aug  6 20:44:49 GMT-9 2014
Running recovery script ...
machdep.bootsuccess: 1 -> 1

Performing initialization of management services ...

Performing checkout of management services ...

NOTE: Once in the CLI, you will need to enter configuration mode using
NOTE: the 'configure' command to make any required changes. For example,
NOTE: to reset the root password, type:
NOTE:    configure
NOTE:    set system root-authentication plain-text-password
NOTE:    (enter the new password when asked)
NOTE:    commit
NOTE:    exit
NOTE:    exit
NOTE: When you exit the CLI, you will be asked if you want to reboot
NOTE: the system

Starting CLI ...
> configure
Entering configuration mode

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

[edit]
# commit
commit complete

[edit]
# exit
Exiting configuration mode

> exit

Reboot the system? [y/n] y
Terminated
Waiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `vnlru_mem' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...0 0 0 0 done

syncing disks... All buffers synced.
Uptime: 4m43s
Rebooting...
cpu_reset: Stopping other CPUs

ちなみに、Juniper Networks - [SRX] Root password recovery not working with Junos release versions 10.0R1, 10.0R2, and 10.1R1 - Knowledge Baseによると、recoveryコマンドを入力して再起動させるとカーネルパニックを起こしてパスワードリカバリーできないというバグがSRXのJunos 10.0R1, 10.0R2, 10.1R1にあったらしい。

アプリケーション別のタイムアウト設定

SRXSSHGUIでログインしていると、すぐにタイムアウトになってしまい、検証機を管理する上でどうしても不便だったので、調べてみたら[Juniper]SRX アプリケーション別のタイムアウト設定に情報がまとめてあった。

まず、JuniperのKnowledgeにあるHow to check the application timeout for default Junos applications on SRX devicesを参考に、デフォルトのタイムアウト値を確認する。
これによると、デフォルト(pre-defined)のJunosアプリケーション(junos-xxxxx)はフォワーディングプレーンにハードコードされており、タイムアウト値を確認する唯一の方法は、FWDDプロセスから情報を取り出すことらしい。
SRXブランチ(SRX1xx, SRX2xx, SRX6xx)の場合は次の通り。
ちなみにSRX High End platforms(SRX1K, SRX3K, SRX5K)の場合は、SPU(security processing unit)レベルから情報を取り出す必要がある。

> request pfe execute target fwdd command "show usp app-def tcp"
================ master ================
SENT: Ukern command: show usp app-def tcp

tcp port=22, appl_name=junos-ssh, service type=22, alg id=0, timeout=1800
tcp port=23, appl_name=junos-telnet, service type=10, alg id=0, timeout=1800
tcp port=80, appl_name=junos-http, service type=6, alg id=6, timeout=300
tcp port=443, appl_name=junos-https, service type=58, alg id=0, timeout=1800

> start shell user root
% vty -c "show usp app-def tcp" fwdd
tcp port=0, appl_name=junos-tcp-any, service type=0, alg id=0, timeout=1800
tcp port=21, appl_name=junos-ftp, service type=1, alg id=1, timeout=1800
…

% vty fwdd


BSD platform (OCTEON processor, 416MB memory, 8192KB flash)

FLOWD_OCTEON(SRX100H vty)# show usp app-def tcp
tcp port=0, appl_name=junos-tcp-any, service type=0, alg id=0, timeout=1800
tcp port=21, appl_name=junos-ftp, service type=1, alg id=1, timeout=1800
…

デフォルトではTCPは30分、UDPで1分という設定らしいのだが、ご覧のようにhttpだけなぜか5分w(単位は秒)


で、今度は実際にその値を設定する方法がこちら
How to change the timeout for telnet/ssh/web servi... - J-Net Community

ここではちょうど10倍の18000秒(300分=5時間)に設定してみる。

# set applications application junos-ssh inactivity-timeout 18000

[edit]
# set applications application junos-http inactivity-timeout 18000

[edit]
# set applications application junos-https inactivity-timeout 18000

[edit]
# set system services web-management session idle-timeout 1440

確認してみるとご覧の通り、ちゃんと18000(秒)になっている。

> request pfe execute target fwdd command "show usp app-def tcp"
================ master ================
SENT: Ukern command: show usp app-def tcp

tcp port=22, appl_name=junos-ssh, service type=22, alg id=0, timeout=18000
tcp port=80, appl_name=junos-http, service type=6, alg id=6, timeout=18000
tcp port=443, appl_name=junos-https, service type=58, alg id=0, timeout=18000

どうしてもinternal⇒internetの通信がうまくいかない

SRXでここ3日間ドハマリしてたのが、どういうわけかSRXの内部(vlan.1)から外部(Internet)への通信がどうしてもうまくいかない。pingがどうしても通らない。
そこで、セキュリティポリシーを表示するコマンドを実行してみた。

> show security policies
Default policy: deny-all
From zone: Internal, To zone: Internet
  Policy: All_Internal_Internet, State: enabled, Index: 4, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: any
    Applications: any
    Source identities: any
    Action: permit, drop-untranslated, log
From zone: Internet, To zone: dmz
  Policy: internet_to_server01, State: enabled, Index: 5, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: server01
    Applications: TCP_8080
    Action: permit, log
From zone: Internet, To zone: Internal
  Policy: Internet_to_Internal, State: enabled, Index: 6, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: any
    Applications: junos-http, junos-https, junos-icmp-all, junos-ssh, junos-icmp-ping, junos-ping
    Source identities: any
    Action: permit, log

All_Internal_Internetポリシーにだけdrop-untranslatedというのがあるのが気になった。
実際ポリシーを見てみると、[Permit Action]タブに該当する項目があった。

よくわからんが、直訳すると「NAT変換されていないパケットをドロップする」ということ。なぜか初期設定のこのポリシーではこの項目がデフォルトでチェック入ってるんだよね。
で、この項目を外してみたら普通にping通ったわ…_| ̄|〇
もう一度セキュリティポリシーを表示してみると、

> show security policies
Default policy: deny-all
From zone: Internal, To zone: Internet
  Policy: All_Internal_Internet, State: enabled, Index: 4, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: any
    Applications: any
    Source identities: any
    Action: permit, log
From zone: Internet, To zone: dmz
  Policy: internet_to_server01, State: enabled, Index: 5, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: server01
    Applications: TCP_8080
    Action: permit, log
From zone: Internet, To zone: Internal
  Policy: Internet_to_Internal, State: enabled, Index: 6, Scope Policy: 0, Sequence number: 1
    Source addresses: any
    Destination addresses: any
    Applications: junos-http, junos-https, junos-icmp-all, junos-ssh, junos-icmp-ping, junos-ping
    Source identities: any
    Action: permit, log

ご覧のように見事に「drop-untranslated」が消えている
NATしてもしなくてもping通るようになった
逆にNATしてもしなくても関係なくdropしてやがったらしい。すべての元凶はこの「Drop packets without translated address」

今後SRXを初期導入するときなどは絶対にこのチェックを外すことを激しく推奨する


〔補足〕
ちなみに、How to log packets that do not match a security po... - J-Net Communityによると、以下のコマンドを実行してGlobal Policyを設定すれば、今回のような原因不明のドロップログを見れるとのことだったんだが、ログなんぞ一向に見れず(ノ∀`)

# set security policies global policy default-logdrop match source-address any
# set security policies global policy default-logdrop match destination-address any
# set security policies global policy default-logdrop match application any
# set security policies global policy default-logdrop then deny
# set security policies global policy default-logdrop then log session-init

GUIでもできた。

SRXの負荷状態を確認

GUIがあまりに糞重かったので、CLIからSRXの負荷を確認できるコマンドはないかと探してみた。
したら、CPU使用率を確認するコマンドは?というページが見つかった。

> show chassis routing-engine ルーティングエンジン
Routing Engine status:
    Temperature                 57 degrees C / 134 degrees F
    Total memory              1024 MB Max   676 MB used ( 66 percent)
      Control plane memory     544 MB Max   528 MB used ( 97 percent)
      Data plane memory        480 MB Max   149 MB used ( 31 percent)
    CPU utilization:
      User                       8 percent
      Background                 0 percent
      Kernel                    14 percent
      Interrupt                  0 percent
      Idle                      78 percent
    Model                          RE-SRX100H
    Serial ID                      AT4912AF0122
    Start time                     2014-07-28 15:54:22 GMT-9
    Uptime                         1 hour, 3 minutes, 11 seconds
    Last reboot reason             0x1:power cycle/failure
    Load averages:                 1 minute   5 minute  15 minute
                                       0.14       0.13       0.15

> show chassis forwarding フォワーディングエンジン
FWDD status:
  State                                 Online
  Microkernel CPU utilization        14 percent
  Real-time threads CPU utilization   0 percent
  Heap utilization                   31 percent
  Buffer utilization                  1 percent
  Uptime:                               1 hour, 1 minute, 3 seconds

> show security monitoring fpc 0 フォワーディングエンジン
FPC 0
  PIC 0
    CPU utilization          :    0 %
    Memory utilization       :   31 %
    Current flow session     :    4
    Current flow session IPv4:    4
    Current flow session IPv6:    0
    Max flow session         : 32768
Total Session Creation Per Second (for last 96 seconds on average):    0
IPv4  Session Creation Per Second (for last 96 seconds on average):    0
IPv6  Session Creation Per Second (for last 96 seconds on average):    0

これを見ても特に異常なし
うーん、あくまでL2/L3エンジンでの負荷を見るだけで、GUIでの負荷状態は見れないのね

CLIのみでサポートされるオペレーション

・オートリカバリ

> request system autorecovery state save リカバリー情報を保存
Saving config recovery information
Saving license recovery information
Saving BSD label recovery information

> show system autorecovery state 現在のリカバリー情報の状態を表示
Configuration:
  File             Recovery Information    Integrity Check    Action / Status
  rescue.conf.gz   Saved                   Passed             None
Licenses:
  File             Recovery Information    Integrity Check    Action / Status
  JUNOS165298.lic  Saved                   Passed             None
BSD Labels:
  Slice            Recovery Information    Integrity Check    Action / Status
  s1               Saved                   Passed             None
  s2               Saved                   Passed             None
  s3               Saved                   Passed             None
  s4               Saved                   Passed             None


・サポートファイル取得

> request support information |no-more

THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE


SRXを落とすとき、本機をシャットダウンせず、いきなり電源オフしたら次からなかなか起動せず、STATUSもALARMもオレンジ色になり、次のようなWarningメッセージが(ノ∀`)

*******************************************************************************
    ** **
    ** WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE **
    ** **
    ** It is possible that the primary copy of JUNOS failed to boot up **
    ** properly, and so this device has booted from the backup copy. **
    ** **
    ** Please re-install JUNOS to recover the primary copy in case **
    ** it has been corrupted. **
    ** **
    *******************************************************************************


Juniper Networks - [EX] Switch boots from backup root patition after file system corruption on the primary root partition - Knowledge Baseによると、

Cause: It is likely that the file system became corrupted due to a sudden power loss, or ungraceful shutdown of the EX Switch.

ということで、やはり突然の電源オフが原因だったらしい…_| ̄|〇
まあOSがFreeBSDベースなので、Linux同様ちゃんとOSをhaltしてから電源オフしなきゃダメだよねやっぱ・・

上記の手順はEXの場合だったので、SRXのケースを探すと、LivingUK - wonderful experiences in UK: Juniper SRX: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGEが該当。これによると、「request system snapshot slice alternate」を実行して、プライマリパーティションをセカンダリパーティションに複製すればよいらしい。

これを参考に、次のように実行してみた。

> show system storage partitions
fpc0:
--------------------------------------------------------------------------
Boot Media: internal (da0)
Active Partition: da0s1a
Backup Partition: da0s2a ←これがバックアップslice
Currently booted from: backup (da0s2a) ←このsliceから起動することを示す

Partitions information:
Partition Size Mountpoint
s1a 184M altroot
s2a 184M /
s3d 369M /var/tmp
s3e 123M /var
s4d 62M /config
s4e unused (backup config)

> show system alarms
2 alarms currently active
Alarm time Class Description
2012-03-02 13:01:03 UTC Minor Host 0 Boot from backup root ←alarmの日時stampを示す

> request system snapshot slice alternate

> request system reboot slice alternate
で再起動後、
> show system storage partitions
を実行してCurrently booted fromがprimaryの方になっていることを確認
> show system alarms
で何もアラームが出ていないことを確認


ということで、次回からSRXを落とすときはちゃんとOSをシャットダウンしてPOWERがになっていることを確認してから電源を落としましょう(ノ∀`)
ちなみにその落とし方だが、haltだとシステムが停止されるが、電源は付いたまま。だがpower-offだとちゃんと電源も切れる


(参考)Juniper SRXシリーズのFAQ|日立ソリューションズ

28.シャットダウンのコマンドで、request system haltと request system power-offの違いは何ですか?


request system haltは、シャットダウン後、電源OFFが可能な状態になります。
request system power-offはシャットダウン後、そのまま電源OFFの状態になります。
※SRX650及びHigh-endモデルについてはpower-offコマンドを実行した場合も、haltと同じ動作となります。

Juniper MAGシリーズ ハンズオントレーニング

やっと念願のMAGのセミナーを受講できた。。本当は4/25に受ける予定だったのにずいぶん遅くなってしまった…_| ̄|〇

  • Juniper MAGの基礎知識(モデル・構成・初期セットアップ)
  • Juniper MAGの管理コンセプト
  • Juniper MAGの機能説明(NC, SAM,Core)
  • SSL-VPN基本設定
  • クライアント証明書認証
  • 端末のセキュリティチェック Host Checker
  • 一般的な運用方法
  • スマートフォン連携

全部ハンズオンなのかと思ったら、スライドによる説明の座学も多くやや残念。期待はずれ?設定もあらかじめ用意されてたり、MAGを用意するのが大変だったのか仮想環境だったし
初期セットアップからやらせるべきだと思うが、これも講師が自分で操作して説明してるだけ
まあ何回もやってるみたいなので講師もマンネリ化してきて、だんだん手抜きになってきてるんだろうな
まあでもそれなりに収穫はあったし、やはり他の会社の技術者の考えを学べるのはかなり有用。特にクライアント証明書認証はよく使うからか力を入れていて、実際にどうやって設定するのかよくわかった。やはり証明書関連はよくわかっていない人が多いらしい


以下メモ

  • セミナーのIVE OSは8.0、Network Connectは今後廃れ、Junos Pulseが主流になるとのこと
  • SSL処理は、MAG2600,4610はソフトウェアだが、MAG6610,6611はSM360というモジュールを挿せばハードウェア化できる(試験にも出た)
  • Internal Port:LANへのアクセス、管理系の通信 External Port:ユーザのアクセスのみを受け付け、このポートからリソースへのアクセスは行わない
  • MAG4610にはこれ以外に管理系の通信に利用されるManagement Portがある(NICの有効化が必要)
  • 日本ではInternalをDMZに接続する1本足構成が多いが、海外ではExternalをDMZ、InternalをLANに接続する2本足構成が多い
  • Realm、Role、Resource Policyの関係を表す図が実にわかりやすかった
  • SAMはメール、Web閲覧、ファイル共有など主にTCPを利用するアプリケーションであり、JunosPulseに含まれる
  • Push Configでコンフィグを他の機器へプッシュできる
  • Realmを作るとき、Role Mappingを忘れる人が多く、これをしないとログインが失敗する。このため、□ When editing, start on the Role Mapping page にチェックを入れることが推奨される
  • IEでファイル > 新規セッションを選ぶことでクッキーなどを無視して入れる(複数ウインドウで同時接続できる)。てか新規セッションでよかったんかい…_| ̄|〇 今までわざわざFirefoxを立ち上げてた努力は・・(ノ∀`)


〔証明書〕
やっと各証明書の意味がわかった

Device Certificates SSLサーバ証明書
Trusted Client CAs クライアント証明書用のCA証明書
Trusted Server CAs MAGがリバースプロキシでSSLクライアントとしてSSLサーバにアクセスするときに使うチェインなどの信頼済み証明書
Code-signing Certificates NC、SAMのデジタル証明書(基本的にデフォルトで既にNC、SAMにデジタル証明書が入っているが、セキュリティの関係などで新たに作りたいとき)
Client Auth Certificates MAG自体が持つクライアント証明書
  • User Name Templateは、どれをユーザIDとして使うかを指定
  • クライアント証明書を入れるときは念のため「個人」を指定して入れる。入れたらその既にログイン失敗したセッションでは何度やってもダメなので、新規セッションで試す


VPN-Tunneling 2つのクライアントソフト

  JunosPulse NetworkConnect
機能 VPNトンネリング
ホストチェッカー
WSAM(VPNトンネリングとの併用は不可)
VPNトンネリング
サポートプラットフォーム PC版、Mobile版JunosPulse モバイルには非対応
IVE OSバージョン バージョンには依存しない バージョンごとにクライアントモジュールのアップデートが必要
  • VPN-Tunneling Proxy割り当て機能は、Webアクセスが社内のプロキシ経由になっている場合に、VPNトンネリング接続後にユーザに使わせるプロキシサーバを指定できる
  • デフォルトでハイパフォーマンス(SSLモードと比べて2,3倍)のESPモードを選択しておき、接続できないときにハイアベイラベリティのSSLモードにfallbackさせる設定がオススメ
  • Resource ProfilesとResource Policiesは字も似ていて紛らわしいが、Resource ProfilesはWebサーバを便利に使うイメージ
  • JunosPulse Connectionsはアプリケーションの詳細設定、Componentsはインストール時のConfig及びパッケージファイル
  • JunosPulseの右クリックの「高度な接続の詳細」情報はトラシューに使えて便利


〔Host Checker〕

  • 他の Mac Linux Solaris Mobile などの項目も空にしないこと
  • Windowsは充実しているが、Macに対しては弱い
  • Evaluate Policies はモジュールがインストールされているかどうかだけを見る
  • Realmでは弱いHCにしておき、Roleで強いHCを用意するケースが多い
  • ESAPはOS(Windows8.1など)、ウイルスの一覧


クラスタ構成〕
てっきり2人1組でやるのかと思ったら、やりたい人は後で言ってくれとのこと…_| ̄|〇 うーん・・
とりあえず終了後アシスタントの人に手伝ってもらってやってみた

  • クラスタに参加する側のバージョンが合わなかったが、Clusterに加入する処理のときにバージョンアップもやってくれるらしい
  • 最初両方Activeになり、次にmember2がTransittingで黄色くなり、Enabldedで見事にActive/Active完了
  • バージョンアップも伴うとえらく時間がかかる(15分くらい?)のがわかったのも収穫
  • フェイルオーバーの切り替え時間は約30秒


iPhoneiPadからJunos Pulse for Mobileクライアントで接続する2通りの方法〕

  • Junos Pulseを起動してMAGにログインし、VPN接続を行う
  • ブラウザからMAGにログインし、ブラウザからJunos Pulseを起動し、VPN接続を行う


〔Juniper MAGで管理する3つのログ〕

イベントログ ・システムエラー及び警告
・サーバーの接続状態チェックの要求
・IVEサービス再起動通知
ユーザーアクセスログ ・1時間ごとの同時ユーザー数
・ユーザーのサインイン及びサインアウト
・ユーザーのファイル/Web要求
管理者アクセスログ ・セッションのタイムアウト
・URLブラウジング
・ユーザー作成ブックマークの有効化/無効化
・コンピュータ情報及びサーバー情報
・管理者によるサインイン/サインアウト
アプライアンスのライセンス変更


〔W-SAM基本設定順序〕

  1. RoleのAccess featuresで □ WSAM にチェックを入れる
  2. RoleのWSAMタブで、利用サーバの登録、オプションの設定などを行う
  3. Resource PoliciesでACLの設定を行う