The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
Не работает связка Netflow + NAT, !*! tyomikh, 27-Фев-06, 15:52  [смотреть все]
все делал по докам и соображениям здравого смысла, но все равно не работает

sh run
Current configuration : 5656 bytes
!
! Last configuration change at 15:32:53 msk Mon Feb 27 2006 by admin
!
version 12.4
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service password-encryption
!
hostname gw
!
boot-start-marker
boot system flash c1841-advsecurityk9-mz.124-5.bin
boot-end-marker
!
logging buffered 4096 debugging
enable secret 5 x
!
aaa new-model
!
!
aaa authentication login userauthen local
aaa authorization network groupauthor local
!
aaa session-id common
!
resource policy
!
clock timezone msk 3
clock summer-time msk recurring
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
no ip source-route
ip cef
!
!
ip inspect max-incomplete low 25
ip inspect max-incomplete high 100
ip inspect one-minute low 25
ip inspect one-minute high 100
ip inspect name ext smtp alert on
ip inspect name ext http alert on
ip inspect name ext ftp alert on
ip inspect name ext tcp alert on
ip inspect name ext udp alert on
ip inspect name ext icmp alert on
ip inspect name ext ssh alert on
ip inspect name ext telnet alert on
!
!
no ip domain lookup
ip domain name x
ip ssh authentication-retries 2
ip rcmd rsh-enable
ip rcmd remote-host tr_acct 192.168.40.2 administrator enable 3
!
!
!
username admin privilege 15 secret 5 x
username remoteUser secret 5 x
!
!
!
crypto isakmp policy 3
encr 3des
authentication pre-share
group 2
!
crypto isakmp client configuration group x
key x
pool IRP_vpn
acl 108
!
!
crypto ipsec transform-set vpnTransSet esp-3des esp-sha-hmac
!
crypto dynamic-map dynMap 10
set transform-set vpnTransSet
!
!
crypto map irp_vpn_map client authentication list userauthen
crypto map irp_vpn_map isakmp authorization list groupauthor
crypto map irp_vpn_map client configuration address respond
crypto map irp_vpn_map 10 ipsec-isakmp dynamic dynMap
!
!
!
interface Loopback0
ip address 192.168.254.1 255.255.255.0
ip virtual-reassembly
ip route-cache flow
!
interface FastEthernet0/0
description WAN
ip address 195.178.213.83 255.255.255.248
ip access-group ext_if_in in
ip access-group ext_if_out out
no ip redirects
no ip unreachables
no ip proxy-arp
ip inspect ext in
ip nat outside
ip virtual-reassembly
ip route-cache flow
ip policy route-map l00p
duplex auto
speed auto
!
interface FastEthernet0/1
description LAN
ip address 192.168.40.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip route-cache flow
duplex auto
speed auto
!
ip local pool IRP_vpn 192.168.100.1 192.168.100.10
ip route 0.0.0.0 0.0.0.0 195.178.213.81
ip flow-export version 5
!
no ip http server
no ip http secure-server
ip nat pool internal2outside 195.178.213.84 195.178.213.84 netmask 255.255.255.248
ip nat inside source list 1 pool internal2outside overload
!
ip access-list extended ext_if_in
evaluate ip_out
permit tcp any host 195.178.213.83 eq 22
permit udp any host 195.178.213.83 eq isakmp
permit udp host 204.34.198.40 eq ntp host 195.178.213.83 eq ntp
deny   ip any any log
ip access-list extended ext_if_out
permit ip 195.178.213.80 0.0.0.7 any reflect ip_out
deny   ip any any log
!
access-list 101 permit ip any 192.168.40.0 0.0.0.255
access-list 108 permit ip any any
route-map l00p permit 10
match ip address 101
set interface Loopback0 FastEthernet0/1
!
!
!
control-plane
!
privilege exec level 3 show ip accounting
privilege exec level 3 show ip
privilege exec level 3 show
privilege exec level 3 clear ip accounting
privilege exec level 3 clear ip
privilege exec level 3 clear
!
line con 0
line aux 0
line vty 0 4
access-class 31 in
privilege level 15
transport input ssh
line vty 5 15
privilege level 15
transport input telnet
!
ntp clock-period 17178386
ntp server 204.34.198.40
end

gw#sh ip cache flow
IP packet size distribution (24632 total packets):
   1-32   64   96  128  160  192  224  256  288  320  352  384  416  448  480
   .000 .488 .124 .215 .024 .017 .011 .004 .004 .005 .005 .002 .002 .004 .003

    512  544  576 1024 1536 2048 2560 3072 3584 4096 4608
   .001 .001 .002 .015 .065 .000 .000 .000 .000 .000 .000

IP Flow Switching Cache, 278544 bytes
  7 active, 4089 inactive, 2198 added
  31664 ager polls, 0 flow alloc failures
  Active flows timeout in 30 minutes
  Inactive flows timeout in 15 seconds
IP Sub Flow Cache, 21640 bytes
  0 active, 1024 inactive, 0 added, 0 added to flow
  0 alloc failures, 0 force free
  1 chunk, 1 chunk added
  last clearing of statistics never
Protocol         Total    Flows   Packets Bytes  Packets Active(Sec) Idle(Sec)
--------         Flows     /Sec     /Flow  /Pkt     /Sec     /Flow     /Flow
TCP-Telnet          22      0.0       107    41      1.0      28.1      15.5
TCP-WWW            970      0.4         6   427      2.6       1.6       4.3
TCP-SMTP            35      0.0        10   232      0.1       5.7       6.7
TCP-other          445      0.1        27   115      5.2      12.9      13.0
UDP-DNS             49      0.0         3    66      0.0       4.9      15.5
UDP-NTP             33      0.0         1    76      0.0       0.4      15.6
UDP-other           76      0.0         2   218      0.0       2.2      15.5
Total:            1630      0.6        13   200      9.2       5.3       8.0

SrcIf         SrcIPaddress    DstIf         DstIPaddress    Pr SrcP DstP  Pkts
Fa0/1         192.168.40.2    Fa0/0         85.140.17.215   06 0016 0940   939     я удаленно зашел на сервер
Fa0/0         85.140.17.215   Null          192.168.40.2    06 0940 0016  1864     через статич.NAT трансляцию
Fa0/1         192.168.40.2    Local         192.168.40.1    06 0F83 0017     4     я зателнетился на циску с сервера
Fa0/0         194.67.23.205   Local         195.178.213.84  06 07F9 0985     1
Fa0/1         195.178.213.84  Fa0/0         194.67.23.205   06 0985 07F9     1
Fa0/1         195.178.213.84  Fa0/0         64.12.162.70    06 048E 1446     1
Fa0/0         64.12.162.70    Local         195.178.213.84  06 1446 048E     1

Самое интересное, что статич.трансляции нормально экспортятся в нетфлоу, но 4 последних - заНАТченные сессии пользователей отображаются не верно... (

Где грабли?

  • Не работает связка Netflow + NAT, !*! Сайко, 20:09 , 27-Фев-06 (1)
  • Не работает связка Netflow + NAT, !*! sh_, 07:49 , 28-Фев-06 (5)
    • Не работает связка Netflow + NAT, !*! tyomikh, 09:31 , 28-Фев-06 (6)
      >no access-list 101 permit ip any 192.168.40.0 0.0.0.255
      >access-list 101 permit ip any 195.178.213.80 0.0.0.7

      Делал согласно
      http://www.netup.ru/articles_pdf/10.pdf
      там ACL прописан именно на внутренюю подсеть, как и во многих подобных этому описанию вариантах

      к тому же в моем случае PBR работает:
      gw#sh route-map
      route-map l00p, permit, sequence 10
        Match clauses:
          ip address (access-lists): 101
        Set clauses:
          interface Loopback0 FastEthernet0/1
        Policy routing matches: 161021 packets, 136446200 bytes
      gw#sh route-map
      route-map l00p, permit, sequence 10
        Match clauses:
          ip address (access-lists): 101
        Set clauses:
          interface Loopback0 FastEthernet0/1
        Policy routing matches: 161638 packets, 136666239 bytes

      • Не работает связка Netflow + NAT, !*! Сайко, 09:46 , 28-Фев-06 (7)
      • Не работает связка Netflow + NAT, !*! Сайко, 09:55 , 28-Фев-06 (9)
        • Не работает связка Netflow + NAT, !*! tyomikh, 10:08 , 28-Фев-06 (10)
          >>http://www.netup.ru/articles_pdf/10.pdf
          >Но PBR там прикручен к внутреннему!
          если внимательно посмотреть, то там, КАК И ВО МНОГИХ ПОДОБНЫХ ОПИСАНИЯХ(а это уменьшает вероятность тиражирования ошибки), PBR прикручен к внешнему интерфейсу

          >Это понятно ты лучше покаж
          >sh ip access-list 101
          в моем случае
          gw#sh access-lists 101
          Extended IP access list 101
              10 permit ip any 192.168.40.0 0.0.0.255 (137 matches)
          gw#sh access-lists 101
          Extended IP access list 101
              10 permit ip any 192.168.40.0 0.0.0.255 (155 matches)

          в Вашем случае
          >no access-list 101 permit ip any 192.168.40.0 0.0.0.255
          >access-list 101 permit ip any 195.178.213.80 0.0.0.7
          gw#sh access-lists 101
          Extended IP access list 101
              10 permit ip any 195.178.213.80 0.0.0.7 (2 matches)
          gw#sh access-lists 101
          Extended IP access list 101
              10 permit ip any 195.178.213.80 0.0.0.7 (2 matches)

          Т.е. не работает, как и PBR:
          gw#sh route-map
          route-map l00p, permit, sequence 10
            Match clauses:
              ip address (access-lists): 101
            Set clauses:
              interface Loopback0 FastEthernet0/1
            Policy routing matches: 202464 packets, 139776724 bytes
          gw#sh route-map
          route-map l00p, permit, sequence 10
            Match clauses:
              ip address (access-lists): 101
            Set clauses:
              interface Loopback0 FastEthernet0/1
            Policy routing matches: 202464 packets, 139776724 bytes

          >ты всерьез думаешь что провайдер на тебя маршрутизирует частные адреса?
          Разумеется, он на меня их не маршрутизит; ACL пишется исходя из порядка обработки приходящих пакетов на внешнем интерфейсе циски(имею в виду очередность PRB и NAT)

  • Не работает связка Netflow + NAT, !*! tyomikh, 10:19 , 28-Фев-06 (11)
    Была еще идея, что NAT+Netflow не корректно работают на этой версии IOS, но я уже вторую пробую из 12.4 серии....
    или, возможно, стандартные описания связки NAT+Netflow не работают на 12.4???...
    я не силен в знании IOS, но слышал, что в 12.4 есть масса кардинальных изменений по сравнению с <=12.3
    • Не работает связка Netflow + NAT, !*! ser00, 13:48 , 28-Фев-06 (14)
      • Не работает связка Netflow + NAT, !*! tyomikh, 15:05 , 28-Фев-06 (15)
        К сожалению, не был знаком с egress NetFlow accounting, только сейчас прочитал "Configuring Egress NetFlow Accounting", но не понял как это переложить на случай с NAT. Из Вашего конфига выцепил основные строки:
        ip flow-egress input-interface
        ip flow-cache timeout inactive 60
        ip flow-cache timeout active 1
        !
        ip cef
        interface Ethernet0/0
        ip address 192.168.2.20 255.255.255.0
        !
        interface Ethernet0/1
        ip address XXX.XXX.XXX.1 255.255.255.0
        ip flow egress
        ip nat outside
        ip route-cache policy
        !
        interface Virtual-Template1
        ip flow ingress
        ip flow egress
        ip nat inside
        !
        ip flow-export version 5
        ip flow-export destination 192.168.2.10 9996
        !
        ip nat inside source list 4 interface Ethernet0/1 overload
        !
        access-list 4 permit 10.0.0.0 0.0.255.255
        Попытка адаптации на моем 1841 не прошла(прежний PBR я убрал), т.е. по прежнему в
        sh ip cache flow
        видны реальные IP адреса вместо внутренних, теперь даже и для исходящих пакетиков :(
        Киньте плз в меня докой про eggress + NAT(!)
        • Не работает связка Netflow + NAT, !*! ser00, 15:09 , 28-Фев-06 (16)
        • Не работает связка Netflow + NAT, !*! ser00, 15:11 , 28-Фев-06 (18)
          • Не работает связка Netflow + NAT, !*! tyomikh, 15:24 , 28-Фев-06 (20)
            >и sh ver

            gw#sh run
            Building configuration...

            Current configuration : 5792 bytes
            !
            version 12.4
            !
            hostname gw
            !
            boot-start-marker
            boot system flash c1841-advsecurityk9-mz.124-5.bin
            boot-end-marker
            !
            aaa new-model
            !
            !
            aaa authentication login userauthen local
            aaa authorization network groupauthor local
            !
            aaa session-id common
            !
            resource policy
            !
            mmi polling-interval 60
            no mmi auto-configure
            no mmi pvc
            mmi snmp-timeout 180
            no ip source-route
            ip cef
            !
            !
            ip inspect max-incomplete low 25
            ip inspect max-incomplete high 100
            ip inspect one-minute low 25
            ip inspect one-minute high 100
            ip inspect name ext smtp alert on
            ip inspect name ext http alert on
            ip inspect name ext ftp alert on
            ip inspect name ext tcp alert on
            ip inspect name ext udp alert on
            ip inspect name ext icmp alert on
            ip inspect name ext ssh alert on
            ip inspect name ext telnet alert on
            !
            !
            ip flow-egress input-interface
            ip flow-cache timeout inactive 60
            ip flow-cache timeout active 1
            no ip domain lookup
            !
            interface Loopback0
            ip address 192.168.254.1 255.255.255.0
            ip nat inside
            ip virtual-reassembly
            ip route-cache flow
            !
            interface FastEthernet0/0
            description WAN
            ip address 195.178.213.83 255.255.255.248
            ip access-group ext_if_in in
            ip access-group ext_if_out out
            no ip redirects
            no ip unreachables
            no ip proxy-arp
            ip inspect ext in
            ip flow ingress
            ip flow egress
            ip nat outside
            ip virtual-reassembly
            ip route-cache policy
            duplex auto
            speed auto
            !
            interface FastEthernet0/1
            description LAN
            ip address 192.168.40.1 255.255.255.0
            ip flow egress
            ip nat inside
            ip virtual-reassembly
            duplex auto
            speed auto
            !
            ip route 0.0.0.0 0.0.0.0 195.178.213.81
            ip flow-export version 5
            !
            ip nat pool internal2outside 195.178.213.84 195.178.213.84 netmask 255.255.255.248
            ip nat inside source list 1 pool internal2outside overload
            ip nat inside source static tcp 192.168.40.2 22 195.178.213.86 22867 extendable
            !
            ip access-list extended ext_if_in
            evaluate ip_out
            permit tcp any host 195.178.213.83 eq 22
            permit udp any host 195.178.213.83 eq isakmp
            permit udp host 204.34.198.40 eq ntp host 195.178.213.83 eq ntp
            deny   ip any any log
            ip access-list extended ext_if_out
            permit ip 195.178.213.80 0.0.0.7 any reflect ip_out
            deny   ip any any log
            !
            access-list 1 permit 192.168.40.0 0.0.0.255
            access-list 101 permit ip any 192.168.40.0 0.0.0.255
            access-list 108 permit ip any any
            route-map l00p permit 10
            match ip address 101
            set interface Loopback0 FastEthernet0/1
            !
            ...
            end

            gw#sh ver
            Cisco IOS Software, 1841 Software (C1841-ADVSECURITYK9-M), Version 12.4(5), RELE
            ASE SOFTWARE (fc3)
            Technical Support: http://www.cisco.com/techsupport
            Copyright (c) 1986-2005 by Cisco Systems, Inc.
            Compiled Mon 31-Oct-05 18:02 by alnguyen

            ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)

            gw uptime is 1 day, 13 minutes
            System returned to ROM by reload at 15:07:13 msk Mon Feb 27 2006
            System restarted at 15:09:02 msk Mon Feb 27 2006
            System image file is "flash:c1841-advsecurityk9-mz.124-5.bin"


            This product contains cryptographic features and is subject to United
            States and local country laws governing import, export, transfer and
            use. Delivery of Cisco cryptographic products does not imply
            third-party authority to import, export, distribute or use encryption.
            Importers, exporters, distributors and users are responsible for
            compliance with U.S. and local country laws. By using this product you
            agree to comply with applicable laws and regulations. If you are unable
            to comply with U.S. and local laws, return this product immediately.

            A summary of U.S. laws governing Cisco cryptographic products may be found at:
            http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

            If you require further assistance please contact us by sending email to
            export@cisco.com.

            Cisco 1841 (revision 4.1) with 116736K/14336K bytes of memory.
            Processor board ID FCZ090622WQ
            2 FastEthernet interfaces
            1 Virtual Private Network (VPN) Module
            DRAM configuration is 64 bits wide with parity disabled.
            191K bytes of NVRAM.
            31360K bytes of ATA CompactFlash (Read/Write)

            Configuration register is 0x2102


            Может, из-за ip inspect не пашет???

      • Не работает связка Netflow + NAT, !*! CompeR, 15:10 , 28-Фев-06 (17)
  • Не работает связка Netflow + NAT, !*! nbv, 10:20 , 02-Мрт-06 (23)
    • Не работает связка Netflow + NAT, !*! tyomikh, 10:31 , 02-Мрт-06 (24)
      >"list 1"? надо бы его определить на всякий случай.
      на самом деле он есть(иначе как бы работало?), я его просто забыл в приведенный конфиг вставить

      >> set interface Loopback0 FastEthernet0/1
      >попробовать заменить на:
      >> set interface Loopback0
      не помогает

      эту же связку Netflow+NAT пробую на
      #sh ver
      IOS (tm) C2600 Software (C2600-IK9O3S3-M), Version 12.3(6), RELEASE SOFTWARE (fc3)

      ROM: System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)

      System image file is "flash:c2600-ik9o3s3-mz.123-6.bin"

      cisco 2621XM (MPC860P) processor (revision 0x100) with 94208K/4096K bytes of memory.
      Processor board ID JAD06310M5M (491493467)
      M860 processor: part number 5, mask 2
      Bridging software.
      X.25 software, Version 3.0.0.
      2 FastEthernet/IEEE 802.3 interface(s)
      2 Serial(sync/async) network interface(s)
      32K bytes of non-volatile configuration memory.
      16384K bytes of processor board System flash (Read/Write)

      тоже не отображает нормальные внутренние ИП, только внешний адрес циски




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру