手順3 新しいenableのパスワードを対話型で設定します。 手順4 グローバルコンフィグレーションモードに移行します。 手順5 エラーレポート機能を有効化するか訪ねてきているのでNOで拒否します。 ASA-1の設定手順 1番の方のみ設定します。 手順6 ホスト名を変更します。 手順7 インターフェースにIPアドレス、名前、セキュリティーレベルを設定する。 手順8 クライアントPCセグメント用のスタティックルートを設定します。 通常は、デフォルトルートです。 ※デフォルトルート デフォルトルートは、ルーティングテーブルにない宛先用の特殊な経路のこと。 次にパケットを送る先がルーティングテーブルに明記されていない場合に、パケッ トを託す相手を表します。(0.0.0.0/0と表記) Pre-configure Firewall now through interactive prompts [yes]? no Cisco ASA> enable The enable password is not set. Please set it now. Enter Password: cisco Repeat Password: cisco Would you like to enable anonymous error reporting to help improve the product? [Y]es, [N]o, [A]sk later: N Cisco ASA(config)# hostname ASA-1 Cisco ASA# conf t ASA-1(config)# interface G0/1 ASA-1(config-if)# ip address 10.10.10.1 255.255.255.252 ASA-1(config-if)# nameif internet ASA-1(config-if)# security-level 0 ASA-1(config-if)# no shutdown ASA-1(config-if)# exit ASA-1(config)# route internet 10.0.0.0 255.255.255.0 10.10.10.2
セットアップモードが起動したら、noと入力、もしくはCtrl+c 手順10 ホスト名を変更します。 手順11 タイプミス対策をします。 手順12 インターフェースにIPアドレスを設定します。 Router> enable Router# conf t Router(config)# hostname RT-1 RT-1(config)# no ip domain lookup RT-1(config)# line console 0 RT-1(config-line)# logging synchronous RT-1(config-line)# no ip domain lookup --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]:no RT-1(config)# interface f0/0/1 RT-1(config-if)# ip address 10.0.0.254 255.255.255.0 RT-1(config-if)# no shutdown RT-1(config-if)# exit RT-1(config-if)# interface g0/0 RT-1(config-if)# ip address 10.10.10.2 255.255.255.252 RT-1(config-if)# no shutdown RT-1(config-if)# exit RT-1(config-if)# interface g0/1 RT-1(config-if)# ip address 10.20.20.2 255.255.255.252 RT-1(config-if)# no shutdown RT-1(config-if)# exit RT-1(config-if)# interface f0/0/0 RT-1(config-if)# ip address 10.30.30.2 255.255.255.252 RT-1(config-if)# no shutdown RT-1(config-if)# exit
ます。 PC-1─→ASA-1 PC-2─→ASA-2 PC-3─→ASA-3 ポリシーベースルーティングは、送信元の情報をみて宛先を変更します RT-1# show ip int brief Interface IP-Address OK? Method Status Protocol Embedded-Service-Engine0/0unassigned YES unset administratively down down GigabitEthernet0/0 10.10.10.2 YES manual down down GigabitEthernet0/1 10.20.20.2 YES manual down down FastEthernet0/0/0 10.30.30.2 YES manual down down FastEthernet0/0/1 10.0.0.254 YES manual down down RT-1(config)# access-list 110 permit ip host 10.0.0.10 any RT-1(config)# access-list 120 permit ip host 10.0.0.20 any RT-1(config)# access-list 130 permit ip host 10.0.0.30 any RT-1(config)# route-map policy1 permit 10 RT-1(config-route-map)# match ip address 110 RT-1(config-route-map)# set default interface g0/0 RT-1(config-route-map)# exit RT-1(config)# route-map policy1 permit 20 RT-1(config-route-map)# match ip address 120 RT-1(config-route-map)# set default interface g0/1 RT-1(config-route-map)# exit RT-1(config)# route-map policy1 permit 30 RT-1(config-route-map)# match ip address 130 RT-1(config-route-map)# set default interface f0/0/0 RT-1(config-route-map)# exit RT-1(config)# interface range g0/0-1,f0/0/0-1 RT-1(config-if-range)# ip policy route-map policy1 RT-1(config-if-range)# end RT-1# show route-map route-map policy1, permit, sequence 10 Match clauses: ip address (access-lists): 110 Set clauses: default interface GigabitEthernet0/0 Policy routing matches: 0 packets, 0 bytes route-map policy1, permit, sequence 20 Match clauses: ip address (access-lists): 120 Set clauses: default interface GigabitEthernet0/1 Policy routing matches: 0 packets, 0 bytes route-map policy1, permit, sequence 30 Match clauses: ip address (access-lists): 130 Set clauses: default interface FastEthernet0/0/0 Policy routing matches: 0 packets, 0 bytes RT-1# show ip access-list Extended IP access list 110 10 permit ip host 10.0.0.10 any Extended IP access list 120 10 permit ip host 10.0.0.20 any Extended IP access list 130 10 permit ip host 10.0.0.30 any
Mobility…」 をクリックします。 手順35 「左下の歯車」をクリックします。 「Preference」をクリックし、 「Block connections to untrustedn servers」のチェックを外したら、 右上の「×」を押してウィンドウを閉じます PCにASAの証明書がインストールされてない場合でも接続できるようにしています。 ① ② ③
ユーザ名「ASAのホスト名」、パスワード「cisco」を入力します。 「OK」をクリックします。 「緑のチェックマーク」が出てくればVPNが張れています。 (初回接続時は少し時間がかかります) ※もしここで、 AnyConnect profile settings mandate a single local user, but multiple local users are currently logged into your computer. A VPN connection will be not be established というエラーが出た場合は、ほかのWindowsユーザーがログインしているか確認し、 ログインしていた場合はログアウトさせてください。または講師を呼んでください。
the following AAA Attributes values...」をプルダウンから変更します。 デフォルトの「User has Any ~」から「User has ALL ~」にしてください。 Actionタブの「Action」を「Terminate」(拒否)に設定します。 設定したら、「OK」を押してください ① ② ③
enroll maguro-trustpoint WARNING: The certificate enrollment is configured with an fqdn that differs from the system fqdn. If this certificate will be used for VPN authentication this may cause connection problems. Would you like to continue with this enrollment? [yes/no]: yes % Start certificate enrollment .. % The subject name in the certificate will be: CN=maguro.udx.local,O=Jikki-AKB,C=JP,St=Tokyo,L=Chiyoda-Ku % The fully-qualified domain name in the certificate will be: maguro.udx.local % Include the device serial number in the subject name? [yes/no]: no Display Certificate Request to terminal? [yes/no]: yes Certificate Request follows: -----BEGIN CERTIFICATE REQUEST----- MIIDBjCCAe4CAQAwgYIxEzARBgNVBAcTCkNoaXlvZGEtS3UxDjAMBgNVBAgTBVRv a3lvMQswCQYDVQQGEwJKUDESMBAGA1UEChMJSmlra2ktQUtCMRkwFwYDVQQDExBt YWd1cm8udWR4LmxvY2FsMR8wHQYJKoZIhvcNAQkCFhBtYWd1cm8udWR4LmxvY2Fs MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArB/O65eAlXIWTR/yb+am mDpU7o72wvCImTV8qSwvwbiD5T9Qd6HIRLAx+ljEAzUgLq89lpF0OUVrxKZPV83Q 6F1YDt3VwekgF5wDnRmvUTC5H9hdwJyk9I5nSGCRgPRNdUpF3Z4e38A7vnLmRKV7 rq6CLTDh42lYtUEIv3VRjivC8WFSn4WO+iavqq9IKJXdCJKbZuoo0sZqngX27Lf2 eH4CtrIICu9XdKdn6+eLGKS6K1tZE7aGxGRXfBaWe0dwznOoH8S6iQ5wreWTo6qT C+ED+/85QojZBS34pvrkKejKTgxDmuIFyOj2U9MAkk9lFwQKhuLPXnAQ4ZhJKoZD lwIDAQABoD4wPAYJKoZIhvcNAQkOMS8wLTAOBgNVHQ8BAf8EBAMCBaAwGwYDVR0R BBQwEoIQbWFndXJvLnVkeC5sb2NhbDANBgkqhkiG9w0BAQUFAAOCAQEACJ9YpID+ sTJV7Vp4T3qC5AY/ihsiSxRQPeKSloLlyQIriEzEzL7g1zY+S2rwtppnINY64EQC 29VGKAl7CaQxg1pGmORl6NFMaveVbzgN0ML20g6FdHlc/k3WuE71jjJvnmtRMQE9 ELk8toPtmTCevwV+YJ3YpbE8X51f6hmMRT5320SUl1nJLhW/TpxIVmIXZvpW9VsT UjMjTKFPRWHe2fsq8QQV4ds0yY5IfjRkzlO3xCNvMkuProTPOxaEh7PCdC9Xf3rW 0RmHR4X/WFad3CkYtI0h2BPjRReDK1l85HNPuU9YesG67MbZ91y3MrpfG4+8/SYI oW7FM60pOEv3Hg== -----END CERTIFICATE REQUEST----- Redisplay enrollment request? [yes/no]: no ASA-1(config)# エディタにコピー 手順73 CSRファイルを作成する
認証局を作成 (Me1onpan-CA)という名前、パスフレーズは「Me1lonpan#」 [root@ASA-labo3-CAServer easy-rsa]# cd /usr/share/easy-rsa/3.0.8 [root@ASA-labo3-CAServer 3.0.8]# ./easyrsa init-pki init-pki complete; you may now create a CA or requests. Your newly created PKI dir is: /usr/share/easy-rsa/3.0.8/pki [root@ASA-labo3-CAServer 3.0.8]# [root@ASA-labo3-CAServer 3.0.8]# ./easyrsa build-ca Using SSL: openssl OpenSSL 1.1.1k FIPS 25 Mar 2021 Enter New CA Key Passphrase: Re-Enter New CA Key Passphrase: Generating RSA private key, 2048 bit long modulus (2 primes) ..........................+++++ ......................................................................+++++ e is 65537 (0x010001) You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Common Name (eg: your user, host, or server name) [Easy-RSA CA]:Me1onpan-CA CA creation complete and you may now import and sign cert requests. Your new CA certificate file for publishing is at: /usr/share/easy-rsa/3.0.8/pki/ca.crt [root@ASA-labo3-CAServer 3.0.8]# Me1onpan#
/usr/share/easy-rsa/3.0.8 [root@ASA-labo3-CAServer 3.0.8]# ./easyrsa sign-req server maguro.asa.device.key Using SSL: openssl OpenSSL 1.1.1k FIPS 25 Mar 2021 You are about to sign the following certificate. Please check over the details shown below for accuracy. Note that this request has not been cryptographically verified. Please be sure it came from a trusted source or that you have verified the request checksum with the sender. Request subject, to be signed as a server certificate for 825 days: subject= localityName = Chiyoda-Ku stateOrProvinceName = Tokyo countryName = JP organizationName = Jikki-AKB commonName = maguro.udx.local unstructuredName = maguro.udx.local X509v3 Subject Alternative Name: DNS:maguro.udx.local Type the word 'yes' to continue, or any other input to abort. Confirm request details: yes Using configuration from /usr/share/easy-rsa/3.0.8/pki/easy-rsa-24692.b67Fps/tmp.ccMTlw Enter pass phrase for /usr/share/easy-rsa/3.0.8/pki/private/ca.key: Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows localityName :PRINTABLE:'Chiyoda-Ku' stateOrProvinceName :PRINTABLE:'Tokyo' countryName :PRINTABLE:'JP' organizationName :PRINTABLE:'Jikki-AKB' commonName :PRINTABLE:'maguro.udx.local' unstructuredName :IA5STRING:'maguro.udx.local' Certificate is to be certified until Dec 22 10:25:25 2023 GMT (825 days) Write out database with 1 new entries Data Base Updated Certificate created at: /usr/share/easy-rsa/3.0.8/pki/issued/maguro.asa.device.key.crt [root@ASA-labo3-CAServer 3.0.8]# Me1onpan# ここにできました
から --END CERTIFICATE--をコピーする ASA-1(config)#crypto ca import maguro-trustpoint certificate nointeractive Enter the certificate in base64 representation.... 手順84 コピーしたサーバ証明書を貼り付ける