problem z wccp

Problemy z pozostałymi technologiami (SDH, IronPort, WAAS itp.)
Wiadomość
Autor
krazyivan
fresh
fresh
Posty: 9
Rejestracja: 10 cze 2014, 17:16

problem z wccp

#1

#1 Post autor: krazyivan »

Cześć,
Próbuję skonfigurować wccp ze squid w pracy. Mam problem ze zrozumieniem jak skonfigurować tunel do squida.

http://wiki.squid-cache.org/ConfigExamp ... coAsaWccp2
http://www.crypt.gen.nz/papers/cisco_squid_wccp.html


router ma adres 192.168.0.a (mała paranoja jeśli chodzi o bezpieczeństwo wybczacie w zrzutkach zastępuje adresy które mogą mieć znaczenie dla bezpieczeństwa (lub ich częśc) ale będę przy tym konsekwnetny a router, b proxy, d drugie proxy, c pływający miedzy nimi adress keepalived )
squid proxy 192.168.0.b


tworząc interface gre

Kod: Zaznacz cały

cat /etc/sysconfig/network-scripts/ifcfg-tungre0 
DEVICE=tungre0 
#nie wstawał jak dawałem mu dev gre0  - system twierdzil ze nazwa zastrzezona 
TYPE=GRE
BOOTPROTO=none

#adres ip na  potrzeby tunelu WCCP2
MY_INNER_IPADDR=172.16.4.1
#ip tego proxy
PEER_OUTER_IPADDR=192.168.0.b

PEER_INNER_IPADDR=172.16.4.2
NETMASK=255.255.255.252
ONBOOT=yes
IPV6INIT=no
USERCTL=no

nie wiem czy dobrze rozumiem - zeby zapiąć tunel powineim stworzyć sobie oddzielną klasę adresową? (ta któr dałem jako my/peer inner nie występuje nigdzie w moim lanie)
Skąd router ma wiedzieć jakiego on ma użyć adresu w tunelu?

system widzi interface-y tak:

Kod: Zaznacz cały

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:7d:c8:7f brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.202/24 brd 192.168.122.255 scope global eth0
    inet6 fe80::5054:ff:fe7d:c87f/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:52:73:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.b/22 brd 192.168.3.255 scope global eth1
    inet 192.168.0.c/32 scope global eth1
    inet6 fe80::5054:ff:fe52:737b/64 scope link 
       valid_lft forever preferred_lft forever
4: gre0: <NOARP> mtu 1476 qdisc noop state DOWN 
    link/gre 0.0.0.0 brd 192.168.0.b
5: gretap0: <BROADCAST,MULTICAST> mtu 1476 qdisc noop state DOWN qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
7: tungre0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 16412 qdisc noqueue state UNKNOWN 
    link/gre 0.0.0.0 peer 192.168.0.b
    inet 172.16.4.1 peer 172.16.4.2/32 scope global tungre0

czemu tungre0@NONE? ( i jeszcze state unknown), gre0 i gretap0 down i nie dają się podnieść (nigdzie nie definiowałem, same się pojawiają)

Wiem na pewno że tunel się nie zapina

Kod: Zaznacz cały


cisco(config)#do sh ip wccp
Global WCCP information:
Router information:
Router Identifier: -not yet determined-
Protocol Version: 2.0

Service Identifier: web-cache
Number of Service Group Clients: 0
Number of Service Group Routers: 0
Total Packets s/w Redirected: 0
Process: 0
CEF: 0
Service mode: Open
Service Access-list: none
Total Packets Dropped Closed: 0
Redirect Access-list: 120
Total Packets Denied Redirect: 0
Total Packets Unassigned: 0
Group Access-list: none
Total Messages Denied to Group: 0
Total Authentication failures: 55
Total GRE Bypassed Packets Received: 0
po stronie cisco zrobiłem

Kod: Zaznacz cały

access-list 10 permit 192.168.0.b
access-list 10 permit 192.168.0.c
access-list 10 permit 192.168.0.d
ip wccp version 2
ip wccp web-cache group-list 10


access-list 110 remark ACL for WCCP proxy access
access-list 110 remark Squid proxies bypass WCCP
access-list 110 deny ip 192.168.0.0 0.0.0.255 any
access-list 110 remark LAN clients proxy port 80 only
access-list 110 permit tcp 192.168.1.0 0.0.0.255 any eq 80
access-list 110 remark all others bypass WCCP
access-list 110 deny ip any any
!
! Assign ACL to WCCP
ip wccp web-cache redirect-list 110

do sh ip wccp
jak dałem z czapy ip wccp web-cache group-list 110 router identification zmienił się na mój publiczny ip


chce żeby kompy z sieci 192.168.1.0/32 wbijały się przez proxy, 192.168.0.0/32 bezpośrednio
w routerze nie są to wydzielone subnety tylko jedna sieć z maską 255.255.252.0

czy ma zanczenie fakt innych access list czy te powinny mi złapać niezależnie od tego?

Z góry przepraszam za możliwe że trywialne pytania - o ile z serwerami mam sporo doświadczenia i trochę wiedzy sieciowej się po mojej głowie kołacze tak z cisco jestem dopiero na etapie ccna sem2 więc są to dla mnei dość nowe rzeczy. Z góry dzięki! Mam nadzieję że zawarłem wszystko. Router to 2901


ps tcpdump z eth1 pokazuje mi że proxy od routera dostawał tylko arp requesty - nic co by wyglądało na ruch wccp nie widzę
ps2. proxy jest na VM pod kvm, ma się po bridge z adresem z tej samej sieci 192.168.0.0
ps3. na interface z tym lanem dałem ''ip wccp web-cache redirect in''
ps4.cisco(config)#do show ip wccp web-cache detail
No information is available for the service.
pozdro
adm

krazyivan
fresh
fresh
Posty: 9
Rejestracja: 10 cze 2014, 17:16

#2

#2 Post autor: krazyivan »

ok, z tego co się dowiedzialem powinno śmigać bez tunelu więc tak skonfigurowałem squida

Kod: Zaznacz cały

http_port 3127 transparent
http_port 80 transparent
wccp2_router 192.168.0.a
wccp2_forwarding_method 2  #not gre
wccp2_return_method 2  #no gre
wccp2_service standard 0 password=mojetajnehaslo
wccp2_address 192.168.0.b

Kod: Zaznacz cały

#do sho ip wccp
Global WCCP information:
    Router information:
        Router Identifier:                   moj publiczny ip
        Protocol Version:                    2.0

    Service Identifier: web-cache
        Number of Service Group Clients:     1
        Number of Service Group Routers:     1
        Total Packets s/w Redirected:        29005
          Process:                           1880
          CEF:                               27125
        Service mode:                        Open
        Service Access-list:                 -none-
        Total Packets Dropped Closed:        0
        Redirect Access-list:                -none-
        Total Packets Denied Redirect:       0
        Total Packets Unassigned:            0
        Group Access-list:                   -none-
        Total Messages Denied to Group:      0
        Total Authentication failures:       11
        Total GRE Bypassed Packets Received: 0


na interface pod którym jest squid i lan w którym chce dzialac

Kod: Zaznacz cały

ip address pominieto
 ip wccp redirect exclude in
 ip wccp web-cache redirect out
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto

wiec requesty idą przez wccp ale w access logach proxy nie widze nic...
pozdro
adm

krazyivan
fresh
fresh
Posty: 9
Rejestracja: 10 cze 2014, 17:16

#3

#3 Post autor: krazyivan »

można zamknąć, znalazłem jak skomunikować się ze squidem bez tunelu GRE.
Dalej nie chce śmigać ale mam jakiś progres
pozdro
adm

ODPOWIEDZ