SSブログ

AndroidでCISCO 841MJにIPSec接続してみる その4 (2017/11/04) [ネットワーク機器]

MODE_CFGセクションに到達していることは分かったので、コンフィグを煮詰め直します。このあたりのコンフィグについては、「正」となる情報がないため、本当に手探り状態です。ネット上に、細切れ情報が散らばっていますが、
・AnyConnect接続用のコンフィグ
・CISCO ASA向けコンフィグ
・古いIOS向けのコンフィグ
・その他、ちょっと何か違うコンフィグ
だったりして、私の手元でそれっぽいコンフィグを作ることはできるのですが、正にカットアンドトライ状態です。私が大いに悩んだように、ここからの記述はすごく分かりにくくなっているので、ご注意ください。

現状のisakmpプロファイルはざっと下記の通りなのですが、
Router#show running-config
crypto isakmp profile I-PROFILE
   keyring K-RING
   match identity address 0.0.0.0
   client authentication list AAA-AUTHE
   isakmp authorization list AAA-AUTHO
   client configuration address respond

Router#configure terminal
Router(config)#crypto isakmp profile I-PROFILE
Router(conf-isa-prof)#?
Crypto ISAKMP Profile Commands are:

  accounting        Enable AAA Accounting for IPSec Sessions
  ca                Specify certificate authorities to trust
  client            Specify client configuration settings
  default           Set a command to its defaults
  description       Specify a description of this profile
  exit              Exit from crypto isakmp profile sub mode
  initiate          Initiator property
  isakmp            ISAKMP Authorization command
  keepalive         Set a keepalive interval for use with IOS peers
  keyring           Specify keyring to use
  local-address     Interface to use for local address for this isakmp profile
  match             Match values of peer
  no                Negate a command or set its defaults
  qos-group         Apply a Qos policy class map for this profile
  self-identity     Specify Identity to use
  virtual-template  Specify the virtual-template for dynamic interface
                    creation.
  vrf               Specify the VRF it is related to
このコンフィグ階層の中には、クライアントに払い出すIPアドレスを設定する場所(pool)がないのです。
じゃあどこにあるかと言うと、
Router#configure terminal
Router(config)#crypto isakmp client configuration group C-GROUP
Router(config-isakmp-group)#?
ISAKMP group policy config commands:
  access-restrict               Restrict clients in this group to an interface
  acl                           Specify split tunneling inclusion access-list
                                number
  auto-update                   Configure auto-upgrade
  backup-gateway                Specify backup gateway
  banner                        Specify mode config banner
  browser-proxy                 Configure browser-proxy
  configuration                 Push configuration to the client
  crypto                        Client group crypto aaa attribute list
  dhcp                          Configure DHCP parameters
  dns                           Specify DNS Addresses
  domain                        Set default domain name to send to client
  exit                          Exit from ISAKMP client group policy
                                configuration mode
  firewall                      Enforce group firewall feature
  group-lock                    Enforce group lock feature
  include-local-lan             Enable Local LAN Access with no split tunnel
  key                           pre-shared key/IKE password
  max-logins                    Set maximum simultaneous logins for users in
                                this group
  max-users                     Set maximum number of users for this group
  netmask                       netmask used by the client for local
                                connectivity
  no                            Negate a command or set its defaults
  pfs                           The client should propose PFS
  pool                          Set name of address pool
  save-password                 Allows remote client to save XAUTH password
  smartcard-removal-disconnect  Enables smartcard-removal-disconnect
  split-dns                     DNS name to append for resolution
  wins                          Specify WINS Addresses
というグループプロファイルの中にあるpoolコンフィグがそれに該当します。つまりは独立した両者のコンフィグを結びつける必要があるのです。

ここで私を大いに悩ませました。Webにあるの参考コンフィグ(http://www.infraexpert.com/study/ipsec18.html)には、下記のように
Cisco(config)#show running-config
crypto isakmp profile VPN-PROFILE
  match identity group VPNCLIENT
  client authentication list VPNAUTHE
  isakmp authorization list VPNAUTHO
 Cisco(config-isa-prof)# client configuration address respond
match identity group~コンフィグによって、isakmpプロファイルとグループプロファイルをうまく結びつけているのですが、これを設定してしまうと、グループ認証が有効になってしまうため、汎用性が失われてしまいます。私はmatch identity group~コンフィグを設定したくないのです。(だからmatch identity address 0.0.0.0を設定している)

いろいろ試していると、isakmpプロファイル内のclient configuration group~コンフィグによって、グループプロファイルを紐けることができました。ざっとまとめると、
・グループ認証使用有無にかかわらず、クライアントに払い出すIPアドレスはグループプロファイルで設定する
・isakmpプロファイルに、グループプロファイルを紐付ける方法は下記2つのうちのいずれか
 (1)match identity group~コンフィグによって、グループ認証を有効にする
 (2)グループ認証を行いたくない場合は、client configuration group~コンフィグによって、グループプロファイルを紐付ける
ということでした。

ちなみに最初に取得したデバッグログと睨めっこすると、ISAKMP-AAA-ERROR: (0):group does not existというメッセージが表示されており、グループプロファイルが正常に読み出せてないことが暗に示されていましたね。

その5へ続く。
タグ:cisco IPsec
nice!(0)  コメント(0) 
共通テーマ:日記・雑感

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。