如何在 Cisco ASA 5508 上找到哪个 natted 私有 IP 地址正在通信

网络工程 思科 防火墙 安全
2021-07-16 12:35:32

通常我们会面临针对特定服务器的异常流量。我的问题是,由于我们在 Cisco ASA 5508 防火墙上使用动态 NAT,我怎么知道目标是哪个私有 IP 地址?

问候

3个回答

我不完全确定我是否理解你的问题,但我相信你想看看show xlate命令。

例如:

myfirewall1/act/pri# show xlate
732 in use, 3000 most used
Flags: D - DNS, e - extended, I - identity, i - dynamic, r - portmap,
       s - static, T - twice, N - net-to-net
NAT from inside:172.16.8.0/24, 172.16.5.0/24, 172.17.60.0/24,
  172.17.10.0/24, 172.17.50.0/24, 172.16.4.0/24,
  172.16.6.0/24, 172.16.7.0/24, 172.17.40.0/24,
  172.17.30.0/24 to outside:172.16.8.0/24, 172.16.5.0/24,
  172.17.60.0/24, 172.17.10.0/24, 172.17.50.0/24,
  172.16.4.0/24, 172.16.6.0/24, 172.16.7.0/24,
  172.17.40.0/24, 172.17.30.0/24
  flags sIT idle 0:00:00 timeout 0:00:00

[output cut...]

TCP PAT from inside:172.16.8.54/53008 to outside:177.36.241.90/53008 flags ri idle 0:32:23 timeout 0:00:30
TCP PAT from inside:172.16.4.52/20592 to outside:177.36.241.90/20592 flags ri idle 0:14:26 timeout 0:00:30
TCP PAT from inside:172.16.6.61/49776 to outside:177.36.241.90/49776 flags ri idle 0:00:16 timeout 0:00:30
TCP PAT from inside:172.16.6.61/63274 to outside:177.36.241.90/63274 flags ri idle 0:53:37 timeout 0:00:30
...
...

您可以通过管道将输出传送include到过滤有问题的 IP 地址:

myfirewall1/act/pri# show xlate | include 172.16.5.56
TCP PAT from inside:172.16.5.56/59970 to outside:177.36.241.72/59970 flags ri idle 0:00:05 timeout 0:00:30
TCP PAT from inside:172.16.5.56/59958 to outside:177.36.241.72/59958 flags ri idle 0:00:29 timeout 0:00:30
TCP PAT from inside:172.16.5.56/59914 to outside:177.36.241.72/59914 flags ri idle 0:00:54 timeout 0:00:30

或者您可以使用 global、gport、interface、local、lport 选项缩小范围。

ncapfw1/act/pri# show xlate ?

  count      Show translation count
  global     Enter this keyword to specify global ip range
  gport      Enter this keyword to specify global port(s)
  interface  Enter this keyword to specify an interface
  local      Enter this keyword to specify local ip range
  lport      Enter this keyword to specify local port(s)
  type       Enter this keyword to specify xlate type
  |          Output modifiers
  <cr>
myfirewall1/act/pri#
myfirewall1/act/pri#    
myfirewall1/act/pri# show xlate global 177.36.241.72
863 in use, 3000 most used
Flags: D - DNS, e - extended, I - identity, i - dynamic, r - portmap,
       s - static, T - twice, N - net-to-net

TCP PAT from inside:172.16.5.61/38464 to outside:177.36.241.72/38464 flags ri idle 0:29:30 timeout 0:00:30
TCP PAT from inside:172.16.5.61/36269 to outside:177.36.241.72/36269 flags ri idle 0:29:30 timeout 0:00:30
TCP PAT from inside:172.16.5.61/57396 to outside:177.36.241.72/57396 flags ri idle 0:29:33 timeout 0:00:30
TCP PAT from inside:172.16.5.61/42706 to outside:177.36.241.72/42706 flags ri idle 0:55:22 timeout 0:00:30
...
...

希望这可以帮助!

搜索后最好的方法是使用以下命令:

Firewall# show local-host connection | i 5.5.5.5

其中 5.5.5.5 是攻击者 IP

我们还可以使用以下命令查看与组织设备通信的所有外部 IP 地址:

Firewall# show local-host connection | i outside

现在仍然需要标志值和 0 字节的含义:

字节 2179,标志 UfFRIOB

字节 0,标志 saA

字节 1095819866,标志 UIOB

通常“show xlate”命令显示nat翻译。如需更多可见性,请检查 ASA 防火墙流量日志,以在使用动态 NAT 时查找私有 IP 地址转换。