SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Painlessly Exposing IPv4-only Services on
the IPv6 Internet
Carlos Martinez Cagnazzo
LACNIC
carlos @ lacnic.net
@carlosm3011
Unless you have been living under a rock…

• …you have probably heard
something about IPv4 running out
Unless you have been living under a rock…

• … and thought that maybe it’s high
time to do something about it
Exposing Services in IPv6

• This talk assumes that you control your DNS and can
create records within your domains
• When exposing services in IPv6, going to full dual stack
operation should always be the first choice
• But… sometimes this is not advisable or possible
– For example:
• If you lack direct IPv6 connectivity but a partner does
• If the servers cannot be modified or upgraded
• If the software licensing is tied to IP addressing
The Challenge

• How can I expose an IPv4-only service to the IPv6
Internet?
– Without reconfiguring the servers themselves at all
– Preferably using open source, readily available software
Two Approaches

• Application layer-based:
– HTTP reverse proxy

• Network layer-based:
– Address / Protocol translation
HTTP Reverse Proxy

• Apache’s mod_proxy listening on an IPv6 address can
perform reverse proxying to an IPv4 host

HTTP GET /

Proxied-HTTP GET /
HTTP Reverse Proxy

• Apache’s mod_proxy can listen on an IPv6 address and
perform reverse proxying to an IPv4 address:
<VirtualHost [2001:13c7:7001:4000::10]:80>
# Server names
ServerName www.mnav.gub.uy
ServerAlias www.mnav.gub.uy.prx64.labs.lacnic.net
# Logs
CustomLog
/home/v6v4Proxy/logs/mnav/access.log combined
ErrorLog
/home/v6v4Proxy/logs/mnav/error.log
ProxyPass
/ http://www.mnav.gub.uy/
ProxyPassReverse
/ http://www.mnav.gub.uy/
</VirtualHost>
HTTP Reverse Proxy

• Pros
– Simple to configure, just adapt the snippet from the previous
slide to your network setup and you are done
– Server and proxy do not need to be on the same network

• Cons
– HTTP-specific, other solutions would be needed for other
application protocols
– HTML-related issues
• Embedded IPv4-literals will fail
• Charset-related issues
– Proxy and web server must strictly agree on the charsets used
– HTML-entities should be preferred (&aacute; for ‘á’)
A Network-layer Approach

• Meet NAT64 !
– Connect IPv6-only clouds with IPv4-only clouds
– Translate protocol headers including addresses

• Destination IPv4 address is embedded / encoded in IPv6
destination address
• Source IPv4 address for translated packet:
– Multiplexed using TCP / UDP port numbers: Stateful NAT64
– One-to-one mapping: Stateless NAT64
NAT64 High Level Description

• Traffic flows started from an IPv6-only host are
translated into IPv4 and forwarded to IPv4-only hosts
• Protocol and address translation
– Protocol: IPv6 <-> IPv4 header mapping
– Address: IPv6 <-> IPv4 address mapping

• This mapping is obviously not one-to-one
• A v6 prefix is chosen per network which will be used to
map the IPv4 space
– A /96 is enough (32 bits), RFCs recommend using 64:ff9b::/96
IPv4 into IPv6 Address Mapping

• RFC 6052 defines algorithmic address mapping
NAT64 (ii)

• Protocol translation
– For each IPv6 packet the NAT64 box receives it has to build an
IPv4 packet
• Header field mapping
• Address mapping IPv6 -> IPv4
– No one-to-one mapping is possible

– The NAT64 box needs at least one public IPv4 address for
outgoing packets
• It needs to keep a state table, just like any NAT implementation
Stateful NAT64

IPv6 Packet

IPv4 Packet

Alg. Address
Mapping

SRC: 2001:db8::128
DST: 64:ff9b::42dc:9e19

SRC: 190.216.38.14
DST: 69.63.190.18

NAT64
Router

<<other headers>>

<<other headers>>
DSrc

TCP Frame

DDst

Port1

Port2

2001:db8::12
8

69.63.190.1
8

3276
8

1554
7

TCP Frame

SRC PORT: 32768

SRC PORT: 15547

DST PORT: 80

DST PORT: 80
Stateless NAT64

IPv6 Packet
SRC: 2001:db8::128
DST: 64:ff9b::42dc:9e19

IPv4 Packet

Algorithmic Address
Mapping

NAT64
Router

<<other headers>>

SRC: 190.216.38.X
DST: 69.63.190.18
<<other headers>>

SRC address is
mapped one-to-one
to the IPv6 hosts
Introducing TAYGA

• TAYGA is a user-mode, stateless NAT64 implementation
– Uses the TUN driver

• http://www.litech.org/tayga/
• (Full instructions on TAYGA’s website)
– Compile:
• The usual ./configure && make && make install

– Create a config file /usr/local/etc/tayga.conf:
– Create tun device and configure static routes and addresses
The case of http://www.isoc.org.uy

• ISOC’s local Uruguay chapter web is on a hosting service
which does not support IPv6
• IPHH.net graciously donated a virtual machine with full
dual-stack connectivity
Configuring TAYGA on the NAT64 box

• Configure TAYGA itself
tun-device nat64
ipv4-addr 213.128.134.58
prefix 2001:868:100:1b01:0:1::/96
dynamic-pool 192.168.255.0/24
data-dir /var/db/tayga
Configuring TAYGA on the NAT64 box

• Set up routes and NAT44 rules
ip
ip
ip
ip

link
addr
addr
addr

set nat64 up
flush dev nat64
add 213.128.134.58 dev nat64
add 2001:868:100:1b00::cafe dev nat64 NAT64 prefix

ip route add 192.168.255.0/24 dev nat64
ip route add 2001:868:100:1b01:0:1::/96 dev nat64

iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -j SNAT 
--to-source 213.128.134.58
iptables -A FORWARD -s 192.168.255.0/24 -i nat64 -j ACCEPT
What is going on inside the NAT64 box ?

IPv6

Incoming IPv6 packets
eth0
(IPv6)

nat64

IPv4 (priv)
IPv6

Outgoing IPv4 packets
(public addressing)

IPv4 (priv)

TAYGA

NAT44

eth0
(IPv4)
Creating the DNS records

• We map the public IPv4 of the server into the NAT64
prefix
– Some servers may support mapped-IPv4 notation as follows:
• 2001:db8:1::200.40.20.1/64

– If not, you can either do the math, or, if you are lazy like me:

• Create the AAA record(s) that are necessary using the
mapped IPv6 address
Ready? Let’s try it out

• http://www.isoc.org.uy
Want to try it out for your website?

• Drop me an email!
Thank you !

carlosm3011

Weitere ähnliche Inhalte

Was ist angesagt?

Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layersOlivier Bonaventure
 
IPv6 introduction
IPv6 introductionIPv6 introduction
IPv6 introductionGuider Lee
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPOlivier Bonaventure
 
The IPv6-Only Network
The IPv6-Only NetworkThe IPv6-Only Network
The IPv6-Only NetworkAPNIC
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsShannon McFarland
 
P4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlP4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlOpen-NFP
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing DaemonAPNIC
 
IPv6 in Cellular Networks
IPv6 in Cellular NetworksIPv6 in Cellular Networks
IPv6 in Cellular NetworksAPNIC
 
Networking Chapter 10
Networking Chapter 10Networking Chapter 10
Networking Chapter 10mlrbrown
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group PresentationJumping Bean
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Netgate
 
RADIUS and LDAP - pfSense Hangout August 2015
RADIUS and LDAP - pfSense Hangout August 2015RADIUS and LDAP - pfSense Hangout August 2015
RADIUS and LDAP - pfSense Hangout August 2015Netgate
 
IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015Netgate
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackOpen-NFP
 
NAT on pfSense 2.3 - pfSense Hangout May 2016
NAT on pfSense 2.3 - pfSense Hangout May 2016NAT on pfSense 2.3 - pfSense Hangout May 2016
NAT on pfSense 2.3 - pfSense Hangout May 2016Netgate
 
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Chris Fregly
 
501 ch 3 network technologies tools
501 ch 3 network technologies tools501 ch 3 network technologies tools
501 ch 3 network technologies toolsgocybersec
 

Was ist angesagt? (20)

Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layers
 
IPv6 introduction
IPv6 introductionIPv6 introduction
IPv6 introduction
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
IPv6 Entreprise Multihoming
IPv6 Entreprise MultihomingIPv6 Entreprise Multihoming
IPv6 Entreprise Multihoming
 
The IPv6-Only Network
The IPv6-Only NetworkThe IPv6-Only Network
The IPv6-Only Network
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments
 
P4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlP4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and Control
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing Daemon
 
IPv6 in Cellular Networks
IPv6 in Cellular NetworksIPv6 in Cellular Networks
IPv6 in Cellular Networks
 
Networking Chapter 10
Networking Chapter 10Networking Chapter 10
Networking Chapter 10
 
IPv6 - Jozi Linux User Group Presentation
IPv6  - Jozi Linux User Group PresentationIPv6  - Jozi Linux User Group Presentation
IPv6 - Jozi Linux User Group Presentation
 
FD.io - The Universal Dataplane
FD.io - The Universal DataplaneFD.io - The Universal Dataplane
FD.io - The Universal Dataplane
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017
 
RADIUS and LDAP - pfSense Hangout August 2015
RADIUS and LDAP - pfSense Hangout August 2015RADIUS and LDAP - pfSense Hangout August 2015
RADIUS and LDAP - pfSense Hangout August 2015
 
IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015IPv6 Basics - pfSense Hangout July 2015
IPv6 Basics - pfSense Hangout July 2015
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStack
 
Ipv6 routing
Ipv6 routingIpv6 routing
Ipv6 routing
 
NAT on pfSense 2.3 - pfSense Hangout May 2016
NAT on pfSense 2.3 - pfSense Hangout May 2016NAT on pfSense 2.3 - pfSense Hangout May 2016
NAT on pfSense 2.3 - pfSense Hangout May 2016
 
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
Kafka Summit SF Apr 26 2016 - Generating Real-time Recommendations with NiFi,...
 
501 ch 3 network technologies tools
501 ch 3 network technologies tools501 ch 3 network technologies tools
501 ch 3 network technologies tools
 

Ähnlich wie Enabling IPv6 Services Transparently

IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onAPNIC
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoAPNIC
 
APNIC Update
APNIC Update APNIC Update
APNIC Update APNIC
 
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandAPNIC
 
Deploying IPv6-mostly access networks
 Deploying IPv6-mostly access networks Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksRIPE NCC
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networksRIPE NCC
 
Introduction to ipv6 v1.3
Introduction to ipv6 v1.3Introduction to ipv6 v1.3
Introduction to ipv6 v1.3Karunakant Rai
 
IPv6: We Care So You Don't Have To
IPv6: We Care So You Don't Have ToIPv6: We Care So You Don't Have To
IPv6: We Care So You Don't Have ToGary Wilhelm
 
Apnic IPv6 Deployment
Apnic IPv6 DeploymentApnic IPv6 Deployment
Apnic IPv6 DeploymentAPNIC
 
Understanding i pv6 2
Understanding i pv6 2Understanding i pv6 2
Understanding i pv6 2srmanjuskp
 
Networking Chapter 13
Networking Chapter 13Networking Chapter 13
Networking Chapter 13mlrbrown
 
Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08gameaxt
 
5. transistion mechanisum 1
5. transistion mechanisum 15. transistion mechanisum 1
5. transistion mechanisum 1rajataro
 
ARIN 36 IETF IPv6 Activities Report
ARIN 36 IETF IPv6 Activities ReportARIN 36 IETF IPv6 Activities Report
ARIN 36 IETF IPv6 Activities ReportARIN
 
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistanceRobert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistancePROIDEA
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networksRIPE NCC
 
IPv6 translation methods
IPv6 translation methodsIPv6 translation methods
IPv6 translation methodsAhmad Hijazi
 
A very good introduction to IPv6
A very good introduction to IPv6A very good introduction to IPv6
A very good introduction to IPv6Syed Arshad
 

Ähnlich wie Enabling IPv6 Services Transparently (20)

IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-on
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demo
 
APNIC Update
APNIC Update APNIC Update
APNIC Update
 
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
 
Deploying IPv6-mostly access networks
 Deploying IPv6-mostly access networks Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networks
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networks
 
Introduction to ipv6 v1.3
Introduction to ipv6 v1.3Introduction to ipv6 v1.3
Introduction to ipv6 v1.3
 
IPv6: We Care So You Don't Have To
IPv6: We Care So You Don't Have ToIPv6: We Care So You Don't Have To
IPv6: We Care So You Don't Have To
 
Apnic IPv6 Deployment
Apnic IPv6 DeploymentApnic IPv6 Deployment
Apnic IPv6 Deployment
 
Understanding i pv6 2
Understanding i pv6 2Understanding i pv6 2
Understanding i pv6 2
 
Networking Chapter 13
Networking Chapter 13Networking Chapter 13
Networking Chapter 13
 
Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08Microsoft Offical Course 20410C_08
Microsoft Offical Course 20410C_08
 
5. transistion mechanisum 1
5. transistion mechanisum 15. transistion mechanisum 1
5. transistion mechanisum 1
 
ARIN 36 IETF IPv6 Activities Report
ARIN 36 IETF IPv6 Activities ReportARIN 36 IETF IPv6 Activities Report
ARIN 36 IETF IPv6 Activities Report
 
3hows
3hows3hows
3hows
 
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistanceRobert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
 
Deploying IPv6-mostly access networks
Deploying IPv6-mostly access networksDeploying IPv6-mostly access networks
Deploying IPv6-mostly access networks
 
IPv6 translation methods
IPv6 translation methodsIPv6 translation methods
IPv6 translation methods
 
A very good introduction to IPv6
A very good introduction to IPv6A very good introduction to IPv6
A very good introduction to IPv6
 
UNIT-2.pptx
UNIT-2.pptxUNIT-2.pptx
UNIT-2.pptx
 

Mehr von Carlos Martinez Cagnazzo

Como brindar servicio de Internet (casi) sin IPv4
Como brindar servicio de Internet (casi) sin IPv4Como brindar servicio de Internet (casi) sin IPv4
Como brindar servicio de Internet (casi) sin IPv4Carlos Martinez Cagnazzo
 
Evolución del stack de protocolos de Internet - IPv6 y QUIC
Evolución del stack de protocolos de Internet - IPv6 y QUICEvolución del stack de protocolos de Internet - IPv6 y QUIC
Evolución del stack de protocolos de Internet - IPv6 y QUICCarlos Martinez Cagnazzo
 
The End of IPv4: What It Means for Incident Responders
The End of IPv4: What It Means for Incident RespondersThe End of IPv4: What It Means for Incident Responders
The End of IPv4: What It Means for Incident RespondersCarlos Martinez Cagnazzo
 
Actualización sobre DNS en el IETF para LACNIC 28
Actualización sobre DNS en el IETF para LACNIC 28Actualización sobre DNS en el IETF para LACNIC 28
Actualización sobre DNS en el IETF para LACNIC 28Carlos Martinez Cagnazzo
 
An Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECAn Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECCarlos Martinez Cagnazzo
 
Introduccion a RPKI - Certificacion de Recursos de Internet
Introduccion a RPKI - Certificacion de Recursos de InternetIntroduccion a RPKI - Certificacion de Recursos de Internet
Introduccion a RPKI - Certificacion de Recursos de InternetCarlos Martinez Cagnazzo
 
Seguridad de la Información para Traductores
Seguridad de la Información para TraductoresSeguridad de la Información para Traductores
Seguridad de la Información para TraductoresCarlos Martinez Cagnazzo
 
Mitigación de denegaciones de servicio en DNS con RRL
Mitigación de denegaciones de servicio en DNS con RRLMitigación de denegaciones de servicio en DNS con RRL
Mitigación de denegaciones de servicio en DNS con RRLCarlos Martinez Cagnazzo
 
NAT64 en LACNIC 18: Experimentos con NAT64 sin estado
NAT64 en LACNIC 18: Experimentos con NAT64 sin estadoNAT64 en LACNIC 18: Experimentos con NAT64 sin estado
NAT64 en LACNIC 18: Experimentos con NAT64 sin estadoCarlos Martinez Cagnazzo
 

Mehr von Carlos Martinez Cagnazzo (20)

Como brindar servicio de Internet (casi) sin IPv4
Como brindar servicio de Internet (casi) sin IPv4Como brindar servicio de Internet (casi) sin IPv4
Como brindar servicio de Internet (casi) sin IPv4
 
Evolución del stack de protocolos de Internet - IPv6 y QUIC
Evolución del stack de protocolos de Internet - IPv6 y QUICEvolución del stack de protocolos de Internet - IPv6 y QUIC
Evolución del stack de protocolos de Internet - IPv6 y QUIC
 
RPKI en America Latina y el Caribe
RPKI en America Latina y el CaribeRPKI en America Latina y el Caribe
RPKI en America Latina y el Caribe
 
The End of IPv4: What It Means for Incident Responders
The End of IPv4: What It Means for Incident RespondersThe End of IPv4: What It Means for Incident Responders
The End of IPv4: What It Means for Incident Responders
 
Evolución de Protocolos de Internet 2017
Evolución de Protocolos de Internet 2017Evolución de Protocolos de Internet 2017
Evolución de Protocolos de Internet 2017
 
Actualización sobre DNS en el IETF para LACNIC 28
Actualización sobre DNS en el IETF para LACNIC 28Actualización sobre DNS en el IETF para LACNIC 28
Actualización sobre DNS en el IETF para LACNIC 28
 
IPv6 Routing Table Prefix Size Analysis
IPv6 Routing Table Prefix Size AnalysisIPv6 Routing Table Prefix Size Analysis
IPv6 Routing Table Prefix Size Analysis
 
An Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSECAn Introduction to DANE - Securing TLS using DNSSEC
An Introduction to DANE - Securing TLS using DNSSEC
 
Internet of Things en el Dia de Internet
Internet of Things en el Dia de InternetInternet of Things en el Dia de Internet
Internet of Things en el Dia de Internet
 
Monitoreo de Red para Peering
Monitoreo de Red para PeeringMonitoreo de Red para Peering
Monitoreo de Red para Peering
 
An IPv6 Primer
An IPv6 PrimerAn IPv6 Primer
An IPv6 Primer
 
Introduccion a RPKI - Certificacion de Recursos de Internet
Introduccion a RPKI - Certificacion de Recursos de InternetIntroduccion a RPKI - Certificacion de Recursos de Internet
Introduccion a RPKI - Certificacion de Recursos de Internet
 
LACNOG - Logging in the Post-IPv4 World
LACNOG - Logging in the Post-IPv4 WorldLACNOG - Logging in the Post-IPv4 World
LACNOG - Logging in the Post-IPv4 World
 
Seguridad de la Información para Traductores
Seguridad de la Información para TraductoresSeguridad de la Información para Traductores
Seguridad de la Información para Traductores
 
Mitigación de denegaciones de servicio en DNS con RRL
Mitigación de denegaciones de servicio en DNS con RRLMitigación de denegaciones de servicio en DNS con RRL
Mitigación de denegaciones de servicio en DNS con RRL
 
An Overview of DNSSEC
An Overview of DNSSECAn Overview of DNSSEC
An Overview of DNSSEC
 
An Overview of RPKI
An Overview of RPKIAn Overview of RPKI
An Overview of RPKI
 
Una introduccion a IPv6
Una introduccion a IPv6Una introduccion a IPv6
Una introduccion a IPv6
 
NAT64 en LACNIC 18: Experimentos con NAT64 sin estado
NAT64 en LACNIC 18: Experimentos con NAT64 sin estadoNAT64 en LACNIC 18: Experimentos con NAT64 sin estado
NAT64 en LACNIC 18: Experimentos con NAT64 sin estado
 
DNSSEC - Generalidades e Introducción
DNSSEC - Generalidades e IntroducciónDNSSEC - Generalidades e Introducción
DNSSEC - Generalidades e Introducción
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Enabling IPv6 Services Transparently

  • 1. Painlessly Exposing IPv4-only Services on the IPv6 Internet Carlos Martinez Cagnazzo LACNIC carlos @ lacnic.net @carlosm3011
  • 2. Unless you have been living under a rock… • …you have probably heard something about IPv4 running out
  • 3. Unless you have been living under a rock… • … and thought that maybe it’s high time to do something about it
  • 4. Exposing Services in IPv6 • This talk assumes that you control your DNS and can create records within your domains • When exposing services in IPv6, going to full dual stack operation should always be the first choice • But… sometimes this is not advisable or possible – For example: • If you lack direct IPv6 connectivity but a partner does • If the servers cannot be modified or upgraded • If the software licensing is tied to IP addressing
  • 5. The Challenge • How can I expose an IPv4-only service to the IPv6 Internet? – Without reconfiguring the servers themselves at all – Preferably using open source, readily available software
  • 6. Two Approaches • Application layer-based: – HTTP reverse proxy • Network layer-based: – Address / Protocol translation
  • 7. HTTP Reverse Proxy • Apache’s mod_proxy listening on an IPv6 address can perform reverse proxying to an IPv4 host HTTP GET / Proxied-HTTP GET /
  • 8. HTTP Reverse Proxy • Apache’s mod_proxy can listen on an IPv6 address and perform reverse proxying to an IPv4 address: <VirtualHost [2001:13c7:7001:4000::10]:80> # Server names ServerName www.mnav.gub.uy ServerAlias www.mnav.gub.uy.prx64.labs.lacnic.net # Logs CustomLog /home/v6v4Proxy/logs/mnav/access.log combined ErrorLog /home/v6v4Proxy/logs/mnav/error.log ProxyPass / http://www.mnav.gub.uy/ ProxyPassReverse / http://www.mnav.gub.uy/ </VirtualHost>
  • 9. HTTP Reverse Proxy • Pros – Simple to configure, just adapt the snippet from the previous slide to your network setup and you are done – Server and proxy do not need to be on the same network • Cons – HTTP-specific, other solutions would be needed for other application protocols – HTML-related issues • Embedded IPv4-literals will fail • Charset-related issues – Proxy and web server must strictly agree on the charsets used – HTML-entities should be preferred (&aacute; for ‘á’)
  • 10. A Network-layer Approach • Meet NAT64 ! – Connect IPv6-only clouds with IPv4-only clouds – Translate protocol headers including addresses • Destination IPv4 address is embedded / encoded in IPv6 destination address • Source IPv4 address for translated packet: – Multiplexed using TCP / UDP port numbers: Stateful NAT64 – One-to-one mapping: Stateless NAT64
  • 11. NAT64 High Level Description • Traffic flows started from an IPv6-only host are translated into IPv4 and forwarded to IPv4-only hosts • Protocol and address translation – Protocol: IPv6 <-> IPv4 header mapping – Address: IPv6 <-> IPv4 address mapping • This mapping is obviously not one-to-one • A v6 prefix is chosen per network which will be used to map the IPv4 space – A /96 is enough (32 bits), RFCs recommend using 64:ff9b::/96
  • 12. IPv4 into IPv6 Address Mapping • RFC 6052 defines algorithmic address mapping
  • 13. NAT64 (ii) • Protocol translation – For each IPv6 packet the NAT64 box receives it has to build an IPv4 packet • Header field mapping • Address mapping IPv6 -> IPv4 – No one-to-one mapping is possible – The NAT64 box needs at least one public IPv4 address for outgoing packets • It needs to keep a state table, just like any NAT implementation
  • 14. Stateful NAT64 IPv6 Packet IPv4 Packet Alg. Address Mapping SRC: 2001:db8::128 DST: 64:ff9b::42dc:9e19 SRC: 190.216.38.14 DST: 69.63.190.18 NAT64 Router <<other headers>> <<other headers>> DSrc TCP Frame DDst Port1 Port2 2001:db8::12 8 69.63.190.1 8 3276 8 1554 7 TCP Frame SRC PORT: 32768 SRC PORT: 15547 DST PORT: 80 DST PORT: 80
  • 15. Stateless NAT64 IPv6 Packet SRC: 2001:db8::128 DST: 64:ff9b::42dc:9e19 IPv4 Packet Algorithmic Address Mapping NAT64 Router <<other headers>> SRC: 190.216.38.X DST: 69.63.190.18 <<other headers>> SRC address is mapped one-to-one to the IPv6 hosts
  • 16. Introducing TAYGA • TAYGA is a user-mode, stateless NAT64 implementation – Uses the TUN driver • http://www.litech.org/tayga/ • (Full instructions on TAYGA’s website) – Compile: • The usual ./configure && make && make install – Create a config file /usr/local/etc/tayga.conf: – Create tun device and configure static routes and addresses
  • 17. The case of http://www.isoc.org.uy • ISOC’s local Uruguay chapter web is on a hosting service which does not support IPv6 • IPHH.net graciously donated a virtual machine with full dual-stack connectivity
  • 18. Configuring TAYGA on the NAT64 box • Configure TAYGA itself tun-device nat64 ipv4-addr 213.128.134.58 prefix 2001:868:100:1b01:0:1::/96 dynamic-pool 192.168.255.0/24 data-dir /var/db/tayga
  • 19. Configuring TAYGA on the NAT64 box • Set up routes and NAT44 rules ip ip ip ip link addr addr addr set nat64 up flush dev nat64 add 213.128.134.58 dev nat64 add 2001:868:100:1b00::cafe dev nat64 NAT64 prefix ip route add 192.168.255.0/24 dev nat64 ip route add 2001:868:100:1b01:0:1::/96 dev nat64 iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -j SNAT --to-source 213.128.134.58 iptables -A FORWARD -s 192.168.255.0/24 -i nat64 -j ACCEPT
  • 20. What is going on inside the NAT64 box ? IPv6 Incoming IPv6 packets eth0 (IPv6) nat64 IPv4 (priv) IPv6 Outgoing IPv4 packets (public addressing) IPv4 (priv) TAYGA NAT44 eth0 (IPv4)
  • 21. Creating the DNS records • We map the public IPv4 of the server into the NAT64 prefix – Some servers may support mapped-IPv4 notation as follows: • 2001:db8:1::200.40.20.1/64 – If not, you can either do the math, or, if you are lazy like me: • Create the AAA record(s) that are necessary using the mapped IPv6 address
  • 22. Ready? Let’s try it out • http://www.isoc.org.uy
  • 23. Want to try it out for your website? • Drop me an email!