Posts mit dem Label static route werden angezeigt. Alle Posts anzeigen
Posts mit dem Label static route werden angezeigt. Alle Posts anzeigen

Mittwoch, 29. April 2009

EN - "Route Leaking" or Inter VRF routing

Heyho,

today I want to give a small guide, how to configure inter-VRF (VRF = VPN Routung and Forwarding) routing.
The Cisco documentation I found for this is more likely rocket science than a working guide.

The task was to implement static routes on one device routing between different VRFs.
I used following network map:

Both routers "VRF_1" and "VRF_2" are only hosts with only an IP and a default route pointing at the outgoin interface:
VRF1
interface FastEthernet0/1
description Link to VRF_Router
ip address 10.0.100.2 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

VRF2
interface FastEthernet0/1
description Link to VRF_Router
ip address 10.0.200.2 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/1


Now to the routing part:
At first you need an basic VRF lite config:
ip vrf vrf1
rd 1:1
route-target export 1:1
route-target import 1:1
!
ip vrf vrf2
rd 2:2
route-target export 2:2
route-target import 2:2

The two commands route-target export 2:2 and route-target import 2:2 can be summed up with the command "route-target both. In your config this will be automaticaly replaced with to commands shown.

In addition to this there is some IF configuration:
interface FastEthernet0/0
ip vrf forwarding vrf1
ip address 10.0.100.1 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
ip vrf forwarding vrf2
ip address 10.0.200.1 255.255.255.0
speed 100
full-duplex


The command ip vrf forwarding [vrf_name] associates the IF into a VRF so the traffic is marked up.

Now you need to set up the routing. There for you only need a route for each VRF pointing on the IF and Next-Hop-IP of the targeted VRF.
ip route vrf vrf1 10.0.200.0 255.255.255.0 FastEthernet0/1 10.0.200.2

ip route vrf vrf2 10.0.100.0 255.255.255.0 FastEthernet0/0 10.0.100.2


And thats all. If you issue the command show ip route.
VRF_Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

VRF_Router#

You'll see an empty global routing table. If you add show ip route vrf [vrf_name]. As example only the output of one vrf:
VRF_Router#show ip route vrf vrf1

Routing Table: vrf1

[... snip ...]

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 2 subnets
C 10.0.100.0 is directly connected, FastEthernet0/0
S 10.0.200.0 [1/0] via 10.0.200.2, FastEthernet0/1
VRF_Router#

Note that it says explictly which routing table it's showing you and you have one extra routing table for each VRF.




If there are any open questions left, just use the commenting funtion


Regrads,
Zif

Freitag, 24. April 2009

DE - Task 2.2.1 hinzufügen der VPN Edge Geräte

Entschuldigung, dass das letzte Post zum Thema so lang her ist, ich hoffe es stört nicht allzu sehr. Prinzipiell sind die Konfigs fertig nur das dokumentieren nervt furchtbar :)
Wir fangen mit unserem Netzwerk aus dem letzten Task an, das heißt wir haben 3 Router und eine PIX die untereinander OSPF sprechen (LINK).

Zuerst werden wir die VPN Endgeräte hinzufügen, so das wir später unser Sicherheitskonzept auf das ganze Netzwerk ausrollen können.

Die Router sind an sich sehr einfach konfiguriert und ich werde nicht tiefer darauf eingehen. Wir konfigurieren wie übliche, die Interfaces für externe und interne Kommunikation, OSPF und zum Schluss sollten wir einen blick auf die anderen Router werfen ob die Routen alle sauber übertragen werden.
Näheres zum Konfigurieren der Router lässt sich unter Task 2.1 finden.

VPN Edge Router 1 - R_VPN_1

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R_VPN_1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
no logging console
no logging monitor
!
memory-size iomem 5
ip cef
!
no ip domain lookup
ip domain name Task2.local
!
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
interface Loopback0
description ### Loop 0 for MGMT ###
ip address 10.99.99.4 255.255.255.255
!
interface FastEthernet0/0
description ### Uplink ISP 1 ###
ip address 192.168.11.2 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet0/1
description ### Uplink ISP 2 ###
ip address 192.168.22.2 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet1/0
description ### Uplink to R_Outer_Core_1 ###
ip address 10.1.0.2 255.255.255.252
speed 100
full-duplex
!
interface FastEthernet2/0
description ### Uplink to R_Outer_Core_2 ###
ip address 10.1.0.10 255.255.255.252
speed auto
full-duplex
!
router ospf 100
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
network 10.1.0.0 0.0.0.3 area 0
network 10.1.0.8 0.0.0.3 area 0
network 10.99.99.4 0.0.0.0 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.11.1
ip route 0.0.0.0 0.0.0.0 192.168.22.1 10
!
ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
!
ntp server 10.99.99.1 prefer

VPN Edge Router 2 - R_VPN_2

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R_VPN_2
!
no logging console
no logging monitor
!
no aaa new-model
memory-size iomem 5
ip cef
!
no ip domain lookup
ip domain name Task2.local
!
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
interface Loopback0
description ### Loop 0 for MGMT ###
ip address 10.99.99.5 255.255.255.255
!
interface FastEthernet0/0
description ### Uplink ISP 1 ###
ip address 192.168.11.3 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet0/1
description ### Uplink to ISP 2 ###
ip address 192.168.22.3 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet1/0
description ### Uplink to R_Outer_Core_1 ###
ip address 10.1.0.6 255.255.255.252
speed 100
full-duplex
!
interface FastEthernet2/0
description ### Uplink to R_Outer_Core_2 ###
ip address 10.1.0.14 255.255.255.252
speed 100
full-duplex
!
router ospf 100
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
network 10.1.0.4 0.0.0.3 area 0
network 10.1.0.12 0.0.0.3 area 0
network 10.99.99.5 0.0.0.0 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.11.1
ip route 0.0.0.0 0.0.0.0 192.168.22.1 10
!
!
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
!
ntp server 10.99.99.1 prefer


Das war es im großen und ganzen, wir haben nun 5 Router und eine PIX, auf diesem Netzwerk Sicherheit zu implementieren ist etwas aufwändiger und bekommt daher einen eigenen Blogeintrag.

cheers
NWG

EN - Task 2.2.1 adding VPN Edge devices

Well it has been a while since the last task update and I hope you don´t mind to much.
So we start with our network from last time, this means 3 routers and a pix running OSPF. (LINK)

First of all we will add the two VPN Edge devices, so that we can build security concept for the complete network.
The Routers are set up quit easily and i won´t explain in detail what to do on those machines. We will do the usual stuff like setting up network interfaces for internal and external communication, add OSPF and have a look on the other routers to see if the routes are propagated as expected. Fore more information about see the Task 2.1 Post.

VPN Edge Router 1 - R_VPN_1

service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R_VPN_1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
no logging console
no logging monitor
!
memory-size iomem 5
ip cef
!
no ip domain lookup
ip domain name Task2.local
!
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
interface Loopback0
description ### Loop 0 for MGMT ###
ip address 10.99.99.4 255.255.255.255
!
interface FastEthernet0/0
description ### Uplink ISP 1 ###
ip address 192.168.11.2 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet0/1
description ### Uplink ISP 2 ###
ip address 192.168.22.2 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet1/0
description ### Uplink to R_Outer_Core_1 ###
ip address 10.1.0.2 255.255.255.252
speed 100
full-duplex
!
interface FastEthernet2/0
description ### Uplink to R_Outer_Core_2 ###
ip address 10.1.0.10 255.255.255.252
speed auto
full-duplex
!
router ospf 100
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
network 10.1.0.0 0.0.0.3 area 0
network 10.1.0.8 0.0.0.3 area 0
network 10.99.99.4 0.0.0.0 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.11.1
ip route 0.0.0.0 0.0.0.0 192.168.22.1 10
!
ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
!
ntp server 10.99.99.1 prefer

VPN Edge Router 2 - R_VPN_2

service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R_VPN_2
!
no logging console
no logging monitor
!
no aaa new-model
memory-size iomem 5
ip cef
!
no ip domain lookup
ip domain name Task2.local
!
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
interface Loopback0
description ### Loop 0 for MGMT ###
ip address 10.99.99.5 255.255.255.255
!
interface FastEthernet0/0
description ### Uplink ISP 1 ###
ip address 192.168.11.3 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet0/1
description ### Uplink to ISP 2 ###
ip address 192.168.22.3 255.255.255.128
speed 100
full-duplex
!
interface FastEthernet1/0
description ### Uplink to R_Outer_Core_1 ###
ip address 10.1.0.6 255.255.255.252
speed 100
full-duplex
!
interface FastEthernet2/0
description ### Uplink to R_Outer_Core_2 ###
ip address 10.1.0.14 255.255.255.252
speed 100
full-duplex
!
router ospf 100
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
network 10.1.0.4 0.0.0.3 area 0
network 10.1.0.12 0.0.0.3 area 0
network 10.99.99.5 0.0.0.0 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.11.1
ip route 0.0.0.0 0.0.0.0 192.168.22.1 10
!
!
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
!
ntp server 10.99.99.1 prefer

Well thats it for now. Since adding security to those devices is a larger task I´ll create a new blog post about this topic.

cheers NWG

Freitag, 27. März 2009

DE - 'Router on a Stick' oder "Inter VLAN routing"

Hallo zusammen,

ich versuche heute einmal in einfachen Schritten das Inter-VLAN Routing zu erläuterm.
Weil ich mein Heim noch nicht mit Routern und Switchen tapeziert habe, habe ich Dynamips aus dem GNS3 Paket benutzt.

Das folgende Setup habe ich mit 3725er Routern gebaut:
R0 ist der eigentliche Rrouter.
R2 habe ich als Switch im Einsatz. In Slot1 steckt ein NM-16ESW welches den Switch darstellt.
Host1 und Host2 stellen sind wie der Name schon erahnen lässt, lediglich Hosts.

inter vlan routing

Ich werde nur die Zeilen der Config posten, die nicht standartmäßig drin sind.

R0
hostname R0
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 10.0.100.1 255.255.255.0
!
interface FastEthernet0/0.200
encapsulation dot1Q 200
ip address 10.0.200.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip route 10.0.100.0 255.255.255.0 FastEthernet0/0.100
ip route 10.0.200.0 255.255.255.0 FastEthernet0/0.200
Für jedes VLAN muss ein Subinterface angelegt werden. Ich empfehle die VLAN-Nummern als Sub-IFnummer zu benutzen, aber das ist jedem freigelassen.
Als erstes muß auf dem Subinterface der encapsulation Befehl abgesetzt werden.
encapsulation dot1Q <vlan ID>

Um das Routing zwischen den VLANs einzuschalten kann man entweder statisches Routing nutzen, oder aber ein belieibiges Routing Protokoll. Ich habe statitische Routen benutzt, die jedes Subnetz über das zugehörige Subinterface erreichbar machen.

R2
hostname R2
!
interface FastEthernet1/0
description Link to R0
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/5
description Link to Host1
switchport access vlan 100
duplex full
speed 100
!
interface FastEthernet1/10
description Link to Host2
switchport access vlan 200
duplex full
speed 100
Da dieser Router lediglich als L2 Switch dient, sind keinerlei IP Adressen konifguriert. Normalerweise sollte zumindest eine Management IP auf irgend ein VLAN gebunden werden.

Host1
hostname Host1
!
interface FastEthernet0/0
ip address 10.0.100.100 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

Da diese Router lediglich Hosts simulieren sollen, haben sie eine Defaultroute die auf das ausgehende Interface zeigt, und somit das Default Gateway darstellt.

Host2
hostname Host2
!
interface FastEthernet0/0
ip address 10.0.200.200 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0


Ich empfehle dringend (eigentlich in jeder Config) speed und duplex Befehle, um "Missmatch"-Errors zu vermeiden.

Für Fragen benutzt einfach die Kommentar-Funktion.
Regards,
Zif

Mittwoch, 25. März 2009

EN - 'Router on a Stick' or Inter VLAN routing

Hey again,

I try to explain in simple steps how to do inter vlan routing.
Due to the lack of real equipment @home I used dynamips from the GNS3 package.

I built the folowing setup using 3725 routers.
R0 is the real router.
R2 is used as switch. In Slot1 I inserted a NM-16ESW which simulates the switch.
Host1 and Host2 are used as host only.

inter vlan routing

I will only post non-auto config lines.

R0
hostname R0
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 10.0.100.1 255.255.255.0
!
interface FastEthernet0/0.200
encapsulation dot1Q 200
ip address 10.0.200.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip route 10.0.100.0 255.255.255.0 FastEthernet0/0.100
ip route 10.0.200.0 255.255.255.0 FastEthernet0/0.200
For each VLAN a subinterface has to be created. I recommend using the VLAN number but there are no rule for it.
When configuring the subinterfaces enter first the encapsulation command.
encapsulation dot1Q <vlan ID>

To enable routing between VLANs you need either static routes or a routing protocol. I used static routes pointing for each subnet to its related subinterface.

R2
hostname R2
!
interface FastEthernet1/0
description Link to R0
switchport mode trunk
duplex full
speed 100
!
interface FastEthernet1/5
description Link to Host1
switchport access vlan 100
duplex full
speed 100
!
interface FastEthernet1/10
description Link to Host2
switchport access vlan 200
duplex full
speed 100
Due to this router is used as Switch only, there are no IP addresses configured. In a real scenario there would be at least a management IP normaly bound on a VLAN.

Host1
hostname Host1
!
interface FastEthernet0/0
ip address 10.0.100.100 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

Due to these routers are (mis)used as host, the have an default gateway pointing at the outgoing interface.

Host2
hostname Host2
!
interface FastEthernet0/0
ip address 10.0.200.200 255.255.255.0
speed 100
full-duplex
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0


I highly recommend (in every environment) to use the speed and duplex settings to avoid running in mismatch errors!

For questions just use the comment section.
Regards,
Zif

Donnerstag, 19. März 2009

ENG - Hub-Spoke Configuration PIX/ASA - Task 1

Finlay I've had the time to write this blog entry. As you may have noticed I´ve done the post in German some days ago, no big deal since it is my mother tong.

But back to the problem: creating a Hub Spoke VPN topology between 3 Cisco PIX. Where the two spoke PIX can send packets to each other

At first a small break for theory.

VPN networks are commonly divided into two topology schemes The first is Hub Spoke the other Full Mesh.
Hub Spoke is somehow easier to manage, because all you have to do is make sure that your remote location can connect to the central side. Everything else can be configured at the central location.

Full Mesh offers more redundancy and you don´t have to fear that your network is completely down if your central side is off-line In comparison to Hub Spoke Full mesh is harder to administrate

In larger enterprises you often find both schemes together, Full Mesh connecting the country offices and hub spoke for the regional offices connecting to the country headquarters

Now lets get started with solution to task 1
Setting:


Used networks
192.168.1.0 /24 - LAN main site ; routing via default route
192.168.2.0 /24 – LAN at customer 1 location 1 (Cust_1); routing via default route
192.168.3.0 /24 – LAN at customer 2 location (Cust_2); routing via default route
10.10.1.x /30 transfer network between ISP router and ASA/PIX; routing via default route
10.10.98.x /30 transfer networks between ISP routers, routing via OSPF
10.10.99.x /32 Management IP of the ISP Router; added to OSPF routing

Used tools, router and software versions
configuration and simulation using GNS3 + dynamips + PEMU
3x router 7200 (IOS 12.4.24T) as ISP router
3x router 1700 (IOS 12.3.26) as LAN hosts
3x PIX 525 (ASA/PIX 8.0.3) as Firewall and VPN endpoints

Step by step solution:
Configuration of the ISP zone
Interface creation at the routers:


device: ISP_Main
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.1 255.255.255.255
interface FastEthernet0/0
description ### FW_Main-e0 ###
ip address 10.10.1.1 255.255.255.252
duplex auto
speed auto
interface FastEthernet0/1
description ### Uplink ISP-Cust-2_f0/1 ###
ip address 10.10.98.5 255.255.255.252
duplex auto
speed auto
interface FastEthernet1/0
description ### Uplink ISP-Cust-1_f1/0 ###
ip address 10.10.98.1 255.255.255.252
duplex full
speed auto

device: ISP_Cust_1
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.3 255.255.255.255
interface FastEthernet0/0
description ### FW_Cust_1-e0 ###
ip address 10.10.1.5 255.255.255.252
duplex full
speed auto
interface FastEthernet0/1
description ### Uplink to ISP_Cust_2-f1/0 ###
ip address 10.10.98.10 255.255.255.252
duplex full
speed auto
interface FastEthernet1/0
description ### Uplink to ISP_Main-f1/0 ###
ip address 10.10.98.2 255.255.255.252
duplex full
speed auto

device: ISP_Cust_2
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.2 255.255.255.255
interface FastEthernet0/0
description ### FW-cust-2-e0 ###
ip address 10.10.1.9 255.255.255.252
duplex full
speed auto
interface FastEthernet0/1
description ### Uplink ISP_Main-f0/1 ###
ip address 10.10.98.6 255.255.255.252
duplex full
speed auto
interface FastEthernet1/0
description ### Uplink ISP_Cust_1-f0/1 ###
ip address 10.10.98.9 255.255.255.252
duplex full
speed auto


Configuration of OSPF
The task is easy but for the 3 internet routers I decided to work with a dynamic routing protocol OSPF
Using the command router ospf [prozess ID] will enable OSPF in your routers. The network statements define the networks that will be redistributed into OSPF.

device: ISP_Main
router ospf 100
router-id 10.10.99.1
log-adjacency-changes
network 10.10.1.0 0.0.0.3 area 0
network 10.10.98.0 0.0.0.3 area 0
network 10.10.98.4 0.0.0.3 area 0
network 10.10.99.1 0.0.0.0 area 0

device: ISP_Cust_1
router ospf 100
router-id 10.99.99.2
log-adjacency-changes
network 10.10.1.4 0.0.0.3 area 0
network 10.10.98.0 0.0.0.3 area 0
network 10.10.98.8 0.0.0.3 area 0
network 10.10.99.3 0.0.0.0 area 0

device: ISP_Cust_2
router ospf 100
router-id 10.99.99.3
log-adjacency-changes
network 10.10.1.8 0.0.0.3 area 0
network 10.10.98.4 0.0.0.3 area 0
network 10.10.98.8 0.0.0.3 area 0
network 10.10.99.2 0.0.0.0 area 0

The main configuration tasks are now done. Just do a quick ping from the router to the other routers
will ensure that the "Internet" works

Note:
I just wanted to use 12.4.24T and did get more trouble than necessary I´ve had to reconfigure quite a lot of times the IDLEPC value in Dynamips so that they do not consume all my CPU capacity. 3724 Router would have done the job running 12.4.15T8. This will be a lesson for me.

Configuration of the „Hosts“
Create an IP on the connected Interface and configure a default route to the Firewall. Nothing more to do here.

device: Host_Main
interface FastEthernet0
ip address 192.168.1.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.1.1

device: Host_Cust_1
interface FastEthernet0
ip address 192.168.2.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.2.1

device: Host_Cust_2
interface FastEthernet0
ip address 192.168.3.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.3.1

The configuration of this Hosts was done quick and after no shutdown was issued on all Interfaces they could be pinged from the PIX.

Configuration of the PIX
Basics


In the first step basic configuration on every ASA/PIX have been made. This means Interfaces, default routes to the ISPs and object groups.

device: FW_Main
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.2 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.1.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.1 1


device: FW-Cust-1
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.6 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.2.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.5 1


device: FW-Cust-2
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.10 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.3.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.9 1

All object groups are the same on all firewalls.
device: FW-Main / FW-Cust-1 /FW-Cust-2
object-group network OBJ_VPN_Main
network-object 192.168.1.0 255.255.255.0
object-group network OBJ_VPN_Customer_1
network-object 192.168.2.0 255.255.255.0
object-group network OBJ_VPN_Customer_2
network-object 192.168.3.0 255.255.255.0
object-group network OBJ_VPN_Customer
group-object OBJ_VPN_Customer_1
group-object OBJ_VPN_Customer_2


Site 2 Site VPNs have 3 characteristics that have to be configured

1. Crypto ACLs that define what traffic has to be encrypted
2. Tunnel groups that characterize the tunnel
3. ISAKMP and IPSEC parameters to build the tunnel.

Crypto ACLs are somehow every time the same. Allow traffic from local network A to remote network B.
The only thing to remember is that you have to apply a exact mirror on the other side of your VPN connection.
So this nearly automatically leads to the following crypto ACLs.

device: FW-Main
access-list ACL_Cry_map_10 remark ### traffic for VPN to Customer 1 ###
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer_1
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
access-list ACL_Cry_map_20 remark ### traffic for VPN to Customer 2 ###
access-list ACL_Cry_map_20 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer_2
access-list ACL_Cry_map_20 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2

device: FW-Cust-1
access-list ACL_Cry_map_10 remark ### traffic for VPN to Main Location ###
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Main
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2

device: FW-Cust-2
access-list ACL_Cry_map_10 remark ### traffic for VPN to Main Location ###
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Main
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1

So far the traffic that has to be encrypted is defined. Now the tunnel has to be specified
Together with several parameters the pre shared key is configured using the tunnel group.
If you use PSK you should use of course long and complex keys and change them from time to time.
Certificates may be an alternative for other scenarios but this will be covered in later tasks

For site 2 site VPNs usually the IP Address of the remote endpoint is the name of the tunnel group.

device: FW-Main
! Tunnel Group for FW-Cust-1
tunnel-group 10.10.1.6 type ipsec-l2l
tunnel-group 10.10.1.6 ipsec-attributes
pre-shared-key 1234567890
! Tunnel Group for FW-Cust-2
tunnel-group 10.10.1.10 type ipsec-l2l
tunnel-group 10.10.1.10 ipsec-attributes
pre-shared-key 0987654321

device: FW-Cust-1
! Tunnel Group for FW-Main
tunnel-group 10.10.1.2 type ipsec-l2l
tunnel-group 10.10.1.2 ipsec-attributes
pre-shared-key 1234567890

device: FW-Cust-2
! Tunnel Group for FW-Main
tunnel-group 10.10.1.2 type ipsec-l2l
tunnel-group 10.10.1.2 ipsec-attributes
pre-shared-key 0987654321

The last and biggest configuration block is for the ISAKMP and IPsec parameters and of course the matching between ISAKMP / IPSec parameters, the tunnel group and the ACLs.

device: FW-Main/ FW-Cust-1 / FW-Cust-2
crypto isakmp enable IF_Outside
crypto isakmp policy 100
authentication pre-share
encryption aes-256
hash sha
group 2
lifetime 86400

Creating the IPSec transform Sets

device: FW-Main/ FW-Cust-1 / FW-Cust-2
crypto ipsec transform-set TRANS_1 esp-aes-256 esp-sha-hmac

Defining the crypto map to match the parameters with each other. It is only possible to match one Crypto map on a logical interface, but every crypto map offers enough space for 65534 static connections

device: FW-Main
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.6
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside 20 match address ACL_Cry_map_20
crypto map MAP_Outside 20 set peer 10.10.1.10
crypto map MAP_Outside 20 set transform-set TRANS_1
crypto map MAP_Outside interface IF_Outside

device: FW-Cust-1
crypto ipsec transform-set TRANS_1 esp-aes-256 esp-sha-hmac
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.2
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside interface IF_Outside
crypto isakmp enable IF_Outside

device: FW-Cust-2
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.2
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside interface IF_Outside
crypto isakmp enable IF_Outside

Basically the VPN tunnels are now ready to do their job. Often NAT is configured on the firewall and even more often this fact is forgotten, so that the tunnel will not work.
That is why the in this task is NAT zero configured.

device: FW-Main
access-list ACL_NAT_0 remark ### Nat ZERO ###
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2
nat (IF_Outside) 0 access-list ACL_Nat_0

device: FW-Cust-1
access-list ACL_NAT_0 remark ### Nat ZERO ###
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Main
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2
nat (IF_Outside) 0 access-list ACL_Nat_0

device: FW-Cust-2
access-list ACL_NAT_0 remark ### Nat ZERO ###
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Main
nat (IF_Outside) 0 access-list ACL_Nat_0

Last but not least we have to enable that traffic can flow from one VPN tunnel to the other. This is by default not possible. Why VPN tunnel have the same security level and by design traffic within the same level is not allowed. Solution, enable

device: FW-Main
same-security-traffic permit intra-interface

If everything works as expected we should now be able to ping from any host to the other hosts





The ASA and PIX will now show a MM_Actif if you run show crypto isakmp sa

Feel free to comment, ask question or give feedback (corrections).
cheers NWG

Samstag, 14. März 2009

DE - Hub-Spoke Konfiguration Pix /ASA - Task 1

Endlich ist es geschafft und vor allem beschrieben. Also jetzt zur Frage Task 1 wie konfiguriere ich 2 Pixen so das sie mit der Zentralen Pix kommunizieren können und auch untereinander Daten verschicken können.

Ein bisschen was zu Theorie aber vorab.
Im VPN Netzwerken (nicht nur dort) kann man grundsätzlich zwischen zwei Topologie unterscheiden. Zum Einen Hub-Spoke und zum Anderen Full-Mesh Netzen.
Hub Spoke Netze sind Zentral ausgerichtet. Alle Remotestandorte verbinden sich zu einer Zentrale und über diese findet auch die Kommunikation zwischen den Remotestandorten statt. Administrativ ist die Konfiguration vermeintlich sehr elegant, da der Administrator sich nur an einer Stelle Gedanken machen muss, wer worauf zugreifen darf. In den Remotestandorten muss nur sicherstellen werden das die Zentrale erreicht wird. Fällt die Zentrale oder die Verbindung dorthin aus, ist das Datentechnisch der Super GAU – der Ausdruck „Nichts geht mehr“ trifft es so ziemlich genau.

Im Gegensatz dazu sind Full-Mesh Netzwerke ausfallsicher. Es gibt keine klare Zentrale und jeder Teilnehmer ist, an sich, mit jedem anderen vernetzt. Dies ermöglicht eine große Flexibilität falls einmal eine Lokation nicht erreichbar ist, sorgt aber im schlimmsten Fall auch für einen enormen administrativen Zusatzaufwand, da die Verbindungen konfiguriert, gemonitort und auch „gepflegt“ werden müssen.

Oft findet man in großen Organisationen eine Mischform aus beiden Konzepten. So sind oft bei einer Firma die Landesfilialen untereinander mittels Full-Mesh Konzept verbunden, die Regionalbüros aber dann wiederum mittels Hub-Spoke Topologie an die Landesfiliale angebunden.

Aber zurück zur Aufgabe
Testaufbau:


Verwendete Netzwerke:
192.168.1.0 /24 - LAN in der Zentrale (Main); Routing via Default Route
192.168.2.0 /24 – LAN bei Kunden 1 (Cust_1); Routing via Default Route
192.168.3.0 /24 – LAN bei Kunden 2 (Cust_2); Routing via Default Route
10.10.1.x /30 Verbindungsnetze zwischen ISP Router und PIX/ASA ; Routing via Default Route
10.10.98.x /30 Verbindungsnetze zwischen den ISP Routern, Routing via OSPF
10.10.99.x /32 Management IP der ISP Router; in OSPF Routing eingebunden

Verwendete Tools, Router, Software Versionen
Konfiguration und Simulation GNS3 + Dynamips + Pemu
3x Router 7200 (IOS 12.4.24T) als ISP Router
3x Router 1700 (IOS 12.3.26) als LAN Hosts
3x PIX 525 (ASA/PIX 8.0.3) als Firewall und VPN Endpunkt

Schritt für Schritt Lösung der Aufgabe:

Konfiguration der ISP Zone
Anlegen der Interface auf den Routern:


Gerät: ISP_Main
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.1 255.255.255.255
interface FastEthernet0/0
description ### FW_Main-e0 ###
ip address 10.10.1.1 255.255.255.252
duplex auto
speed auto
interface FastEthernet0/1
description ### Uplink ISP-Cust-2_f0/1 ###
ip address 10.10.98.5 255.255.255.252
duplex auto
speed auto
interface FastEthernet1/0
description ### Uplink ISP-Cust-1_f1/0 ###
ip address 10.10.98.1 255.255.255.252
duplex full
speed auto

Gerät: ISP_Cust_1
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.3 255.255.255.255
interface FastEthernet0/0
description ### FW_Cust_1-e0 ###
ip address 10.10.1.5 255.255.255.252
duplex full
speed auto
interface FastEthernet0/1
description ### Uplink to ISP_Cust_2-f1/0 ###
ip address 10.10.98.10 255.255.255.252
duplex full
speed auto
interface FastEthernet1/0
description ### Uplink to ISP_Main-f1/0 ###
ip address 10.10.98.2 255.255.255.252
duplex full
speed auto

Gerät: ISP_Cust_2
interface Loopback0
description ### MGMT INT ###
ip address 10.10.99.2 255.255.255.255
interface FastEthernet0/0
description ### FW-cust-2-e0 ###
ip address 10.10.1.9 255.255.255.252
duplex full
speed auto
interface FastEthernet0/1
description ### Uplink ISP_Main-f0/1 ###
ip address 10.10.98.6 255.255.255.252
duplex full
speed auto
interface FastEthernet1/0
description ### Uplink ISP_Cust_1-f0/1 ###
ip address 10.10.98.9 255.255.255.252
duplex full
speed auto


Konfiguration des OSPF auf den Routern
Auf wenn die Aufgabe einfach ist, wird für die drei Internet Router ein Routing Protokoll in der einfachsten Form implementiert.
Mit dem Befehl router ospf [Prozess ID] wird auf dem Router das OSPF Protokoll aktiviert. Die network Statements definieren die Netze die im Routing verteilt werden sollen. In diesem Fall werden alle Netze nur im Area 0 des OSPF Netzwerks bekannt gegeben.

Gerät: ISP_Main
router ospf 100
router-id 10.10.99.1
log-adjacency-changes
network 10.10.1.0 0.0.0.3 area 0
network 10.10.98.0 0.0.0.3 area 0
network 10.10.98.4 0.0.0.3 area 0
network 10.10.99.1 0.0.0.0 area 0

Gerät: ISP_Cust_1
router ospf 100
router-id 10.99.99.2
log-adjacency-changes
network 10.10.1.4 0.0.0.3 area 0
network 10.10.98.0 0.0.0.3 area 0
network 10.10.98.8 0.0.0.3 area 0
network 10.10.99.3 0.0.0.0 area 0

Gerät: ISP_Cust_2
router ospf 100
router-id 10.99.99.3
log-adjacency-changes
network 10.10.1.8 0.0.0.3 area 0
network 10.10.98.4 0.0.0.3 area 0
network 10.10.98.8 0.0.0.3 area 0
network 10.10.99.2 0.0.0.0 area 0

Die Kernaufgaben auf den Routern sind damit abgeschlossen. Ein kurzes pingen der einzelnen Interfaces von jedem Router aus, ergab das das „Internet“ funktioniert.

Anmerkungen:
Ich wollte unbedingt 12.4.24T einsetzen, und habe mir damit mehr Ärger als nötig eingehandelt, da die 72er Router regelmäßig nachdem sie konfiguriert wurden, mussten ihren IDLEPC Werte im Dynamips angepasst werden. 37er hätten es wohl auch getan und dann 12.4.15T8.

Konfiguration der LAN „Hosts“
Einrichten einer IP auf dem angeschlossenen Interface und setzen einer statischen Default Router in Richtung der PIX war alles was hier zu konfigurieren war.

Gerät: Host_Main
interface FastEthernet0
ip address 192.168.1.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.1.1

Gerät: Host_Cust_1
interface FastEthernet0
ip address 192.168.2.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.2.1

Gerät: Host_Cust_2
interface FastEthernet0
ip address 192.168.3.2 255.255.255.0
speed auto
ip route 0.0.0.0 0.0.0.0 192.168.3.1

Die Hosts waren schnell erledigt und nachdem ein no shutdown auf allen Interfaces gesetzt war, konnte man sie auch von den PIXen nach deren Konfiguration erreichen.

Konfiguration der PIX
Grundlagen


Als erstes wurden die Dinge, die es auf jeder PIX/ ASA gibt konfiguriert. Also in dem Fall die Interfaces, die (default) Routen zu den ISPs und die Optionalen Objekt Gruppen.

Gerät: FW_Main
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.2 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.1.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.1 1


Gerät: FW-Cust-1
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.6 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.2.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.5 1


Gerät: FW-Cust-2
interface Ethernet0
nameif IF_Outside
security-level 0
ip address 10.10.1.10 255.255.255.252

interface Ethernet1
nameif IF_Inside
security-level 100
ip address 192.168.3.1 255.255.255.0

route IF_Outside 0.0.0.0 0.0.0.0 10.10.1.9 1

Die Objekt Gruppen sind auf allen drei PIXen identisch.

Geräte: FW-Main / FW-Cust-1 /FW-Cust-2
object-group network OBJ_VPN_Main
network-object 192.168.1.0 255.255.255.0
object-group network OBJ_VPN_Customer_1
network-object 192.168.2.0 255.255.255.0
object-group network OBJ_VPN_Customer_2
network-object 192.168.3.0 255.255.255.0
object-group network OBJ_VPN_Customer
group-object OBJ_VPN_Customer_1
group-object OBJ_VPN_Customer_2

Die definierten Objekt Gruppen werden vor allem in ACLs eingesetzt, da man dann die ACLs bereits durch das ändern der Objekt Definition anpassen kann.


Site 2 Site VPNs zeichnen sich durch 3 Punkte aus, die zwingend in der Konfiguration vorhanden sein müssen.

1. ACLs die den zu verschlüsselnden Traffice definieren
2. Eine Tunnelgruppe die den Tunnel charakterisiert
3. den ISAKMP und IPSEC Parametern um den Tunnel aufzubauen

Die ACLs die die Tunnel definieren sind im Grunde genommen immer gleich. Erlaube Traffic von IP oder Netz A nach IP oder Netz B im Remote-Standort. Dabei ist nur zu beachten das die ACL gespiegelt auf dem anderen Teilnehmer zur Anwendung kommt.
So ergibt sich für die Crypto ACLs folgender Inhalt:

Gerät: FW-Main
access-list ACL_Cry_map_10 remark ### traffic for VPN to Customer 1 ###
! Folgende Zeile erlaubt: Traffic von der Zentralen Main Seite zum Netz im Standort Cust_1
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer_1
! Folgende Zeile erlaubt: Traffic vom LAN Cust_2 zum LAN Cust_1
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
access-list ACL_Cry_map_20 remark ### traffic for VPN to Customer 2 ###
! Folgende Zeile erlaubt: Traffic aus dem Main LAN zum Netz Standort Cust_2
access-list ACL_Cry_map_20 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer_2
! Folgende Zeile erlaubt: Traffic vom LAN Cust_2 zum LAN Cust_1
access-list ACL_Cry_map_20 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2

Gerät: FW-Cust-1
access-list ACL_Cry_map_10 remark ### traffic for VPN to Main Location ###
! Folgende Zeile erlaubt: Traffic vom LAN Cust_1 zum Main_LAN
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Main
! Folgende Zeile erlaubt: Traffic vom LAN Cust_1 zum LAN Cust_2
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2

Gerät: FW-Cust-2
access-list ACL_Cry_map_10 remark ### traffic for VPN to Main Location ###
! Folgende Zeile erlaubt: Traffic vom LAN Cust_2 zum Main LAN
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Main
! Folgende Zeile erlaubt: Traffic vom LAN Cust_2 zum LAN Cust_1
access-list ACL_Cry_map_10 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1

Somit wäre definiert, welcher Traffic zu verschlüsseln ist. Jetzt muss Der Tunnel genauer definiert werden. Neben diversen Parametern lässt sich vor allem in der Tunnelgruppe der Pre Shared Key bestimmen. Setzt man PSK ein sollte dieser möglichst Lang und Komplex sein und von Zeit zur Zeit geändert werden. Alternativ lassen sich Zertifikate verwenden. Der Einfachheit der Aufgabe aber ist das hier außen vor.
Für Site 2 Site VPNs werden in der Regel als Tunnelbezeichnung die IP Adresse der entfernten Seite der VPN Verbindung verwendet.

Gerät: FW-Main
! Tunnel Gruppe zur FW-Cust-1
tunnel-group 10.10.1.6 type ipsec-l2l
tunnel-group 10.10.1.6 ipsec-attributes
pre-shared-key 1234567890
! Tunnel Gruppe zur FW-Cust-2
tunnel-group 10.10.1.10 type ipsec-l2l
tunnel-group 10.10.1.10 ipsec-attributes
pre-shared-key 0987654321

Gerät: FW-Cust-1
! Tunnel Gruppe zur FW-Main
tunnel-group 10.10.1.2 type ipsec-l2l
tunnel-group 10.10.1.2 ipsec-attributes
pre-shared-key 1234567890

Gerät: FW-Cust-2
! Tunnel Gruppe zur FW-Main
tunnel-group 10.10.1.2 type ipsec-l2l
tunnel-group 10.10.1.2 ipsec-attributes
pre-shared-key 0987654321

Als letzten und größten Block müssen die ISAKMP und IPSec Parameter der Tunnel festgelegt werden und natürlich ein Zuordnung zwischen ISAKMP/ IPSec Parametern, Tunnel Gruppe und ACLs erfolgen.

Geräte: FW-Main/ FW-Cust-1 / FW-Cust-2
! Definieren der ISAKMP Parameter auf allen 3 Firewall Geräten gleich
crypto isakmp enable IF_Outside
crypto isakmp policy 100
authentication pre-share
encryption aes-256
hash sha
group 2
lifetime 86400

Bestimmen des IPSec Transform Sets

Geräte: FW-Main/ FW-Cust-1 / FW-Cust-2
crypto ipsec transform-set TRANS_1 esp-aes-256 esp-sha-hmac

Definieren der Crypto Map um die Parameter miteinander zu verknüpfen. Die Auswahl erfolgt beim Verbindungsaufbau über den bereits definierten Traffic durch die ACL.
Es kann pro Logischem Interface nur eine Crypto map gebunden werden, aber jede Crypto map bietet theoretisch Platz für 65534 statische Verbindungen.

Gerät: FW-Main
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.6
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside 20 match address ACL_Cry_map_20
crypto map MAP_Outside 20 set peer 10.10.1.10
crypto map MAP_Outside 20 set transform-set TRANS_1
! Binden der Crypto Map auf das Extern Interface
crypto map MAP_Outside interface IF_Outside

Gerät: FW-Cust-1
crypto ipsec transform-set TRANS_1 esp-aes-256 esp-sha-hmac
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.2
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside interface IF_Outside
crypto isakmp enable IF_Outside

Gerät: FW-Cust-2
crypto map MAP_Outside 10 match address ACL_Cry_map_10
crypto map MAP_Outside 10 set peer 10.10.1.2
crypto map MAP_Outside 10 set transform-set TRANS_1
crypto map MAP_Outside interface IF_Outside
crypto isakmp enable IF_Outside

Grundlegend ist nun alle Bereit um als VPN Tunnel zu arbeiten. Oft wird jedoch vergessen das auf der PIX/ASA NAT definiert ist. Dann versucht die Firewall Aufgrund der NAT Regeln den Traffic im Tunnel zu NATen.
Daher wird im Beisiel noch NAT 0 mit zugehöriger ACL konfiguriert. NAT 0 bedeutet das der Traffic der auf diese ACL zutrifft vom generellen NAT Prozess ignoriert wird.
Wieder erfolgt die Konfiguration der ACLs nach dem Syntax Erlaube von Netz A nach Remote Netz B.

Gerät: FW-Main
access-list ACL_NAT_0 remark ### Nat ZERO ###
! Kein NAT für Verbindungen von Main Lan zu den Remote Standorten
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Main object-group OBJ_VPN_Customer
! Kein NAT für Verbindungen von Kundennetz 1 zu Kundennetz 1
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
! Kein NAT für Verbindungen von Kundennetz 1 zu Kundennetz 2
access-list ACL_NAT_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2
! aktivieren der Nat Aufnahme für Traffic der der ACL entspricht und über das Interface IF_Outside geht
nat (IF_Outside) 0 access-list ACL_Nat_0

Gerät: FW-Cust-1
access-list ACL_NAT_0 remark ### Nat ZERO ###
! Kein NAT für Verbindungen von Kundennetz 1 zum Main Netz
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Main
! Kein NAT für Verbindungen von Kundennetz 1 zu Kundennetz 2
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_1 object-group OBJ_VPN_Customer_2
! aktivieren der Nat Aufnahme für Traffic der der ACL entspricht und über das Interface IF_Outside geht
nat (IF_Outside) 0 access-list ACL_Nat_0

Gerät: FW-Cust-2
access-list ACL_NAT_0 remark ### Nat ZERO ###
! Kein NAT für Verbindungen von Kundennetz 2 zum Kundennetz 1
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Customer_1
! Kein NAT für Verbindungen von Kundennetz 2 zum Main Netz
access-list ACL_Nat_0 extended permit ip object-group OBJ_VPN_Customer_2 object-group OBJ_VPN_Main
! aktivieren der Nat Aufnahme für Traffic der der ACL entspricht und über das Interface IF_Outside geht
nat (IF_Outside) 0 access-list ACL_Nat_0

Zu Guterletz muss eine Restriktion der ASA / PIX aufgegeben werden, damit die Remote Netzwerke sich gegenseitig sehen können. Grundsätzlich dürfen Interfaces mit gleichem Security Level keine Daten austauschen. Dies wird generell mit folgendem Befehl aufgehoben.
Gerät: FW-Main
same-security-traffic permit intra-interface

Wenn alles glatt gelaufen ist, sollten sich von allen Drei Hosts nun Pings zu den Remote Hosts absetzen lassen.





Auf den PIXen /ASA zeigt sich ein „wunderschönes“ MM_Active sobald man show crypto isakmp sa eingibt.


Für Anregungen ,Idee und so weiter(gern auch Fragen und Richtigstellungen) bin ich gern zu haben. Einfach in die Kommentare posten.


Links zu den Konfigs
ISP1
ISP2
ISP3
Host_Main
Host_Cust_1
Host_Cust_2
FW-Main
FW-Cust-1
FW-Cust-2

Freitag, 27. Februar 2009

DE/ ENG Basic VPN Hub-Spoke

Aufgabe 1
Anbinden zweier PIX per VPN an eine Zentrale PIX.. (Hub-Spoke)


Task 1
Building a VPN between 2 PIX and a main PIX. (Hub-Spoke)


Tools
GNS3
* PIX Images v8.0.4
* 3725 IOS 12.4.15T7 advanced security

Setting: