SlideShare a Scribd company logo
Configuring GRE Tunnel Through a Cisco
ASA Firewall
In this configuration tutorial I will show you how to configure a GRE tunnel
between two Cisco IOS routers. One of the routers is located behind a Cisco ASA
5500 Firewall, so I will show you also how to pass GRE traffic through a Cisco
ASA as well.
As you might know already, GRE tunnel termination is not supported on Cisco
ASA firewalls. However, this is fully supported on Cisco routers. GRE tunnels are
not secure (no traffic encryption takes place through GRE). However, GRE tunnels
are useful in cases where we need to pass “non-unicast” traffic between two remote
sites (e.g through the Internet). Two scenarios that come to my mind now include
passing routing protocols (such as OSPF) between two remote sites, and also
passing multicast traffic through the GRE tunnel from one site to another.
We will be using the following network diagram:
As shown from diagram above, we have two remote sites (LAN1 and LAN2)
which we need to connect through the Internet via a GRE tunnel. The GRE tunnel
will be terminated between routers R1 and R2. When configuring GRE, a virtual
Layer3 “Tunnel Interface” must be created. The GRE tunnel will be running
between the two Tunnel Interfaces (10.0.0.1 and 10.0.0.2 as shown from diagram).
Also, the Tunnel Interfaces will be using as actual source IPs the addresses of the
outside router interfaces (20.20.20.1 for R1 and 50.50.50.1 for R2). Therefore, IP
routing reachability must be in place between 20.20.20.1 and 50.50.50.1.
As shown, router R1 is behind a Cisco ASA firewall. This is exactly what makes
this scenario a little bit different from others. Since R2 must be able to reach R1,
the only way to “expose” R1 to the outside world is by creating a static NAT on
the ASA firewall. The static NAT rule will translate 20.20.20.1 (R1 outside IP) to
an outside public IP, let’s say 30.30.30.3. Therefore, R2 will be able to reach R1
via 30.30.30.3 public IP. Also, we must configure an access list on the ASA
(applied on the outside ASA interface) which must allow GRE traffic from
50.50.50.1 to 20.20.20.1
Lets see the configuration, starting with the routers first:
ROUTER R1
!First configure IP addresses on R1
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 20.20.20.1 255.255.255.0
duplex auto
speed auto
!Default route towards ASA
ip route 0.0.0.0 0.0.0.0 20.20.20.2
!Now configure GRE Tunnel Interface. Note that we reduce the MTU size in
order to accommodate the extra headers added from the GRE protocol.
interface Tunnel0
ip address 10.0.0.1 255.255.255.0
ip mtu 1400
ip tcp adjust-mss 1360
tunnel source 20.20.20.1
tunnel destination 50.50.50.1
!
!Now tell the router that remote subnet of LAN2 can be reached via the GRE
endpoint 10.0.0.2
ip route 192.168.2.0 255.255.255.0 10.0.0.2
Now let’s move on to configuring R2.
ROUTER R2
!First configure IP addresses on R2
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 50.50.50.1 255.255.255.0
duplex auto
speed auto
!Default route towards ISP
ip route 0.0.0.0 0.0.0.0 50.50.50.2
!Now configure GRE Tunnel Interface. Note that the tunnel destination is the
mapped (static NAT) IP address of router R1 (30.30.30.3)
interface Tunnel0
ip address 10.0.0.2 255.255.255.0
ip mtu 1400
ip tcp adjust-mss 1360
tunnel source 50.50.50.1
tunnel destination 30.30.30.3
!
!Now tell the router that remote subnet of LAN1 can be reached via the GRE
endpoint 10.0.0.1
ip route 192.168.1.0 255.255.255.0 10.0.0.1
That’s it for the routers. Let us see now how to configure the ASA.
ASA Configuration
!First configure IP addresses on ASA
interface GigabitEthernet0
nameif outside
security-level 0
ip address 30.30.30.2 255.255.255.0
!
interface GigabitEthernet1
nameif inside
security-level 100
ip address 20.20.20.2 255.255.255.0
!
!Default route towards ISP
Route outside 0.0.0.0 0.0.0.0 30.30.30.30
!Create a static NAT which translates 20.20.20.1 to 30.30.30.3
object network router_static
host 20.20.20.1
nat (inside,outside) static 30.30.30.3
!Allow GRE traffic from R2 to R1. The ACL below is for ASA 8.3 and later.
access-list OUT-IN extended permit gre host 50.50.50.1 host 20.20.20.1
access-group OUT-IN in interface outside
NOTE:
The ACL created above is for ASA version 8.3 and later. For ASA version prior to
8.3 the ACL would be as following:
access-list OUT-IN extended permit gre host 50.50.50.1 host 30.30.30.3
This is because from ASA version 8.3 and later, any access-list statement must
reference a “Real IP” address and not a “Mapped” IP address. From versions prior
to 8.3, the opposite was true.
Now if you ping a host to LAN2 from LAN1 (and vica-versa) you should get
ICMP replies.
Please note also that I have not configured any security protection on the GRE
tunnel. If you want you can configure IPSEC on top of GRE in order to encrypt all
data passing through the GRE tunnel.
About the Author
Harris Andrea is a Cisco Certified Professional with more than 18 years of experience
working with Cisco network technologies. He is the author of two Cisco Books
(“Cisco ASA Firewall Fundamentals” and “Cisco VPN Configuration Guide”) which
have been embraced by thousands of Cisco professionals all over the world. You can
find more Cisco configuration guides and tutorials on his blog here
http://www.networkstraining.com

More Related Content

What's hot

CCNP v6 Route: Implementing IP Routing Chapter 3
CCNP v6 Route: Implementing IP Routing Chapter 3CCNP v6 Route: Implementing IP Routing Chapter 3
CCNP v6 Route: Implementing IP Routing Chapter 3
Andy Juan Sarango Veliz
 
Mobile Transport Evolution with Unified MPLS
Mobile Transport Evolution with Unified MPLSMobile Transport Evolution with Unified MPLS
Mobile Transport Evolution with Unified MPLS
Cisco Canada
 
CCNA - Routing & Switching Commands
CCNA - Routing & Switching CommandsCCNA - Routing & Switching Commands
CCNA - Routing & Switching Commands
Eng. Emad Al-Atoum
 
Advanced RF Design & Troubleshooting
Advanced RF Design & TroubleshootingAdvanced RF Design & Troubleshooting
Advanced RF Design & Troubleshooting
Aruba, a Hewlett Packard Enterprise company
 
Cisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
Cisco Live! :: Introduction to IOS XR for Enterprises and Service ProvidersCisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
Cisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
Bruno Teixeira
 
5 g core overview
5 g core overview5 g core overview
5 g core overview
Hemraj Kumar
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)
Anwesh Dixit
 
IS-IS Protocol Introduction
IS-IS Protocol IntroductionIS-IS Protocol Introduction
IS-IS Protocol Introduction
NetProtocol Xpert
 
Cisco Commands
Cisco CommandsCisco Commands
Cisco Commands
Fredrick Hall
 
MPLS L3 VPN Deployment
MPLS L3 VPN DeploymentMPLS L3 VPN Deployment
MPLS L3 VPN Deployment
APNIC
 
CCNAv5 - S2: Chapter1 Introsuction to switched networks
CCNAv5 - S2: Chapter1 Introsuction to switched networksCCNAv5 - S2: Chapter1 Introsuction to switched networks
CCNAv5 - S2: Chapter1 Introsuction to switched networks
Vuz Dở Hơi
 
Deploy MPLS Traffic Engineering
Deploy MPLS Traffic EngineeringDeploy MPLS Traffic Engineering
Deploy MPLS Traffic Engineering
APNIC
 
LTE paging.ppt
LTE paging.pptLTE paging.ppt
LTE paging.pptmravi423
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
Kent Loh
 
Is Is Routing Protocol
Is Is Routing ProtocolIs Is Routing Protocol
Is Is Routing Protocolhayenas
 
EVPN Introduction
EVPN IntroductionEVPN Introduction
CCNA R&S 2 3 4 All Commands
CCNA R&S 2 3 4 All Commands CCNA R&S 2 3 4 All Commands
CCNA R&S 2 3 4 All Commands
MohamedZiadi5
 
Tacacs
TacacsTacacs
Tacacs1 2d
 
GRE Tunnel Configuration
GRE Tunnel ConfigurationGRE Tunnel Configuration
GRE Tunnel Configuration
NetProtocol Xpert
 

What's hot (20)

CCNP v6 Route: Implementing IP Routing Chapter 3
CCNP v6 Route: Implementing IP Routing Chapter 3CCNP v6 Route: Implementing IP Routing Chapter 3
CCNP v6 Route: Implementing IP Routing Chapter 3
 
Mobile Transport Evolution with Unified MPLS
Mobile Transport Evolution with Unified MPLSMobile Transport Evolution with Unified MPLS
Mobile Transport Evolution with Unified MPLS
 
CCNA - Routing & Switching Commands
CCNA - Routing & Switching CommandsCCNA - Routing & Switching Commands
CCNA - Routing & Switching Commands
 
Advanced RF Design & Troubleshooting
Advanced RF Design & TroubleshootingAdvanced RF Design & Troubleshooting
Advanced RF Design & Troubleshooting
 
Cisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
Cisco Live! :: Introduction to IOS XR for Enterprises and Service ProvidersCisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
Cisco Live! :: Introduction to IOS XR for Enterprises and Service Providers
 
5 g core overview
5 g core overview5 g core overview
5 g core overview
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)
 
IS-IS Protocol Introduction
IS-IS Protocol IntroductionIS-IS Protocol Introduction
IS-IS Protocol Introduction
 
Cisco Commands
Cisco CommandsCisco Commands
Cisco Commands
 
MPLS L3 VPN Deployment
MPLS L3 VPN DeploymentMPLS L3 VPN Deployment
MPLS L3 VPN Deployment
 
CCNAv5 - S2: Chapter1 Introsuction to switched networks
CCNAv5 - S2: Chapter1 Introsuction to switched networksCCNAv5 - S2: Chapter1 Introsuction to switched networks
CCNAv5 - S2: Chapter1 Introsuction to switched networks
 
Deploy MPLS Traffic Engineering
Deploy MPLS Traffic EngineeringDeploy MPLS Traffic Engineering
Deploy MPLS Traffic Engineering
 
LTE paging.ppt
LTE paging.pptLTE paging.ppt
LTE paging.ppt
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
 
Is Is Routing Protocol
Is Is Routing ProtocolIs Is Routing Protocol
Is Is Routing Protocol
 
EVPN Introduction
EVPN IntroductionEVPN Introduction
EVPN Introduction
 
OSPF
OSPF OSPF
OSPF
 
CCNA R&S 2 3 4 All Commands
CCNA R&S 2 3 4 All Commands CCNA R&S 2 3 4 All Commands
CCNA R&S 2 3 4 All Commands
 
Tacacs
TacacsTacacs
Tacacs
 
GRE Tunnel Configuration
GRE Tunnel ConfigurationGRE Tunnel Configuration
GRE Tunnel Configuration
 

Similar to Configuring GRE Tunnel Through a Cisco ASA Firewall

Eigrp on a cisco asa firewall configuration
Eigrp on a cisco asa firewall configurationEigrp on a cisco asa firewall configuration
Eigrp on a cisco asa firewall configuration3Anetwork com
 
Introduction 140318015826-phpapp01
Introduction 140318015826-phpapp01Introduction 140318015826-phpapp01
Introduction 140318015826-phpapp01
amit singh
 
Lab- Full IPsec Implementation.pdf
Lab- Full IPsec Implementation.pdfLab- Full IPsec Implementation.pdf
Lab- Full IPsec Implementation.pdf
Nesibusami
 
OSPF Internal Route Summarization
OSPF Internal Route SummarizationOSPF Internal Route Summarization
OSPF Internal Route Summarization
NetProtocol Xpert
 
ccna project on topic company infrastructure
ccna project on topic company infrastructureccna project on topic company infrastructure
ccna project on topic company infrastructure
Prince Gautam
 
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
Tarun Khaneja
 
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
Lab8  Controlling traffic using Extended ACL Objectives Per.pdfLab8  Controlling traffic using Extended ACL Objectives Per.pdf
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
adityacommunication1
 
Practice exam #2
Practice exam #2Practice exam #2
Practice exam #2Kris Mofu
 
Configuring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A PixConfiguring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A Pixangelitoh11
 
Nxll17 dynamic routing with asa
Nxll17 dynamic routing with asaNxll17 dynamic routing with asa
Nxll17 dynamic routing with asa
Netwax Lab
 
Labmannual
LabmannualLabmannual
Labmannual
Matiullah Jamil
 
Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)
NetProtocol Xpert
 
Networking
NetworkingNetworking
Networking
Pravesh Hidko
 
Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructions
trayyoo
 
OSWAN.pptx
OSWAN.pptxOSWAN.pptx
Cisco CCNA-Router on Stick
Cisco CCNA-Router on StickCisco CCNA-Router on Stick
Cisco CCNA-Router on Stick
Hamed Moghaddam
 

Similar to Configuring GRE Tunnel Through a Cisco ASA Firewall (20)

Eigrp on a cisco asa firewall configuration
Eigrp on a cisco asa firewall configurationEigrp on a cisco asa firewall configuration
Eigrp on a cisco asa firewall configuration
 
Introduction 140318015826-phpapp01
Introduction 140318015826-phpapp01Introduction 140318015826-phpapp01
Introduction 140318015826-phpapp01
 
Lab- Full IPsec Implementation.pdf
Lab- Full IPsec Implementation.pdfLab- Full IPsec Implementation.pdf
Lab- Full IPsec Implementation.pdf
 
OSPF Internal Route Summarization
OSPF Internal Route SummarizationOSPF Internal Route Summarization
OSPF Internal Route Summarization
 
ccna project on topic company infrastructure
ccna project on topic company infrastructureccna project on topic company infrastructure
ccna project on topic company infrastructure
 
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
 
1
11
1
 
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
Lab8  Controlling traffic using Extended ACL Objectives Per.pdfLab8  Controlling traffic using Extended ACL Objectives Per.pdf
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
 
Practice exam #2
Practice exam #2Practice exam #2
Practice exam #2
 
Configuring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A PixConfiguring Ip Sec Between A Router And A Pix
Configuring Ip Sec Between A Router And A Pix
 
Nxll17 dynamic routing with asa
Nxll17 dynamic routing with asaNxll17 dynamic routing with asa
Nxll17 dynamic routing with asa
 
Labmannual
LabmannualLabmannual
Labmannual
 
Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)
 
BACIK CISCO SKILLS
BACIK CISCO SKILLSBACIK CISCO SKILLS
BACIK CISCO SKILLS
 
Networking
NetworkingNetworking
Networking
 
Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructions
 
Aruba mobility access switch useful commands v2
Aruba mobility access switch useful commands v2Aruba mobility access switch useful commands v2
Aruba mobility access switch useful commands v2
 
OSWAN.pptx
OSWAN.pptxOSWAN.pptx
OSWAN.pptx
 
Cisco CCNA-Router on Stick
Cisco CCNA-Router on StickCisco CCNA-Router on Stick
Cisco CCNA-Router on Stick
 
Network
NetworkNetwork
Network
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Configuring GRE Tunnel Through a Cisco ASA Firewall

  • 1. Configuring GRE Tunnel Through a Cisco ASA Firewall In this configuration tutorial I will show you how to configure a GRE tunnel between two Cisco IOS routers. One of the routers is located behind a Cisco ASA 5500 Firewall, so I will show you also how to pass GRE traffic through a Cisco ASA as well. As you might know already, GRE tunnel termination is not supported on Cisco ASA firewalls. However, this is fully supported on Cisco routers. GRE tunnels are not secure (no traffic encryption takes place through GRE). However, GRE tunnels are useful in cases where we need to pass “non-unicast” traffic between two remote sites (e.g through the Internet). Two scenarios that come to my mind now include passing routing protocols (such as OSPF) between two remote sites, and also passing multicast traffic through the GRE tunnel from one site to another. We will be using the following network diagram:
  • 2. As shown from diagram above, we have two remote sites (LAN1 and LAN2) which we need to connect through the Internet via a GRE tunnel. The GRE tunnel will be terminated between routers R1 and R2. When configuring GRE, a virtual Layer3 “Tunnel Interface” must be created. The GRE tunnel will be running between the two Tunnel Interfaces (10.0.0.1 and 10.0.0.2 as shown from diagram). Also, the Tunnel Interfaces will be using as actual source IPs the addresses of the
  • 3. outside router interfaces (20.20.20.1 for R1 and 50.50.50.1 for R2). Therefore, IP routing reachability must be in place between 20.20.20.1 and 50.50.50.1. As shown, router R1 is behind a Cisco ASA firewall. This is exactly what makes this scenario a little bit different from others. Since R2 must be able to reach R1, the only way to “expose” R1 to the outside world is by creating a static NAT on the ASA firewall. The static NAT rule will translate 20.20.20.1 (R1 outside IP) to an outside public IP, let’s say 30.30.30.3. Therefore, R2 will be able to reach R1 via 30.30.30.3 public IP. Also, we must configure an access list on the ASA (applied on the outside ASA interface) which must allow GRE traffic from 50.50.50.1 to 20.20.20.1 Lets see the configuration, starting with the routers first: ROUTER R1 !First configure IP addresses on R1 interface FastEthernet0/0 ip address 192.168.1.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 20.20.20.1 255.255.255.0 duplex auto speed auto !Default route towards ASA ip route 0.0.0.0 0.0.0.0 20.20.20.2
  • 4. !Now configure GRE Tunnel Interface. Note that we reduce the MTU size in order to accommodate the extra headers added from the GRE protocol. interface Tunnel0 ip address 10.0.0.1 255.255.255.0 ip mtu 1400 ip tcp adjust-mss 1360 tunnel source 20.20.20.1 tunnel destination 50.50.50.1 ! !Now tell the router that remote subnet of LAN2 can be reached via the GRE endpoint 10.0.0.2 ip route 192.168.2.0 255.255.255.0 10.0.0.2 Now let’s move on to configuring R2. ROUTER R2 !First configure IP addresses on R2 interface FastEthernet0/0 ip address 192.168.2.1 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 50.50.50.1 255.255.255.0 duplex auto speed auto !Default route towards ISP ip route 0.0.0.0 0.0.0.0 50.50.50.2
  • 5. !Now configure GRE Tunnel Interface. Note that the tunnel destination is the mapped (static NAT) IP address of router R1 (30.30.30.3) interface Tunnel0 ip address 10.0.0.2 255.255.255.0 ip mtu 1400 ip tcp adjust-mss 1360 tunnel source 50.50.50.1 tunnel destination 30.30.30.3 ! !Now tell the router that remote subnet of LAN1 can be reached via the GRE endpoint 10.0.0.1 ip route 192.168.1.0 255.255.255.0 10.0.0.1 That’s it for the routers. Let us see now how to configure the ASA. ASA Configuration !First configure IP addresses on ASA interface GigabitEthernet0 nameif outside security-level 0 ip address 30.30.30.2 255.255.255.0 ! interface GigabitEthernet1 nameif inside security-level 100 ip address 20.20.20.2 255.255.255.0 ! !Default route towards ISP Route outside 0.0.0.0 0.0.0.0 30.30.30.30
  • 6. !Create a static NAT which translates 20.20.20.1 to 30.30.30.3 object network router_static host 20.20.20.1 nat (inside,outside) static 30.30.30.3 !Allow GRE traffic from R2 to R1. The ACL below is for ASA 8.3 and later. access-list OUT-IN extended permit gre host 50.50.50.1 host 20.20.20.1 access-group OUT-IN in interface outside NOTE: The ACL created above is for ASA version 8.3 and later. For ASA version prior to 8.3 the ACL would be as following: access-list OUT-IN extended permit gre host 50.50.50.1 host 30.30.30.3 This is because from ASA version 8.3 and later, any access-list statement must reference a “Real IP” address and not a “Mapped” IP address. From versions prior to 8.3, the opposite was true. Now if you ping a host to LAN2 from LAN1 (and vica-versa) you should get ICMP replies. Please note also that I have not configured any security protection on the GRE tunnel. If you want you can configure IPSEC on top of GRE in order to encrypt all data passing through the GRE tunnel. About the Author Harris Andrea is a Cisco Certified Professional with more than 18 years of experience working with Cisco network technologies. He is the author of two Cisco Books (“Cisco ASA Firewall Fundamentals” and “Cisco VPN Configuration Guide”) which have been embraced by thousands of Cisco professionals all over the world. You can find more Cisco configuration guides and tutorials on his blog here http://www.networkstraining.com