キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 
cancel
2407
閲覧回数
0
いいね!
0
コメント
Taisuke Nakamura
Cisco Employee
Cisco Employee

サービス指定のStatic NATは、その宛先IPアドレスに紐づいたポート番号のみの通過を許可し、その宛先IPアドレス宛のそれ以外のポート利用時はnat-no-xlate-to-pat-poolの理由でドロップされます。 これはASAバージョン 9.0(1)からの実装です。

 

例えば以下の、サービス指定を含むStatic NATを設定した場合・・

[NAT設定]
nat (inside,outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100 service http-80 http-8080

[show nat detailの出力]
ASA5555# show nat detail
  --- snip ---
3 (inside) to (outside) source static any any  destination static obj-10.1.1.100 obj-10.1.1.100 service http-80 http-8080
    translate_hits = 0, untranslate_hits = 0
    Source - Origin: 0.0.0.0/0, Translated: 0.0.0.0/0
    Destination - Origin: 10.1.1.100/32, Translated: 10.1.1.100/32
    Service - Origin: tcp destination eq www , Translated: tcp destination eq 8080
 

IPアドレス 10.1.1.100宛の、TCP 80通信は変換され、通過が許可されることを、パケットトレーサーから確認できます。

ASA5555(config)# packet-tracer in inside tcp 192.168.0.1 1024 10.1.1.100 80

Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100 service http-80 http-8080
Additional Information:
NAT divert to egress interface outside
Untranslate 10.1.1.100/80 to 10.1.1.100/8080

  --- snip ---

Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow 
  

しかし、IPアドレス 10.1.1.100宛の、TCP 80以外のポート宛の通信・・・例えばTCP21(FTP)やTCP25(SMTP)などは、nat-no-xlate-to-pat-poolでドロップされます。 以下は、TCP21での通信試験例です。

ASA5555(config)# packet-tracer in inside tcp 192.168.0.1 1024 10.1.1.100 21

Phase: 1
Type: ROUTE-LOOKUP
Subtype: Resolve Egress Interface
Result: ALLOW
Config:
Additional Information:
found next-hop 10.71.228.254 using egress ifc  outside

Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: drop
Drop-reason: (nat-no-xlate-to-pat-pool) Connection to PAT address without pre-existing xlate
 

 
IPアドレス 10.1.1.100宛の、TCP 80以外のポート利用通信の通過を許可したい場合は、サービス指定のない同じIPアドレス変換が可能なNATルールを追加してください。 特にTwice NATの場合、上から順にNATルールは評価されるため、サービス指定のNATルールの下に IP指定のみのNATルールを追加します。

[NAT設定]
nat (inside,outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100 service http-80 http-8080 nat (inside,outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100 <--- 追加

[show nat detailの抜粋]
ASA5555(config)# show nat detail
Manual NAT Policies (Section 1)
--- snip ---
3 (inside) to (outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100 service http-80 http-8080
translate_hits = 0, untranslate_hits = 0
Source - Origin: 0.0.0.0/0, Translated: 0.0.0.0/0
Destination - Origin: 10.1.1.100/32, Translated: 10.1.1.100/32
Service - Origin: tcp destination eq www , Translated: tcp destination eq 8080
4 (inside) to (outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100
translate_hits = 0, untranslate_hits = 0
Source - Origin: 0.0.0.0/0, Translated: 0.0.0.0/0
Destination - Origin: 10.1.1.100/32, Translated: 10.1.1.100/32

 

指定ポートにマッチしない通信は、サービス指定のないルールにマッチし通過可能になります。

ASA5555(config)# packet-tracer in inside tcp 192.168.0.1 1024 10.1.1.100 21

Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static any any destination static obj-10.1.1.100 obj-10.1.1.100
Additional Information:
NAT divert to egress interface outside
Untranslate 10.1.1.100/21 to 10.1.1.100/21

  --- snip ---

Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
   

 

Static NATでサービス利用時の、未指定ポートの通信制限については、以下のConfiguration Guideより確認可能です。

https://www.cisco.com/c/en/us/td/docs/security/asa/asa99/configuration/firewall/asa-99-firewall-config/nat-basics.html#ID-2090-0000083f

抜粋:
Static NAT with Port Translation 
   --- snip ---
Static NAT-with-port-translation rules limit access to the destination IP address for the specified 
port only. If you try to access the destination IP address on a different port not covered by a NAT
rule, then the connection is blocked. In addition, for twice NAT, traffic that does not match the
source IP address of the NAT rule will be dropped if it matches the destination IP address,
regardless of the destination port. Therefore, you must add additional rules for all other traffic
allowed to the destination IP address. For example, you can configure a static NAT rule for the IP
address, without port specification, and place it after the port translation rule.
 
当実装について詳しくは、以下不具合管理IDからも確認可能です。 なお、当制限はASAバージョン 9.0(1)からの実装のため、CSCuc28796は問題の明示用の不具合管理IDであり、CSCuc28796の修正予定はありません。
CSCuc28796 Traffic to static identity host with service object trans is not working
   

 

  

参考情報

ASA: NATルールタイプ別の処理の違いと 設定例
https://supportforums.cisco.com/ja/document/12482501

ASA 8.3+ パケット処理順序と 処理負荷概要と、パケットトレーサ
https://community.cisco.com/t5/-/-/ta-p/3155834

ファイアウォール トラブルシューティング
https://community.cisco.com/t5/-/-/ta-p/3161736

Firepower System and FTDトラブルシューティング
https://community.cisco.com/t5/-/-/ta-p/3161733

 

 

Getting Started

検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう

シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします