Sonntag, 9. Oktober 2011

EN - Hurricane Electric IPv6 Tunnel with Cisco 887


As mentioned earlier I was playing with the Hurricane Electric IPv6 Tunnel setup. Now that the Tunnel is up and running I would like to share some knowledge I gained and provide a few config sniplets.

Starting with the registration at www.tunnelbroker.net you can request an IPv6 Tunnel. As soon as you´ve registered you can set up your tunnel and register for a complete network with a/48 mask. Obviously to say – I did register for the network.

You can divide configuring your router into 4 steps (more or less)
  • Tunnel creation
  • Configure HE Tunnel update
  • Add the HE Certificate
  • Configure and use your /48 network
  • testing
The default configuration of HE expects you to have a static IPv4 configured at your router. Well since I’m using a home DSL connection my IP address changes every 24 hours. That´s why I change the tunnel source from IP to dialer 1. 

interface Tunnel0
 description Hurricane Electric IPv6 Tunnel Broker
 no ip address
 ipv6 enable
 ipv6 address 2001:470:xxxx:xxxx::2/64
 tunnel source Dialer 1
 tunnel destination 216.66.84.42
 tunnel mode ipv6ip
ipv6 route ::/0 Tunnel0
Additional to the configuration I added this interface into the appropriate zone of the Zone-Based firewall.
The next step for locations with changing IP addresses is to convince your router to tell HE the changing IPv4 address. Hurricane offers a default URL that you can use for the updating process.
https://ACCOUNTNAME:ACCOUNTPASSWORT@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID

To update your IP at HE, you can use the DDNS feature of the Cisco router.

ip ddns update method HEv6
 HTTP
  add https://ACCOUNTNAME:ACCOUNTPASSWORT@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID   !update in next blog post
 interval maximum 0 6 0 0
 interval minimum 0 1 0 0
Every hour but your router will update the IP at HE.
You have to update the configuration of your dialer interface (or the interface that is providing your internet connection) to update HE.
Interface Dialer 1
 ip ddns update hostname WS-Router
 ip ddns update HEv6
Next step is to import the certificate HE is using for the tunnel broker website. Since this page is using a self-signed certificate the update with ddns could cause problems if you don´t import it.
crypto pki trustpoint HEv6
 enrollment terminal pem
 revocation-check none
You need to authenticate the trustpoint using the following dialog:
#crypto pki authenticate HEv6

Enter the base 64 encoded CA certificate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Kbr1N0CkiBHf+7bVqUqfifEte6S/edpUdzIzB9Wtt484Dt88cAeg4BH2z+Kx2C
lE9PxtTSMCInZIniuoLhaBP0BiRXEurTYdreFmen/S5cCkffVr+eJGk92lQQAdMr
kyz2kD1NCwCaEp1w9DYltDbfC2v8BSIiEKVvD72VW6E2r7AvW73s3+E3WcWbt6pV
qrKfFH4mKH0BR7nLzm5zduojCvIdH3GjelyLd7lUVR3N8Dz626tOzni/bzHpbH3T
dMlBIl3f7c41wcoFG5zSZf1mvgyOnSlOnNmlxMbnfnrIyIyfYz1L8UWqWZGbxJYH
EXcOrA==

Certificate has the following attributes:
       Fingerprint MD5: 1128B641 08E7E271 B2FFB7FF 91411952
      Fingerprint SHA1: 9EB44F27 6BCE5EF6 5D9D38CC A9252276 4318075C

% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
% Certificate successfully imported

I exported the applied certificate from my browser after opening the tunnelbroker page with Firefox.

The /48 network HE assigned to me was subnetted and applied to my loop 2 interface to check if everything works fine.
Interface loopback 2
ipv6 address 2001:470:XXXX::1/58
 ipv6 enable
Last but not least you should activate domain lookups on your router to resolve the tunnelbroker URL for ddns.
Final testing:

ping ipv6 ipv6.google.com source loop 2
Sending 5, 100-byte ICMP Echos to 2A00:1450:8004::6A, timeout is 2 seconds:
Packet sent with a source address of 2001:470:XXX::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/76/76 ms

YEAH! Everything worked as expected great ! 
More to come here!

DE - Hurricane Electric IPv6 Tunnel mit Cisco 887



Wie schon geschrieben hab ich mich das vergangene Wochenende mit dem IPv6 Tunnel von HE rumgeschlagen. Jetzt da er Up und Running ist will ich meine Erfahrungen mal zusammenfassen und Konfigsniplets preisgeben. 

Fangen wir am Anfang an, die Website ist unter www.tunnelbroker.net  zu finden, die Registrierung ist quasi selbsterklärend und sollte keine Hürde darstellen. Sobald man seinen Tunnel angelegt hat kann man sich auch noch ein Netz /48 reservieren lassen, was ich natürlich gleich gemacht hab. 

Die Konfiguration erfolgt in mehreren Schritten,
  • Tunnel aufsetzen
  • HE Tunnel update
  • HE Zertifikat einspielen
  •  /48 Netz verwenden
  • Test
Die Konfig des Tunnels geht davon aus, dass man eine statische IP hat und verwendet die IP des Browser in der initialen Konfiguration. Da wir nur einen Standard DSL am Standort haben hab ich die Statische IP durch das Dialer Interface ersetzt, das bei uns die DSL Einwahl macht.  

interface Tunnel0
   description Hurricane Electric IPv6 Tunnel Broker
   no ip address
   ipv6 enable
   ipv6 address 2001:470:xxxx:xxxx::2/64
   tunnel source Dialer 1
   tunnel destination 216.66.84.42
   tunnel mode ipv6ip
ipv6 route ::/0 Tunnel0

Zusätzlich hab ich das Interface noch in die entsprechende Zone der Zone-Base Firewall gehängt.

Als nächstes sollte man, bei dynamische angebundenen Standorten, den Router dazu überreden, bei Zwangstrennung oder IP wechseln die Tunneldaten bei HE zu aktualisieren.
Hurricane gibt dafür eine URL vor, die man vom Router aus aufrufen  kann, die URL hat folgenden Syntax:
https://ACCOUNTNAME:ACCOUNTPASSWORT@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID

Um Hurricane zu aktualisieren sollte das DDNS feature des Routers verwendet werden:

ip ddns update method HEv6
 HTTP
  add https://ACCOUNTNAME:ACCOUNTPASSWORT@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID !Update im nächsten Blogpost
 interval maximum 0 6 0 0
 interval minimum 0 1 0 0
Hier wird die dynamische IP meines Routers HE jede Stunde, spätestens nach 6 Stunden mitgeteilt.
 Dem Dialer Interface müssen noch die DDNS Infos mitgegeben werden, damit dieses HE aktualisiert.

Interface Dialer 1

 ip ddns update hostname WS-Router
 ip ddns update HEv6

Als letztes muss noch das Zertifikat von HE hinterlegt werden, da die Tunnelbroker Seite ein selbst signiertes Zertifikat verwendet und das zu Probleme mit dem DDNS Feature führen kann.
crypto pki trustpoint HEv6
 enrollment terminal pem
 revocation-check none
Danach muss der Trustpoint noch authentifiziert werden, der ganze Prozess stellt sich so dar:
crypto pki authenticate HEv6

Enter the base 64 encoded CA certificate.
End with a blank line or the word "quit" on a line by itself

MIID8DCCAtigAwIBAgIJAPF6IlDmmdRhMA0GCSqGSIb3DQEBBQUAMIGcMQswCQYD
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEQMA4GA1UEBxMHRnJlbW9udDEg
MB4GA1UEChMXSHVycmljYW5lIEVsZWN0cmljLCBMTEMxDTALBgNVBAsTBElQdjYx
GTAXBgNVBAMTEHR1bm5lbGJyb2tlci5uZXQxGjAYBgkqhkiG9w0BCQEWC2lwdjZA
aGUubmV0MB4XDTExMDQyMjE3NDIyMFoXDTIxMDQxOTE3NDIyMFowgZwxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRAwDgYDVQQHEwdGcmVtb250MSAw
HgYDVQQKExdIdXJyaWNhbmUgRWxlY3RyaWMsIExMQzENMAsGA1UECxMESVB2NjEZ
MBcGA1UEAxMQdHVubmVsYnJva2VyLm5ldDEaMBgGCSqGSIb3DQEJARYLaXB2NkBo
ZS5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe5nza8zQ/AiT+
ySc4mZYmLMcIrcU3q6ZEwIY5vHg2chzCJGCPQIwtBiexSZ7CWL8/GjdPWs6DoCut
DS6VlGGaRhJd0ppUOB3uZLcqnfY0/d40WpRFm49yAV3fmhQg744BKUz2+V23E3tP
n4UXq507dQ3RmNiZoS/T+DUbt1URXFZDIJmc4vjnYfGQhUzhbWZbC7J5fMFnTFSL
NWNou4drWwcApm4FjPfVr+tdanjGEs8bMGSbXo6BjtStiEy1yJ3QGyZLwuURcMMv
DV06/hc2Nv9MZPUaIPvXmNcSuVvY3MJiD1CiCWVmfiO3h7b5EmIWC+ZpO9L3Mk6/
j/MgWR6jAgMBAAGjMzAxMC8GA1UdEQQoMCaCEHR1bm5lbGJyb2tlci5uZXSCEiou
dHVubmVsYnJva2VyLm5ldDANBgkqhkiG9w0BAQUFAAOCAQEAXMG5ZOeyRCzIEPYP
tZKbr1N0CkiBHf+7bVqUqfifEte6S/edpUdzIzB9Wtt484Dt88cAeg4BH2z+Kx2C
lE9PxtTSMCInZIniuoLhaBP0BiRXEurTYdreFmen/S5cCkffVr+eJGk92lQQAdMr
kyz2kD1NCwCaEp1w9DYltDbfC2v8BSIiEKVvD72VW6E2r7AvW73s3+E3WcWbt6pV
qrKfFH4mKH0BR7nLzm5zduojCvIdH3GjelyLd7lUVR3N8Dz626tOzni/bzHpbH3T
dMlBIl3f7c41wcoFG5zSZf1mvgyOnSlOnNmlxMbnfnrIyIyfYz1L8UWqWZGbxJYH
EXcOrA==

Certificate has the following attributes:
       Fingerprint MD5: 1128B641 08E7E271 B2FFB7FF 91411952
      Fingerprint SHA1: 9EB44F27 6BCE5EF6 5D9D38CC A9252276 4318075C

% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
% Certificate successfully imported

Das eingefügte Zertifikat kann man aus den Browser exportieren, wenn man die DDNS URL manuell aufruft. 

Ich habe das /48 Netz etwas gesubnettet und verwende für den Test das Loop 2 Interface um von einfach zu schauen ob wir Konnektivität haben.

Interface loopback 2
ipv6 address 2001:470:XXXX::1/58
 ipv6 enable
Ach ja zu guter Letzt sofern noch nicht vorhanden, sollte DNS aktiviert sein, schon allein damit die DDNS URL von HE aufgelöst wird.
Abschließender Test:

ping ipv6 ipv6.google.com source loop 2
Sending 5, 100-byte ICMP Echos to 2A00:1450:8004::6A, timeout is 2 seconds:
Packet sent with a source address of 2001:470:XXX::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/76/76 ms

YEAH! Alles schick, mehr kommt hier!

Samstag, 8. Oktober 2011

EN - Cisco 887w default open ports! WTF!

The last two nights I was playing with the Hurricane Electric Tunnel setup for one of our routers to get IPv6 to my lab. For some strange reason the tunnel showed that it was up but I was unable to ping the IPv6 IP of Google.com. To track down the issue I used the port scan feature of HE on my public v6 and besides the expected port 22 for tcp the following ports showed up on my 887w: Port tcp 2002, tcp 4002, tcp 6002 and tcp 9002. I tried a telnet and I was really scared when my router replied with a nice telnet prompt.

I goggled for the open ports plus cisco 887w and found the article over at www.dataprotectioncenter.com. It looked like the Line 2 is used to communicate between the router and the wireless controller. This controller was working like a service module in the router. 
The article provided a simple solution that I instantly applied. What was the solution – put an access list on the Line 2 for IPv4 and IPv6. 

I dug a little to the bug database at cisco.com but I couldn´t find anything.

 When I’m back at the office I´ll have a closer look on this particular problem and keep you updated.

Thanks to “Didier Stevens“  for figuring and sharing this issue.

DE - Cisco 887w offene Ports! WTF!


Die letzten zwei Nächte haben meinem 887w Router und Hurricane Electrics IPv6 Tunnel gehört. Ich wollte für mein Lab ein echtes IPv6 Netz haben und habe mir daher einen HE Tunnel auf den Router konfiguriert. Als die Konfig durch war konnte ich leider meine Test Host ipv6.google.com nicht erreichen. Da ich einen Fehler auf meiner Seite ausschließen wollte probierte ich mit dem HE Tool einen Port Scan auf meine Maschine der ziemlich erfolgreich war. 

Leider erfolgreicher als erwünscht da er neben dem erwarteten Port TCP 22 auch die Ports TCP 2002, TCP 4002, TCP 6002 und TCP 9002 als offen anzeigte. Einen kurzen versuch via Telnet später zeigte mir, dass auf den Ports auch wirklich eine hübsche Cisco Telnet Login Aufforderung kam. WTF, wo kommt das den her, ging mir durch den Kopf.

Wie so oft wusste Google Rat und ich fand bei der Suche nach “open ports cisco 887w” eine Artikel bei www.dataprotectioncenter.com. Der lieferte eine grobe Erklärung was dort antwortet, es ist dem Artikel zufolge “Line 2” die dafür genutzt wird, dass man vom Router mit dem Service Module des Wireless Controller kommunizieren kann. Die Lösung die der Artikel anbot ist recht einfach – einfach eine entsprechende access-list auf die “Line 2” binden und schon ist ruhe.

Sobald ich wieder im Büro bin und etwas mehr Zeit hab schau ich mir das Thema noch einmal genauer an. Im Moment mag ich nicht an dem Ast sägen, auf dem ich sitze :D

Wenn ich etwas mehr weiß, melde ich mich.

Ein dickes danke an “Didier Stevens“  von dem der Artikel stammt.

Achja die Cisco BUG DB findet dazu nichts (war ja klar)

Freitag, 7. Oktober 2011

EN - What a week!


First week with a new customer is done and it was quite nice. Quite good documented and nice topics I´m working on. Bad luck most stuff is once again CheckPoint but well I´ve got to face it, they won´t go away, so I got to deal with them.

Anyway since I was figuring out processes and stuff I wasn´t able to update my posts here but I think next week I´ll have a little more time for blogging.

DE - Was für eine Woche!


Quasi die erste Woche beim Kunden ist um und ich muss sagen ich bin positiv überrascht. Die meisten Sachen sind gut dokumentiert und / oder selbsterklärend und auch das Bereitstellen der Arbeitsmittel hat fast reibungslos funktioniert. Leider ist der Fokus auch dieses Mal wieder auf CheckPoint, aber da CheckPoint vermutlich nicht so schnell verschwindet, werde ich mich damit arrangieren (müssen).

Auf jeden Fall blieb mir nicht so viel Zeit zum bloggen, da die meiste Zeit zum einlesen und durcharbeiten drauf gegangen ist. Nächste Woche dürfte es besser werden und dann gibt es auch wieder neue Posts.