<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vpn &#8211; RSNET.PL</title>
	<atom:link href="https://kubsoo.github.io/rsnet-website/tag/vpn/feed/" rel="self" type="application/rss+xml" />
	<link>https://kubsoo.github.io/rsnet-website/</link>
	<description>wszystko o sieciach komputerowych</description>
	<lastBuildDate>Sat, 22 Feb 2020 11:40:47 +0000</lastBuildDate>
	<language>pl-PL</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.8</generator>
	<item>
		<title>IPSec S2S VPN Palo Alto &#8211; Cisco</title>
		<link>https://kubsoo.github.io/rsnet-website/ipsec-s2s-vpn-palo-alto-cisco/</link>
		<comments>https://kubsoo.github.io/rsnet-website/ipsec-s2s-vpn-palo-alto-cisco/#respond</comments>
		<pubDate>Thu, 14 Dec 2017 20:08:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Poradnik]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[palo alto]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">https://kubsoo.github.io/rsnet-website/?p=851</guid>
		<description><![CDATA[W poniższym wpisie pokażę konfigurację tunelu IPSEC VPN pomiędzy firewallem Palo Alto a routerem CISCO. Konfigurację wykonam w labie GNS3, w którym wykorzystam następujące obrazy: CISCO CSR1000v3.17 &#8211; obraz routera&#46;&#46;&#46;]]></description>
				<content:encoded><![CDATA[		<div class="elementor elementor-851">
			<div class="elementor-inner">
				<div class="elementor-section-wrap">
							<section data-id="31f508f" class="elementor-element elementor-element-31f508f elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="2e28f4f" class="elementor-element elementor-element-2e28f4f elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="23af124" class="elementor-element elementor-element-23af124 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #000000;">W poniższym wpisie pokażę konfigurację tunelu IPSEC VPN pomiędzy firewallem Palo Alto a routerem CISCO. Konfigurację wykonam w labie <a href="https://kubsoo.github.io/rsnet-website/tag/gns3/" title="">GNS3</a>, w którym wykorzystam następujące obrazy:</span></p><ol><li><span style="color: #000000;">CISCO CSR1000v3.17 &#8211; obraz routera CISCO</span></li><li><span style="color: #000000;">PA-VM7.1.1.0-1 &#8211; obraz firewalla Palo Alto w wersji 7.1.1.0-1</span></li><li><span style="color: #000000;">gns3-webterm &#8211; kontener dockera do zarządzania firewallem</span></li></ol></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="cedeb58" class="elementor-element elementor-element-cedeb58 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="d030fcd" class="elementor-element elementor-element-d030fcd elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="a150116" class="elementor-element elementor-element-a150116 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #000000;">LAB</span></h5><p><span style="color: #000000;">Topologia laba GNS3 wygląda nastepująco:</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="9757d5f" class="elementor-element elementor-element-9757d5f elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="f704425" class="elementor-element elementor-element-f704425 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="19f6e29" class="elementor-element elementor-element-19f6e29 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/topology_1.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title="">
							<img width="545" height="408" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/topology_1.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/topology_1.png 545w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/topology_1-300x225.png 300w" sizes="(max-width: 545px) 100vw, 545px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="469fb17" class="elementor-element elementor-element-469fb17 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="34ab586" class="elementor-element elementor-element-34ab586 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="c159dec" class="elementor-element elementor-element-c159dec elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #000000;">Adresacja</span></h5><p><span style="color: #000000;"><strong>Cisco</strong> </span></p><p><span style="color: #000000;">Gi1 &#8211; 150.1.1.1/30</span></p><p><span style="color: #000000;">Tunnel1 &#8211; 10.0.0.1/24</span></p><p><span style="color: #000000;"><strong>Palo Alto</strong> </span></p><p><span style="color: #000000;">ethernet1/1 &#8211; 150.1.1.2/30</span></p><p><span style="color: #000000;">tunnel.1 &#8211; 10.0.0.2/24</span></p><h5> </h5><h5><span style="color: #000000;">Konfiguracja CISCO</span></h5><p><span style="color: #000000;">INTERFACES</span></p><pre><span style="color: #000000;">Router(config)#interface Gi1</span><br /><span style="color: #000000;">Router(config-if)#ip address 150.1.1.1 255.255.255.252</span><br /><span style="color: #000000;">Router(config)#interface Tunnel1</span><br /><span style="color: #000000;">Router(config-if)#ip address 10.0.0.1 255.255.255.0<br />Router(config-if)#tunnel source 150.1.1.1</span><br /><span style="color: #000000;">Router(config-if)#tunnel destination 150.1.1.2</span></pre><p><span style="color: #000000;">ISAKMP POLICY</span></p><pre><span style="color: #000000;">Router(config)#crypto isakmp policy 10</span><br /><span style="color: #000000;">Router(config-isakmp)#hash sha256</span><br /><span style="color: #000000;">Router(config-isakmp)#authentication pre-share</span><br /><span style="color: #000000;">Router(config-isakmp)#group 14</span><br /><span style="color: #000000;">Router(config-isakmp)#lifetime 86400</span><br /><span style="color: #000000;">Router(config-isakmp)#encryption aes 256</span></pre><p><span style="color: #000000;">KLUCZ SZYFRUJĄCY</span></p><pre><span style="color: #000000;">Router(config)#crypto isakmp key 0 palo_to_cisco! address 150.1.1.2</span></pre><p><span style="color: #000000;">IP TRANSFORM SET</span></p><pre><span style="color: #000000;">Router(config)#crypto ipsec transform-set TSET esp-sha512-hmac esp-aes 256</span></pre><p><span style="color: #000000;">IPSEC PROFILE</span></p><pre><span style="color: #000000;">Router(config)#crypto ipsec profile IPSEC-PROFILE</span><br /><span style="color: #000000;">Router(ipsec-profile)#set transform-set TSET</span><br /><span style="color: #000000;">Router(ipsec-profile)#set pfs group14</span><br /><span style="color: #000000;">Router(ipsec-profile)#set security-association lifetime seconds 3600</span></pre><p><span style="color: #000000;">IPSEC TUNNEL</span></p><pre><span style="color: #000000;">Router(config-if)#tunnel mode ipsec ipv4</span><br /><span style="color: #000000;">Router(config-if)#tunnel protection ipsec profile IPSEC-PROFILE</span></pre><h5> </h5><h5><span style="color: #000000;">Cała konfiguracja CISCO</span></h5><pre><span style="color: #000000;">crypto isakmp policy 10</span><br /><span style="color: #000000;"> hash sha256</span><br /><span style="color: #000000;"> authentication pre-share</span><br /><span style="color: #000000;"> group 14</span><br /><span style="color: #000000;"> lifetime 86400</span><br /><span style="color: #000000;"> encryption aes 256</span><br /><span style="color: #000000;">!</span><br /><span style="color: #000000;">crypto isakmp key 0 palo_to_cisco! address 150.1.1.2</span><br /><span style="color: #000000;">!</span><br /><span style="color: #000000;">crypto ipsec transform-set TSET esp-sha512-hmac esp-aes 256</span><br /><span style="color: #000000;">!</span><br /><span style="color: #000000;">crypto ipsec profile IPSEC-PROFILE</span><br /><span style="color: #000000;"> set transform-set TSET</span><br /><span style="color: #000000;"> set pfs group14</span><br /><span style="color: #000000;"> set security-association lifetime seconds 3600</span><br /><span style="color: #000000;">!</span><br /><span style="color: #000000;">interface Gi1</span><br /><span style="color: #000000;"> ip address 150.1.1.1 255.255.255.252</span><br /><span style="color: #000000;">!</span><br /><span style="color: #000000;">interface Tunnel1</span><br /><span style="color: #000000;"> ip address 10.0.0.1 255.255.255.0 <br /> tunnel source 150.1.1.1</span><br /><span style="color: #000000;"> tunnel destination 150.1.1.2</span><br /><span style="color: #000000;"> tunnel mode ipsec ipv4</span><br /><span style="color: #000000;"> tunnel protection ipsec profile IPSEC-PROFILE​</span><br /><span style="color: #000000;">!</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="6994149" class="elementor-element elementor-element-6994149 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="cf4ce67" class="elementor-element elementor-element-cf4ce67 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="2d60a4a" class="elementor-element elementor-element-2d60a4a elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #000000;">Konfiguracja PALO ALTO</span></h5><p><span style="color: #000000;">INTERFACE MANAGEMENT PROFILE</span></p><p><span style="color: #000000;">Network -&gt; Network Profiles -&gt; Interface Mgmt</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="bb026d6" class="elementor-element elementor-element-bb026d6 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="dc6c89a" class="elementor-element elementor-element-dc6c89a elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="e561c9d" class="elementor-element elementor-element-e561c9d elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/mgmt_profile.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="486" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/mgmt_profile.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/mgmt_profile.png 809w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/mgmt_profile-300x202.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/mgmt_profile-768x518.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="16794cc" class="elementor-element elementor-element-16794cc elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="9bfc6dc" class="elementor-element elementor-element-9bfc6dc elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="3918199" class="elementor-element elementor-element-3918199 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">INTERFACES</span></p><p><span style="color: #000000;">Network -&gt; Interfaces -&gt; ethernet1/1</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="7d46ae9" class="elementor-element elementor-element-7d46ae9 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="45a03c4" class="elementor-element elementor-element-45a03c4 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="d7dc5f2" class="elementor-element elementor-element-d7dc5f2 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="385" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1.png 874w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1-300x160.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1-768x410.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="ed2292a" class="elementor-element elementor-element-ed2292a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="b8e494e" class="elementor-element elementor-element-b8e494e elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="e4192e8" class="elementor-element elementor-element-e4192e8 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_2.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-3" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="466" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_2.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_2.png 863w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_2-300x194.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_2-768x497.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="8f5c2a2" class="elementor-element elementor-element-8f5c2a2 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="687bbe8" class="elementor-element elementor-element-687bbe8 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="2cc3644" class="elementor-element elementor-element-2cc3644 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_3.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-4" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="522" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_3.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_3.png 862w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_3-300x218.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/int_eth1_3-768x557.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="00af2be" class="elementor-element elementor-element-00af2be elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="b01077f" class="elementor-element elementor-element-b01077f elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="024cc1e" class="elementor-element elementor-element-024cc1e elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p><span style="color: #000000;">Network -&gt; Interfaces -&gt; tunnel.1</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="340a9cc" class="elementor-element elementor-element-340a9cc elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="1da691d" class="elementor-element elementor-element-1da691d elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="c94e1c6" class="elementor-element elementor-element-c94e1c6 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_1.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-5" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="419" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_1.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_1.png 806w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_1-300x175.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_1-768x447.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="dd5918a" class="elementor-element elementor-element-dd5918a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="2b2de55" class="elementor-element elementor-element-2b2de55 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="e9ae76a" class="elementor-element elementor-element-e9ae76a elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_2.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-6" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="478" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_2.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_2.png 811w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_2-300x199.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_2-768x509.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="91c4804" class="elementor-element elementor-element-91c4804 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="95253f8" class="elementor-element elementor-element-95253f8 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="5c97a74" class="elementor-element elementor-element-5c97a74 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_3.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-7" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="416" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_3.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_3.png 809w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_3-300x173.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/tunnel_3-768x443.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="950f3ec" class="elementor-element elementor-element-950f3ec elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="7aff087" class="elementor-element elementor-element-7aff087 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="84caea1" class="elementor-element elementor-element-84caea1 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">IKE CRYPTO PROFILE</span></p><p><span style="color: #000000;">Network -&gt; Network Profiles -&gt; IKE Crypto</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="085fd5f" class="elementor-element elementor-element-085fd5f elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="92edec1" class="elementor-element elementor-element-92edec1 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="ababb15" class="elementor-element elementor-element-ababb15 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ike_policy.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-8" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="349" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ike_policy.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ike_policy.png 994w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ike_policy-300x145.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ike_policy-768x372.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="6d40d43" class="elementor-element elementor-element-6d40d43 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="595be58" class="elementor-element elementor-element-595be58 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="525ebba" class="elementor-element elementor-element-525ebba elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">IKE GATEWAY</span></p><p><span style="color: #000000;">Network -&gt; Network Profiles -&gt; IKE Gateways</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="b483a47" class="elementor-element elementor-element-b483a47 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="9198792" class="elementor-element elementor-element-9198792 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="07e8413" class="elementor-element elementor-element-07e8413 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-9" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="501" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway.png 810w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway-300x209.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway-768x535.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="974078c" class="elementor-element elementor-element-974078c elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="dc2f999" class="elementor-element elementor-element-dc2f999 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="90e3e5d" class="elementor-element elementor-element-90e3e5d elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway_2.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-10" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="537" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway_2.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway_2.png 815w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway_2-300x224.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/isakmp_gateway_2-768x573.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="1e5889a" class="elementor-element elementor-element-1e5889a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="6ddafd6" class="elementor-element elementor-element-6ddafd6 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="a5068cc" class="elementor-element elementor-element-a5068cc elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">IPSEC CRYPTO</span></p><p><span style="color: #000000;">Network -&gt; Network Profiles -&gt; IPSec Crypto</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="ff2f8b5" class="elementor-element elementor-element-ff2f8b5 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="1ab1c29" class="elementor-element elementor-element-1ab1c29 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="55d91b5" class="elementor-element elementor-element-55d91b5 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_crypto.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-11" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="418" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_crypto.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_crypto.png 911w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_crypto-300x174.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_crypto-768x446.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="cde951f" class="elementor-element elementor-element-cde951f elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="91856d8" class="elementor-element elementor-element-91856d8 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="a3f0923" class="elementor-element elementor-element-a3f0923 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">IPSEC TUNNEL</span></p><p><span style="color: #000000;">Network -&gt; IPSec Tunnels</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="9cb7948" class="elementor-element elementor-element-9cb7948 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="8f6fed0" class="elementor-element elementor-element-8f6fed0 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="37cd5b8" class="elementor-element elementor-element-37cd5b8 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_tunnel.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-12" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="344" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_tunnel.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_tunnel.png 862w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_tunnel-300x143.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_tunnel-768x367.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="838d817" class="elementor-element elementor-element-838d817 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="0f004ea" class="elementor-element elementor-element-0f004ea elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="5802aa4" class="elementor-element elementor-element-5802aa4 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p> </p><p><span style="color: #000000;">COMMIT</span></p><p><span style="color: #000000;">Teraz wystarczy zrobić <strong>commit</strong>.</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="ce46ae9" class="elementor-element elementor-element-ce46ae9 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="e4cbf82" class="elementor-element elementor-element-e4cbf82 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="6756b5a" class="elementor-element elementor-element-6756b5a elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5> </h5><h5> </h5><h5><span style="color: #000000;">WERYFIKACJA</span></h5><p style="text-align: justify;"><span style="color: #000000;">Sprawdźmy czy tunel się zestawił. Spróbujmy na routerze CISCO spingować adres tunelu na Palo Alto:</span></p><pre style="text-align: justify;"><span style="color: #000000;">Router#ping 10.0.0.2<br />Type escape sequence to abort.<br />Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:<br />!!!!!<br />Success rate is 100 percent (5/5), round-trip min/avg/max = 2/8/29 ms<br /></span></pre><p style="text-align: justify;"><span style="color: #000000;">Udało się, teraz sprawdźmy teraz jak wyglądają wyniki następujących komend:</span></p><ol><li><span style="color: #000000;">show crypto isakmp sa   (faza 1 &#8211; IKE SA)</span></li><li><span style="color: #000000;">show crypto ipsec sa -(faza 2 &#8211; IPSEC SA)</span></li></ol><pre><span style="color: #000000;">Router#show crypto isakmp sa</span><br /><span style="color: #000000;">IPv4 Crypto ISAKMP SA</span><br /><span style="color: #000000;">dst src state conn-id status</span><br /><span style="color: #000000;">150.1.1.2 150.1.1.1 <strong>QM_IDLE</strong> 1001 ACTIVE</span></pre><pre><span style="color: #000000;">Router#show crypto ipsec sa</span><br /><span style="color: #000000;">interface: Tunnel1</span><br /><span style="color: #000000;"> Crypto map tag: Tunnel1-head-0, local addr 150.1.1.1</span><br /><br /><span style="color: #000000;">protected vrf: (none)</span><br /><span style="color: #000000;"> local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)</span><br /><span style="color: #000000;"> remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)</span><br /><span style="color: #000000;"> current_peer 150.1.1.2 port 500</span><br /><span style="color: #000000;"> PERMIT, flags={origin_is_acl,}</span><br /><strong><span style="color: #000000;"> #pkts encaps: 5, #pkts encrypt: 5, #pkts digest: 5</span></strong><br /><strong><span style="color: #000000;"> #pkts decaps: 5, #pkts decrypt: 5, #pkts verify: 5</span></strong><br /><span style="color: #000000;"> #pkts compressed: 0, #pkts decompressed: 0</span><br /><span style="color: #000000;"> #pkts not compressed: 0, #pkts compr. failed: 0</span><br /><span style="color: #000000;"> #pkts not decompressed: 0, #pkts decompress failed: 0</span><br /><span style="color: #000000;"> #send errors 0, #recv errors 0</span><br /><br /><span style="color: #000000;">local crypto endpt.: 150.1.1.1, remote crypto endpt.: 150.1.1.2</span><br /><span style="color: #000000;"> plaintext mtu 1422, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet1</span><br /><span style="color: #000000;"> current outbound spi: 0xA402847E(2751628414)</span><br /><span style="color: #000000;"> PFS (Y/N): Y, DH group: group14</span><br /><br /><span style="color: #000000;">inbound esp sas:</span><br /><span style="color: #000000;"> spi: 0x1AB4F9C2(448068034)</span><br /><span style="color: #000000;"> transform: esp-256-aes esp-sha512-hmac ,</span><br /><span style="color: #000000;"> in use settings ={Tunnel, }</span><br /><span style="color: #000000;"> conn id: 2003, flow_id: CSR:3, sibling_flags FFFFFFFF80004048, crypto map: Tunnel1-head-0</span><br /><span style="color: #000000;"> sa timing: remaining key lifetime (k/sec): (4607999/3143)</span><br /><span style="color: #000000;"> IV size: 16 bytes</span><br /><span style="color: #000000;"> replay detection support: Y</span><br /><span style="color: #000000;"> Status: ACTIVE(ACTIVE)</span><br /><br /><span style="color: #000000;">inbound ah sas:</span><br /><br /><span style="color: #000000;">inbound pcp sas:</span><br /><br /><span style="color: #000000;">outbound esp sas:</span><br /><span style="color: #000000;"> spi: 0xA402847E(2751628414)</span><br /><span style="color: #000000;"> transform: esp-256-aes esp-sha512-hmac ,</span><br /><span style="color: #000000;"> in use settings ={Tunnel, }</span><br /><span style="color: #000000;"> conn id: 2004, flow_id: CSR:4, sibling_flags FFFFFFFF80004048, crypto map: Tunnel1-head-0</span><br /><span style="color: #000000;"> sa timing: remaining key lifetime (k/sec): (4607999/3143)</span><br /><span style="color: #000000;"> IV size: 16 bytes</span><br /><span style="color: #000000;"> replay detection support: Y</span><br /><span style="color: #000000;"> Status: ACTIVE(ACTIVE)</span><br /><br /><span style="color: #000000;">outbound ah sas:</span><br /><br /><span style="color: #000000;">outbound pcp sas:</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="bbf9abb" class="elementor-element elementor-element-bbf9abb elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="397ef8d" class="elementor-element elementor-element-397ef8d elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="6dd76e1" class="elementor-element elementor-element-6dd76e1 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #000000;">Jak widać od strony CISCO wszystko działa, sprawdźmy teraz jak wygląda tunel IPSEC od strony firewalla Palo Alto. </span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="0cb58f0" class="elementor-element elementor-element-0cb58f0 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="f942b94" class="elementor-element elementor-element-f942b94 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="5c0ff03" class="elementor-element elementor-element-5c0ff03 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p><span style="color: #000000;">Najpierw spingujmy adres tunelu na CISCO:</span></p><pre><span style="color: #000000;">admin@PA-VM&gt; ping source 10.0.0.2 host 10.0.0.1</span><br /><span style="color: #000000;">PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 : 56(84) bytes of data.</span><br /><span style="color: #000000;">64 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=1.91 ms</span><br /><span style="color: #000000;">64 bytes from 10.0.0.1: icmp_seq=2 ttl=255 time=1.81 ms</span><br /><span style="color: #000000;">64 bytes from 10.0.0.1: icmp_seq=3 ttl=255 time=2.16 ms</span><br /><span style="color: #000000;">64 bytes from 10.0.0.1: icmp_seq=4 ttl=255 time=2.50 ms</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="a3b72bc" class="elementor-element elementor-element-a3b72bc elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="c7b3cd9" class="elementor-element elementor-element-c7b3cd9 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="825df01" class="elementor-element elementor-element-825df01 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #000000;">Teraz sprawdźmy status intefejsu. Robimy to w interfejsie webowym w zakładce Network -&gt; IPSec Tunnels</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="340dc72" class="elementor-element elementor-element-340dc72 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="dd7e0c3" class="elementor-element elementor-element-dd7e0c3 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="48faaf8" class="elementor-element elementor-element-48faaf8 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_1.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-13" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="171" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_1.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_1.png 1004w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_1-300x71.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_1-768x182.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="45a6cd9" class="elementor-element elementor-element-45a6cd9 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="f4d7a56" class="elementor-element elementor-element-f4d7a56 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="e4e6c01" class="elementor-element elementor-element-e4e6c01 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_2.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-14" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="374" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_2.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_2.png 977w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_2-300x156.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_info_2-768x399.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="2c8067a" class="elementor-element elementor-element-2c8067a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="3ba7df7" class="elementor-element elementor-element-3ba7df7 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="0d27c9e" class="elementor-element elementor-element-0d27c9e elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p><span style="color: #000000;">Jeśli w polach Status widnieją zielone kropki to znaczy, że tunel zestawił się poprawnie.</span></p><p> </p><h5><span style="color: #000000;">PODSUMOWANIE</span></h5><p style="text-align: justify;"><span style="color: #000000;">Tunel IPSEC między urządzeniami CISCO i PALO ALTO jest bardzo łatwy w konfiguracji i mam nadzieję, że po przeczytaniu powyższego wpisu nie powinien sprawić nikomu kłopotu.</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
						</div>
			</div>
		</div>
		]]></content:encoded>
			<wfw:commentRss>https://kubsoo.github.io/rsnet-website/ipsec-s2s-vpn-palo-alto-cisco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CISCO IPSEC VPN &#8211; konfiguracja</title>
		<link>https://kubsoo.github.io/rsnet-website/cisco-ipsec-vpn-konfiguracja/</link>
		<pubDate>Sat, 02 Dec 2017 13:20:57 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Poradnik]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[ikev1]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">https://kubsoo.github.io/rsnet-website/?p=422</guid>
		<description><![CDATA[Jak skonfigurować tunel IPSEC VPN pomiędzy dwoma routerami CISCO? Tunel IPSEC VPN pomiędzy dwoma routerami CISCO konfigurujemy w następujących krokach: Globalne uruchomienie usługi Konfiguracja ISAKMP Policy Konfiguracja kluczy szyfrujących Konfiguracja&#46;&#46;&#46;]]></description>
				<content:encoded><![CDATA[		<div class="elementor elementor-422">
			<div class="elementor-inner">
				<div class="elementor-section-wrap">
							<section data-id="b1b02fb" class="elementor-element elementor-element-b1b02fb elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="28e54cb" class="elementor-element elementor-element-28e54cb elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="efb69eb" class="elementor-element elementor-element-efb69eb elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #333333;">Jak skonfigurować tunel IPSEC VPN pomiędzy dwoma routerami CISCO?</span></p><p style="text-align: justify;"><span style="color: #333333;">Tunel IPSEC VPN pomiędzy dwoma routerami CISCO konfigurujemy w następujących krokach:</span></p><ol><li style="text-align: justify;"><span style="color: #333333;">Globalne uruchomienie usługi</span></li><li style="text-align: justify;"><span style="color: #333333;">Konfiguracja ISAKMP Policy</span></li><li style="text-align: justify;"><span style="color: #333333;">Konfiguracja kluczy szyfrujących</span></li><li style="text-align: justify;"><span style="color: #333333;">Konfiguracja IP transform set</span></li><li style="text-align: justify;"><span style="color: #333333;">Stworzenie ACL wskazującej na ruch, który chcemy szyfrować</span></li><li style="text-align: justify;"><span style="color: #333333;">Stworzenie crypto-mapy i wskazanie IP transform set</span></li><li style="text-align: justify;"><span style="color: #333333;">Podpięcie crypto-mapy do interfejsu podpiętego do internetu.</span></li></ol></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="d1e3db9" class="elementor-element elementor-element-d1e3db9 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="daf9c3c" class="elementor-element elementor-element-daf9c3c elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="51b6f86" class="elementor-element elementor-element-51b6f86 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5>PRZYKŁAD</h5><div style="text-align: justify;"><span style="color: #333333;">Tunel IPSEC VPN zestawimy pomiędzy routerami R1 i R3 z poniższej topologii:</span></div></div>
				</div>
				</div>
				<div data-id="f8aeda3" class="elementor-element elementor-element-f8aeda3 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec1.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title="">
							<img width="478" height="218" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec1.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec1.png 478w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec1-300x137.png 300w" sizes="(max-width: 478px) 100vw, 478px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="3fa8a58" class="elementor-element elementor-element-3fa8a58 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="462f9d3" class="elementor-element elementor-element-462f9d3 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="50a5876" class="elementor-element elementor-element-50a5876 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #333333;">Konfiguracja podstawowa: </span></h5><pre><span style="color: #333333;">hostname R1</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface Loopback0</span><br /><span style="color: #333333;">ip address 1.1.1.1 255.255.255.255</span><br /><span style="color: #333333;">ip nat inside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface FastEthernet0/0</span><br /><span style="color: #333333;">ip address 192.168.12.1 255.255.255.0</span><br /><span style="color: #333333;">ip nat outside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip nat inside source list 100 interface FastEthernet0/0 overload</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip route 0.0.0.0 0.0.0.0 192.168.12.2</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">access-list 100 deny ip host 1.1.1.1 host 3.3.3.3</span><br /><span style="color: #333333;">access-list 100 permit ip host 1.1.1.1 any</span></pre><div><pre><span style="color: #333333;">hostname R3</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface Loopback0</span><br /><span style="color: #333333;">ip address 3.3.3.3 255.255.255.255</span><br /><span style="color: #333333;">ip nat inside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface FastEthernet0/0</span><br /><span style="color: #333333;">ip address 192.168.23.3 255.255.255.0</span><br /><span style="color: #333333;">ip nat outside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip nat inside source list 100 interface FastEthernet0/0 overload</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip route 0.0.0.0 0.0.0.0 192.168.23.2</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">access-list 100 deny ip host 3.3.3.3 host 1.1.1.1</span><br /><span style="color: #333333;">access-list 100 permit ip host 3.3.3.3 any</span></pre></div></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="07fb301" class="elementor-element elementor-element-07fb301 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="c7196f9" class="elementor-element elementor-element-c7196f9 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="5b0766e" class="elementor-element elementor-element-5b0766e elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h4><strong>KONFIGURACJA IPSEC VPN</strong></h4><p> </p><h5><span style="color: #333333;">1. Globalne uruchomienie usługi</span></h5><pre><span style="color: #333333;">R1(config)#crypto isakmp enable</span><br /><br /><span style="color: #333333;">R3(config)#crypto isakmp enable</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="8fffee0" class="elementor-element elementor-element-8fffee0 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="0f71aa4" class="elementor-element elementor-element-0f71aa4 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="fdc4270" class="elementor-element elementor-element-fdc4270 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #333333;">2. Konfiguracja ISAKMP Policy</span></h5><pre><span style="color: #333333;">R1(config)#crypto isakmp </span><br /><span style="color: #333333;">R1(config)#policy 10</span><br /><span style="color: #333333;">R1(config)#encr 3des</span><br /><span style="color: #333333;">R1(config)#hash md5</span><br /><span style="color: #333333;">R1(config)#authentication </span><br /><span style="color: #333333;">R1(config)#pre-share</span><br /><span style="color: #333333;">R1(config)#group 15</span><br /><br /><span style="color: #333333;">R3(config)#crypto isakmp </span><br /><span style="color: #333333;">R3(config)#policy 10</span><br /><span style="color: #333333;">R3(config)#encr 3des</span><br /><span style="color: #333333;">R3(config)#hash md5</span><br /><span style="color: #333333;">R3(config)#authentication </span><br /><span style="color: #333333;">R3(config)#pre-share</span><br /><span style="color: #333333;">R3(config)#group 15</span></pre><p style="text-align: justify;"><span style="color: #333333;">Na obu routerach ISAKMP policy musi być taka sama  w celu zestwienia fazy 1 ISAKMP.</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="b785cc4" class="elementor-element elementor-element-b785cc4 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="eb21dfc" class="elementor-element elementor-element-eb21dfc elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="7527744" class="elementor-element elementor-element-7527744 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #333333;">3. Konfiguracja kluczy szyfrujących</span></h5><pre><span style="color: #333333;">R1(config)#crypto isakmp key cisco123 address 192.168.23.3</span><br /><br /><span style="color: #333333;">R3(config)#crypto isakmp key cisco123 address 192.168.12.1</span></pre><p style="text-align: justify;"><span style="color: #333333;">W kluczach szyfrujących podajemy adres IP peer&#8217;a, z którym chcemy nawiązać tunel IPSEC VPN.</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="47889a1" class="elementor-element elementor-element-47889a1 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="68ff672" class="elementor-element elementor-element-68ff672 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="3e76343" class="elementor-element elementor-element-3e76343 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #333333;">4. Konfiguracja IP transform set</span></h5><pre><span style="color: #333333;">R1(config)#crypto ipsec transform-set TSET esp-aes esp-sha-hmac</span><br /><span style="color: #333333;">R1(cfg-crypto-trans)#mode tunnel</span><br /><br /><span style="color: #333333;">R3(config)#crypto ipsec transform-set TSET esp-aes esp-sha-hmac</span><br /><span style="color: #333333;">R3(cfg-crypto-trans)#mode tunnel</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="b32108d" class="elementor-element elementor-element-b32108d elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="0f6cd58" class="elementor-element elementor-element-0f6cd58 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="23df267" class="elementor-element elementor-element-23df267 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5><span style="color: #333333;">5. Stworzenie ACL wskazującej na ruch, który chcemy szyfrować</span></h5><pre><span style="color: #333333;">R1(config)#access-list 101 permit ip host 3.3.3.3 host 1.1.1.1</span><br /><br /><span style="color: #333333;">R3(config)#access-list 101 permit ip host 3.3.3.3 host 1.1.1.1</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="cf1966a" class="elementor-element elementor-element-cf1966a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="81b3f44" class="elementor-element elementor-element-81b3f44 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="ddb2665" class="elementor-element elementor-element-ddb2665 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5 style="text-align: justify;"><span style="color: #333333;">6. Stworzenie crypto-mapy i wskazanie IP transform set</span></h5><pre><span style="color: #333333;">R1(config)#crypto map CMAP 10 ipsec-isakmp</span><br /><span style="color: #333333;">% NOTE: This new crypto map will remain disabled until a peer</span><br /><span style="color: #333333;"> and a valid access list have been configured.</span><br /><span style="color: #333333;">R1(config-crypto-map)#set peer 192.168.23.3</span><br /><span style="color: #333333;">R1(config-crypto-map)#set transform-set TSET</span><br /><span style="color: #333333;">R1(config-crypto-map)#match address 101</span><br /><br /><span style="color: #333333;">R3(config)#crypto map CMAP 10 ipsec-isakmp</span><br /><span style="color: #333333;">% NOTE: This new crypto map will remain disabled until a peer</span><br /><span style="color: #333333;"> and a valid access list have been configured.</span><br /><span style="color: #333333;">R3(config-crypto-map)#set peer 192.168.12.1</span><br /><span style="color: #333333;">R3(config-crypto-map)#set transform-set TSET</span><br /><span style="color: #333333;">R3(config-crypto-map)#match address 101</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="0fdc430" class="elementor-element elementor-element-0fdc430 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="c98401c" class="elementor-element elementor-element-c98401c elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="6dc4059" class="elementor-element elementor-element-6dc4059 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h5 style="text-align: justify;"><span style="color: #333333;">7. Podpięcie crypto-mapy do interfejsu podpiętego do internetu.</span></h5><pre><span style="color: #333333;">R1(config)#int fastEthernet 0/0</span><br /><span style="color: #333333;">R1(config-if)#crypto map CMAP</span><br /><br /><span style="color: #333333;">R3(config)#int fastEthernet 0/0</span><br /><span style="color: #333333;">R3(config-if)#crypto map CMAP</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="abe1600" class="elementor-element elementor-element-abe1600 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="4ce8b5e" class="elementor-element elementor-element-4ce8b5e elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="3932a93" class="elementor-element elementor-element-3932a93 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><h4><span style="color: #333333;"><strong>PODSUMOWANIE</strong></span></h4><p><span style="color: #333333;">Cała konfiguracja wygląda następująco:</span></p><p><span style="color: #333333;"><strong>R1</strong></span></p><pre><span style="color: #333333;">R1#show run</span><br />!<br /><span style="color: #333333;">hostname R1</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">crypto isakmp policy 10</span><br /><span style="color: #333333;"> encr 3des</span><br /><span style="color: #333333;"> hash md5</span><br /><span style="color: #333333;"> authentication pre-share</span><br /><span style="color: #333333;"> group 15</span><br /><span style="color: #333333;">crypto isakmp key cisco123 address 192.168.23.3</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">crypto ipsec transform-set TSET esp-aes esp-sha-hmac</span><br /><span style="color: #333333;"> mode tunnel</span><br />!<br /><span style="color: #333333;">crypto map CMAP 10 ipsec-isakmp</span><br /><span style="color: #333333;"> set peer 192.168.23.3</span><br /><span style="color: #333333;"> set transform-set TSET</span><br /><span style="color: #333333;"> match address 101</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface Loopback0</span><br /><span style="color: #333333;"> ip address 1.1.1.1 255.255.255.255</span><br /><span style="color: #333333;"> ip nat inside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface FastEthernet0/0</span><br /><span style="color: #333333;"> ip address 192.168.12.1 255.255.255.0</span><br /><span style="color: #333333;"> ip nat outside</span><br /><span style="color: #333333;"> duplex full</span><br /><span style="color: #333333;"> crypto map CMAP</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip nat inside source list 100 interface FastEthernet0/0 overload</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip route 0.0.0.0 0.0.0.0 192.168.12.2</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">access-list 100 deny ip host 1.1.1.1 host 3.3.3.3</span><br /><span style="color: #333333;">access-list 100 permit ip host 1.1.1.1 any</span><br /><span style="color: #333333;">access-list 101 permit ip host 1.1.1.1 host 3.3.3.3</span><br /><span style="color: #333333;">!</span></pre><p><span style="color: #333333;"><strong>R3</strong></span></p><pre><span style="color: #333333;">R3#show run</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">hostname R3</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">crypto isakmp policy 10</span><br /><span style="color: #333333;"> encr 3des</span><br /><span style="color: #333333;"> hash md5</span><br /><span style="color: #333333;"> authentication pre-share</span><br /><span style="color: #333333;"> group 15</span><br /><span style="color: #333333;">crypto isakmp key cisco123 address 192.168.12.1</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">crypto ipsec transform-set TSET esp-aes esp-sha-hmac</span><br /><span style="color: #333333;"> mode tunnel</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">crypto map CMAP 10 ipsec-isakmp</span><br /><span style="color: #333333;"> set peer 192.168.12.1</span><br /><span style="color: #333333;"> set transform-set TSET</span><br /><span style="color: #333333;"> match address 101</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface Loopback0</span><br /><span style="color: #333333;"> ip address 3.3.3.3 255.255.255.255</span><br /><span style="color: #333333;"> ip nat inside</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">interface FastEthernet0/0</span><br /><span style="color: #333333;"> ip address 192.168.23.3 255.255.255.0</span><br /><span style="color: #333333;"> ip nat outside</span><br /><span style="color: #333333;"> duplex full</span><br /><span style="color: #333333;"> crypto map CMAP</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">ip nat inside source list 100 interface FastEthernet0/0 overload</span><br />!<br /><span style="color: #333333;">ip route 0.0.0.0 0.0.0.0 192.168.23.2</span><br /><span style="color: #333333;">!</span><br /><span style="color: #333333;">access-list 100 deny ip host 3.3.3.3 host 1.1.1.1</span><br /><span style="color: #333333;">access-list 100 permit ip host 3.3.3.3 any</span><br /><span style="color: #333333;">access-list 101 permit ip host 3.3.3.3 host 1.1.1.1</span><br /><span style="color: #333333;">!</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="1069507" class="elementor-element elementor-element-1069507 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="5e2c9b5" class="elementor-element elementor-element-5e2c9b5 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="eeedc85" class="elementor-element elementor-element-eeedc85 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #333333;">Tunel IPSEC VPN zestawi się tylko wtedy kiedy router zobaczy na ruch który pasuje do ACL 101 w crypto-mapie. Spróbujmy więc wydać komendę ping ip 3.3.3.3 source 1.1.1.1 na routerze R1:</span></p><pre><span style="color: #333333;">R1#ping ip 3.3.3.3 source 1.1.1.1</span><br /><span style="color: #333333;">Type escape sequence to abort.</span><br /><span style="color: #333333;">Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:</span><br /><span style="color: #333333;">Packet sent with a source address of 1.1.1.1</span><br /><span style="color: #333333;">.!!!!</span><br /><span style="color: #333333;">Success rate is 80 percent (4/5), round-trip min/avg/max = 28/32/44 ms</span></pre><p style="text-align: justify;"><span style="color: #333333;">Łączność jest, czyli tunel się zestawił. Sprawdźmy to wydając nastepujące komendy:</span></p><ul><li><span style="color: #333333;">show crypto isakmp sa</span></li><li><span style="color: #333333;">show crypto ipsec sa</span></li></ul><pre><span style="color: #333333;">R1#show crypto isakmp sa</span><br /><span style="color: #333333;">IPv4 Crypto ISAKMP SA</span><br /><span style="color: #333333;">dst src state conn-id status</span><br /><strong><span style="color: #333333;">192.168.23.3 192.168.12.1 QM_IDLE 1001 ACTIVE</span></strong></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="375682a" class="elementor-element elementor-element-375682a elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="dbcea67" class="elementor-element elementor-element-dbcea67 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="5b02e97" class="elementor-element elementor-element-5b02e97 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><pre><span style="color: #333333;">R1#show crypto ipsec sa</span><br /><span style="color: #333333;">interface: FastEthernet0/0</span><br /><span style="color: #333333;">    Crypto map tag: CMAP, local addr 192.168.12.1</span><br /><span style="color: #333333;">   <br />protected vrf: (none)</span><br /><span style="color: #333333;">   local  ident (addr/mask/prot/port): (1.1.1.1/255.255.255.255/0/0)</span><br /><span style="color: #333333;">   remote ident (addr/mask/prot/port): (3.3.3.3/255.255.255.255/0/0)</span><br /><span style="color: #333333;">   current_peer 192.168.23.3 port 500</span><br /><span style="color: #333333;">     PERMIT, flags={origin_is_acl,}</span><br /><span style="color: #333333;">    <strong>#pkts encaps: 3, #pkts encrypt: 3, #pkts digest: 3</strong></span><br /><strong><span style="color: #333333;">    #pkts decaps: 3, #pkts decrypt: 3, #pkts verify: 3</span></strong><br /><span style="color: #333333;">    #pkts compressed: 0, #pkts decompressed: 0</span><br /><span style="color: #333333;">    #pkts not compressed: 0, #pkts compr. failed: 0</span><br /><span style="color: #333333;">    #pkts not decompressed: 0, #pkts decompress failed: 0</span><br /><span style="color: #333333;">    #send errors 0, #recv errors 0</span><br /><span style="color: #333333;"><br />     local crypto endpt.: 192.168.12.1, remote crypto endpt.: 192.168.23.3</span><br /><span style="color: #333333;">     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0</span><br /><span style="color: #333333;">     current outbound spi: 0x34978E4A(882347594)</span><br /><span style="color: #333333;">     PFS (Y/N): N, DH group: none</span><br /><br /><span style="color: #333333;">     inbound esp sas:</span><br /><span style="color: #333333;">      spi: 0x6DB519C5(1840585157)</span><br /><span style="color: #333333;">        transform: esp-aes esp-sha-hmac ,</span><br /><span style="color: #333333;">        in use settings ={Tunnel, }</span><br /><span style="color: #333333;">        conn id: 1, flow_id: 1, sibling_flags 80004040, crypto map: CMAP</span><br /><span style="color: #333333;">        sa timing: remaining key lifetime (k/sec): (4253546/3593)</span><br /><span style="color: #333333;">        IV size: 16 bytes</span><br /><span style="color: #333333;">        replay detection support: Y</span><br /><span style="color: #333333;">        Status: ACTIVE(ACTIVE)</span><br /><br /><span style="color: #333333;">     inbound ah sas:</span><br /><br /><span style="color: #333333;">     inbound pcp sas:</span><br /><span style="color: #333333;"><br />     outbound esp sas:</span><br /><span style="color: #333333;">      spi: 0x34978E4A(882347594)</span><br /><span style="color: #333333;">        transform: esp-aes esp-sha-hmac ,</span><br /><span style="color: #333333;">        in use settings ={Tunnel, }</span><br /><span style="color: #333333;">        conn id: 2, flow_id: 2, sibling_flags 80004040, crypto map: CMAP</span><br /><span style="color: #333333;">        sa timing: remaining key lifetime (k/sec): (4253546/3593)</span><br /><span style="color: #333333;">        IV size: 16 bytes</span><br /><span style="color: #333333;">        replay detection support: Y</span><br /><span style="color: #333333;">        Status: ACTIVE(ACTIVE)</span><br /><span style="color: #333333;"><br />     outbound ah sas:</span><br /><span style="color: #333333;"><br />     outbound pcp sas:</span></pre></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="191664c" class="elementor-element elementor-element-191664c elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="61cd9e4" class="elementor-element elementor-element-61cd9e4 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="eb77ae5" class="elementor-element elementor-element-eb77ae5 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p><span style="color: #333333;">Zobaczmy teraz co widać na interfejsie FastEthernet 0/0 routera R3 w trakcie pingu:</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="6198c71" class="elementor-element elementor-element-6198c71 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="b654f80" class="elementor-element elementor-element-b654f80 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="c9d0423" class="elementor-element elementor-element-c9d0423 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="252" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec.png 725w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/11/ipsec-300x105.png 300w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="50499e5" class="elementor-element elementor-element-50499e5 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="da64596" class="elementor-element elementor-element-da64596 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="d57bcc9" class="elementor-element elementor-element-d57bcc9 elementor-widget elementor-widget-image" data-element_type="image.default">
				<div class="elementor-widget-container">
					<div class="elementor-image">
											<a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_3.png" data-elementor-open-lightbox="no" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title="">
							<img width="720" height="416" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_3.png" class="attachment-large size-large" alt="" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_3.png 871w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_3-300x173.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/12/ipsec_3-768x444.png 768w" sizes="(max-width: 720px) 100vw, 720px" />								</a>
											</div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
				<section data-id="1af1d90" class="elementor-element elementor-element-1af1d90 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-section elementor-top-section" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
				<div class="elementor-row">
				<div data-id="39e2855" class="elementor-element elementor-element-39e2855 elementor-column elementor-col-100 elementor-top-column" data-element_type="column">
			<div class="elementor-column-wrap elementor-element-populated">
					<div class="elementor-widget-wrap">
				<div data-id="0b641f3" class="elementor-element elementor-element-0b641f3 elementor-widget elementor-widget-text-editor" data-element_type="text-editor.default">
				<div class="elementor-widget-container">
					<div class="elementor-text-editor elementor-clearfix"><p style="text-align: justify;"><span style="color: #333333;">Jak widać na powyższych zrzutach ekranu z programu Wireshark widzimy tylko pakiety protokołu ESP, które zawierają tylko ESP SPI i ESP Sequence. Czyli ruch jest zaszyfrowany zgodnie z założeniami i z konfiguracją.</span></p></div>
				</div>
				</div>
						</div>
			</div>
		</div>
						</div>
			</div>
		</section>
						</div>
			</div>
		</div>
		]]></content:encoded>
			</item>
		<item>
		<title>CISCO S2S VPN z VTI &#8211; te same adresy LAN</title>
		<link>https://kubsoo.github.io/rsnet-website/cisco-vpn-te-sama-adresacja-lokalna/</link>
		<comments>https://kubsoo.github.io/rsnet-website/cisco-vpn-te-sama-adresacja-lokalna/#respond</comments>
		<pubDate>Mon, 11 Sep 2017 21:50:58 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Poradnik]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">https://kubsoo.github.io/rsnet-website/?p=144</guid>
		<description><![CDATA[W idealnym świecie nie mamy do czynienia z zachodzącymi na siebie adresami IP. W praktyce jednak okazuje się, że często łącząc dwie lokalizacje zdalne po VPN okazuje się, że lokalne&#46;&#46;&#46;]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">W idealnym świecie nie mamy do czynienia z zachodzącymi na siebie adresami IP. W praktyce jednak okazuje się, że często łącząc dwie lokalizacje zdalne po VPN okazuje się, że lokalne adresy nachodzą na siebie. Jeśli taka sytuacja wystąpi to mamy dwa rozwiązania:</p>
<ol>
<li style="text-align: justify;">Zmienić adresację w jednej z lokalizacji.</li>
<li style="text-align: justify;">Zastosować NAT</li>
</ol>
<p style="text-align: justify;">Czasami rozwiązanie pierwsze nie wchodzi w grę i musimy posiłkować się NATem. W tym wpisie pokażę jak wykorzystać NAT źródłowy w dwóch zdalnych lokalizacjach w których wykorzystywane są te same adresy IP.</p>
<p><span id="more-144"></span></p>
<p><strong>SCENARIUSZ</strong></p>
<p>Mamy dwie lokalizacje (nazwijmy je A i B) w lokalizacji A mamy router R1, w lokalizacji B mamy router R2. W każdej z lokalizacji wykorzystywana jest podsieć 10.10.10.0/24. Oddziały łączymy ze sobą VPNem. Następnie korzystając z NAT&#8217;a robimy następujące translacje:</p>
<p style="text-align: left;">Lokalizacja A &#8211;    10.10.10.0/24   -&gt;   10.100.100.0/24</p>
<p style="text-align: left;">Lokalizacja B &#8211;    10.10.10.0/24   -&gt;   10.200.200.0/24</p>
<p>&nbsp;</p>
<p style="text-align: center;">Schemat połączenia oraz adresacja:</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat1.png" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-153 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat1.png" alt="" width="553" height="130" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat1.png 553w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat1-300x71.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a></p>
<p>&nbsp;</p>
<p style="text-align: center;">Translacje:</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat.png" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-152 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat.png" alt="" width="580" height="191" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat.png 580w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2014/09/nat-300x99.png 300w" sizes="(max-width: 580px) 100vw, 580px" /></a></p>
<p>&nbsp;</p>
<p><strong>ROZWIĄZANIE:</strong></p>
<p style="text-align: justify;">Poniżej znajduje się konfiguracja routerów R1 i R2. Podstawowa konfiguracja obejmuje konfigurację interfejsów oraz tunelu VPN. Jako sieci lokalne w lokalizacjach A i B posłużą interfejsy loopback0.</p>
<p>Podstawowa konfiguracja R1:</p>
<pre>crypto isakmp policy 10
 encr aes
 authentication pre-share
 group 5
!
crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set TSET esp-aes esp-sha-hmac
!
crypto ipsec profile PROFILE
 set transform-set TSET
!
!
interface Loopback0
 ip address 10.10.10.1 255.255.255.0
!
interface Tunnel0
 ip address 10.0.0.1 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel destination 13.13.13.1
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile PROFILE
!
interface FastEthernet0/0
 ip address 11.11.11.1 255.255.255.0</pre>
<p>Podstawowa konfiguracja R2:</p>
<pre>crypto isakmp policy 10
 encr aes
 authentication pre-share
 group 5
!
crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set TSET esp-aes esp-sha-hmac
!
crypto ipsec profile PROFILE
 set transform-set TSET
!
!
interface Loopback0
 ip address 10.10.10.1 255.255.255.0
!
interface Tunnel0
 ip address 10.0.0.2 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel destination 11.11.11.1
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile PROFILE
!
interface FastEthernet0/0
 ip address 13.13.13.1 255.255.255.0</pre>
<p>Konfiguracja NAT na R1:</p>
<pre>interface Tunnel0
 ip nat outside
!
interface Loopback0
 ip nat inside
!
ip nat inside source static network 10.10.10.0 10.100.100.0 /24</pre>
<p>Konfiguracja NAT na R2:</p>
<pre>interface Tunnel0
 ip nat outside
!
interface Loopback0
 ip nat inside
!
ip nat inside source static network 10.10.10.0 10.200.200.0 /24</pre>
<p>Musimy jeszcze ustawić routing na sieci translatowane czyli 10.200.200.0/24 oraz 10.100.100.0/24. Najprościej to zrobić dodając odpowiednie trasy statyczne na obu routerach:</p>
<p>R1</p>
<pre>R1(config)#ip route 10.200.200.0 255.255.255.0 10.0.0.2</pre>
<p>R2</p>
<pre>R2(config)#ip route 10.100.100.0 255.255.255.0 10.0.0.1</pre>
<p>&nbsp;</p>
<p><strong>TESTY</strong></p>
<p>Przetestujmy teraz naszą konfigurację.</p>
<p>Lokalizacja A -&gt; Lokalizacja B</p>
<p>Jako, że nasze lokalizacje nie posiadają żadnych hostów do testów posłużymy się adresami loopback0 na routerach.</p>
<pre>R1#ping ip 10.200.200.1 source loopback 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.200.200.1, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/41/48 ms</pre>
<p>Lokalizacja B -&gt; Lokalizacja A</p>
<pre>R2#ping ip 10.100.100.0 source loopback 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.100.100.0, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/32/44 ms</pre>
<p>Sprawdźmy jeszcze co pokazuje debug ip icmp na obu routerach oraz polecenie sh ip nat translations</p>
<pre>R1#debug ip icmp
ICMP packet debugging is on
R1#ping ip 10.200.200.1 source loopback 0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.200.200.1, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/18/20 ms
R1#
*Oct 25 09:08:20.711: ICMP: echo reply rcvd, src 10.200.200.1, dst 10.10.10.1
*Oct 25 09:08:20.727: ICMP: echo reply rcvd, src 10.200.200.1, dst 10.10.10.1
*Oct 25 09:08:20.747: ICMP: echo reply rcvd, src 10.200.200.1, dst 10.10.10.1
*Oct 25 09:08:20.767: ICMP: echo reply rcvd, src 10.200.200.1, dst 10.10.10.1
*Oct 25 09:08:20.791: ICMP: echo reply rcvd, src 10.200.200.1, dst 10.10.10.1</pre>
<p>&nbsp;</p>
<pre>R2#debug ip icmp
ICMP packet debugging is on
R2#
*Oct 25 09:08:20.163: ICMP: echo reply sent, src 10.10.10.1, dst 10.100.100.1
*Oct 25 09:08:20.195: ICMP: echo reply sent, src 10.10.10.1, dst 10.100.100.1
*Oct 25 09:08:20.215: ICMP: echo reply sent, src 10.10.10.1, dst 10.100.100.1
*Oct 25 09:08:20.239: ICMP: echo reply sent, src 10.10.10.1, dst 10.100.100.1
*Oct 25 09:08:20.259: ICMP: echo reply sent, src 10.10.10.1, dst 10.100.100.1</pre>
<p>&nbsp;</p>
<pre>R1#show ip nat translations
Pro Inside global Inside local Outside local Outside global
--- 10.100.100.0 10.10.10.0 --- ---
--- 10.100.100.1 10.10.10.1 --- ---</pre>
<p>&nbsp;</p>
<pre>R2#show ip nat translations
Pro Inside global Inside local Outside local Outside global
--- 10.200.200.1 10.10.10.1 --- ---
--- 10.200.200.0 10.10.10.0 --- ---</pre>
<p>Widzimy, że przy pingowaniu adresu 10.200.200.1 z Loopack0 na R1,  R2 myśli, że otrzymuje pakiety od adresu 10.100.100.1 dzięki zastosowanej translacji.</p>
<p>&nbsp;</p>
<p><strong>WNIOSKI</strong></p>
<p style="text-align: justify;">Stosując NAT źródłowy na obu routerach za którymi mamy tą adresację możemy takie sieci połączyć ze sobą bez konieczności zmiany adresów jednej z nich. Stosując NAT może pojawić się problem jeśli na interfejsie tunelowym mamy konfigurację: ip nat inside. Np. w przypadku gdy udostępniamy połączenie internetowe do oddziału zdalnego, w takim przypadku nie będziemy mogli skorzystać z tego rozwiązania, ponieważ interfejs nie może mieć jednocześnie konfiguracji ip nat inside oraz ip nat outside.</p>
]]></content:encoded>
			<wfw:commentRss>https://kubsoo.github.io/rsnet-website/cisco-vpn-te-sama-adresacja-lokalna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tunel VPN P2P bez adresów publicznych</title>
		<link>https://kubsoo.github.io/rsnet-website/tunel-vpn-p2p-bez-adresow-publicznych/</link>
		<comments>https://kubsoo.github.io/rsnet-website/tunel-vpn-p2p-bez-adresow-publicznych/#respond</comments>
		<pubDate>Sun, 12 Mar 2017 17:18:40 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Poradnik]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">https://kubsoo.github.io/rsnet-website/?p=73</guid>
		<description><![CDATA[Zapewne nie raz spotkaliście się z sytuacją, kiedy musieliście się połączyć z komputerem zdalnym, który nie posiadał publicznego adresu. W tym celu konieczne było skorzystanie z jakiegoś programu realizującego funkcje&#46;&#46;&#46;]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Zapewne nie raz spotkaliście się z sytuacją, kiedy musieliście się połączyć z komputerem zdalnym, który nie posiadał publicznego adresu. W tym celu konieczne było skorzystanie z jakiegoś programu realizującego funkcje zdalnego dostępu. W rozwiązaniach komercyjnych stosuje się do tego celu połączenia <a href="http://pl.wikipedia.org/wiki/Virtual_Private_Network" title="">VPN</a>, jednak wymagają one odpowiedniego sprzętu (router z VPN). Do użytku prywatnego istnieją darmowe rozwiązania, które tworzą sieć VPN bez dodatkowego sprzętu, wystarczy zainstalować na komputerze odpowiednie oprogramowanie. Jednym z najpopularniejszych tego typu programów jest <a href="http://www.teamviewer.com/" title="">TeamViewer</a> (dostępny m.in. na Windows, Linux, Mac), który umożliwia zdalne zarządzanie komputerami, na których jest zainstalowany. Działa on jak zdalny pulpit, z tą różnicą że komputer do którego chcemy się podłączyć nie musi znajdować się w naszej sieci LAN. TeamViewer nie umożliwia jednak połączeń terminalowych przez ssh. Do tego typu celów doskonale sprawdza się oprogramowanie N2N.</p>
<p><span id="more-73"></span></p>
<p style="text-align: justify;"><strong>N2N</strong></p>
<p style="text-align: justify;"><a href="http://www.ntop.org/products/n2n/" title="">N2N</a> jest programem, który umożliwia tworzenie tuneli VPN wykorzystując metodę <a href="http://pl.wikipedia.org/wiki/Peer-to-peer" title="">Peer-to-Peer</a>. N2N pozwala na połączenie komputerów znajdujących się za <a href="http://pl.wikipedia.org/wiki/Network_Address_Translation" title="">NAT</a>-em oraz komputerów korzystających z sieci z zablokowanymi portami wejściowymi (np. sieć komórkowa 3G). Architektura N2N opiera się na dwóch elementach: węzłach brzegowych i węźle głównym.</p>
<p style="text-align: justify;">Węzły brzegowe to nic innego jak urządzenia które będziemy łączyć ze sobą przy pomocy węzła głównego w sieć VPN. Węzeł główny to komputer, do którego będą się łączyły węzły brzegowe. Może być to nasz komputer (jednak musi posiadać publiczny adres IP), albo można skorzystać z dostępnych serwerów (tzw. public supernode).</p>
<p style="text-align: justify;">N2N jest dostępny na wiele platform. Ja korzystam z niego na komputerach z Debianem, na routerze z OpenWrt (Gargoyle), na RaspberryPI z Raspbmc, oraz na telefonie z Androidem. Probowalem uruchomić N2N na komputerze z Windows 7 jednak nie udało mi się tego zrobić. Dlatego wymyśliłem proste rozwiązanie, jako że bardzo często korzystam z VirtualBoxa, to postawiłem maszynę wirtualną z Debianem, do której łączę się przez ssh (<a href="http://uptime.com.pl/mobaxterm-narzedzie-do-zdalnego-dostepu-ssh-rdp-telnet-sftp/" title="">MobaXterm</a>) i na niej zainstalowałem N2N. Na chwilę obecną mam 5 urządzeń z zainstalowanym N2N i do każdego mogę się podłączyć przez ssh. Najbardziej podoba mi się N2N na telefon z Androidem, dzieki temu mam dostęp do moich urządzeń gdziekolwiek jestem. Do poprawnego działania oprogramowania na Androida trzeba mieć zroot&#8217;owany telefon.</p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><strong>KONFIGURACJA</strong></p>
<p style="text-align: justify;">Poniżej przedstawię przykład połączenie dwóch komputerów znajdujących się za NAT&#8217;em (PC1 i PC2) w sieć VPN wykorzystując oprogramowanie N2N. Na komputerach zainstalowany jest Debian &#8222;Wheezy&#8221; 7.0. Oba komputery znajdują się za NAT&#8217;em i nie jest możliwe bezpośrednie ich połączenie ze sobą, w tym celu skorzystam z węzła głównego dostarczanego przez <a href="http://www.remoteqth.com/" title="">remoteqth.com</a> o adresie publicznym: 78.111.124.210:82, gdzie 82 oznacza numer portu, na którym serwer nasłuchuje połączeń od węzłów brzegowych.</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n1.png" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-75 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n1.png" alt="" width="392" height="394" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n1.png 392w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n1-150x150.png 150w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n1-298x300.png 298w" sizes="(max-width: 392px) 100vw, 392px" /></a></p>
<p style="text-align: center;">Schemat połączenia.</p>
<p>&nbsp;</p>
<p style="text-align: justify;"><strong>Instalacja krok po kroku:</strong></p>
<ol style="text-align: justify;">
<li>Najpierw na obu komputerach należy zainstalować pakiet n2n wydając polecenie:</li>
</ol>
<pre style="text-align: justify;">root@debian:~# apt-get install n2n</pre>
<ol style="text-align: justify;" start="2">
<li>Teraz konieczne jest wybranie następujących parametrów:</li>
</ol>
<ul style="text-align: justify;">
<li>hasła, którego n2n będzie używać do szyfrowania transmisji;</li>
<li>nazwa sieci (community), każdy węzeł brzegowy może należeć jednocześnie do kliku sieci VPN, ktore są określane przez nazwe sieci;</li>
<li>adresy IP węzłów brzegowych, adresy IP węzłów w tej samej sieci VPN (community) muszą być z tej samej podsieci.</li>
</ul>
<p style="text-align: justify;">Ja do mojego przykładu wybralem następujące parametry:</p>
<ul style="text-align: justify;">
<li>hasło &#8211; &#8222;abcd1234&#8221;</li>
<li>community &#8211; &#8222;vpn&#8221;</li>
<li>adresy IP &#8211; PC1 : 10.10.10.1 ; PC2 : 10.10.10.2</li>
</ul>
<ol style="text-align: justify;" start="3">
<li>Uruchomienie programu:</li>
</ol>
<p style="text-align: justify;">Na PC1:</p>
<pre style="text-align: justify;">root@debian:~# N2N_KEY=abcd1234 /usr/sbin/edge -d n2n0 -a 10.10.10.1 -c vpn -f -l 78.111.124.210:82 -b</pre>
<p style="text-align: justify;">Na PC2:</p>
<pre style="text-align: justify;">root@debian:~# N2N_KEY=abcd1234 /usr/sbin/edge -d n2n0 -a 10.10.10.2 -c vpn -f -l 78.111.124.210:82 -b</pre>
<p style="text-align: justify;">Opcja -d n2n0 określa nazwę interfejsu <a href="http://pl.wikipedia.org/wiki/TUN/TAP" title="">TAP</a>, który zostanie stworzony przez program N2N i do którego zostanie przypisany wybrany przez nas adres IP, natomiast opcja -f oznacza, że program będzie działał w tle.</p>
<p style="text-align: justify;">Po wydaniu powyższych poleceń na PC1 i na PC2, na ekranie konsoli powinien pojawić się następujący komunikat:</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n2.png" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-76 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n2.png" alt="" width="834" height="81" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n2.png 834w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n2-300x29.png 300w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n2-768x75.png 768w" sizes="(max-width: 834px) 100vw, 834px" /></a></p>
<p style="text-align: justify;">oznacza on, że program poprawnie utworzył interfejs n2n0 i nadał mu odpowiedni adres IP. Teraz można zweryfikować utworzony interfejs wydając polecenie:</p>
<pre style="text-align: justify;"><em>root@debian:~# ifconfig n2n0</em></pre>
<p style="text-align: justify;"><em><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n3.png" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-77 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n3.png" alt="" width="568" height="141" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n3.png 568w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n3-300x74.png 300w" sizes="(max-width: 568px) 100vw, 568px" /></a> </em></p>
<p style="text-align: justify;">Teraz można przetestować, czy między komputerami PC1 i PC2 jest łączność, w tym celu pingujemy z jednego komputera drugi:</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n4.png" data-rel="lightbox-image-3" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-78 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n4.png" alt="" width="512" height="216" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n4.png 512w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n4-300x127.png 300w" sizes="(max-width: 512px) 100vw, 512px" /></a></p>
<p style="text-align: justify;">Jeśli nie działa nam komunikacja to należy sprawdzić czy poprawnie wpisaliśmy hasło (N2N_KEY), nazwę sieci VPN (community) oraz czy adresy IP są z tej samej podsieci, w moim przypadku podsieć to 10.10.10.0/24. Szczegółowe informacje na temat ew problemów z działaniem N2N można znaleźć w syslogu:</p>
<pre style="text-align: justify;">root@debian:~# cat /var/log/syslog</pre>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n5.png" data-rel="lightbox-image-4" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-79 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n5.png" alt="" width="601" height="269" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n5.png 601w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n5-300x134.png 300w" sizes="(max-width: 601px) 100vw, 601px" /></a></p>
<ol style="text-align: justify;" start="4">
<li>Autostart</li>
</ol>
<p style="text-align: justify;">N2N możemy uruchomić przy starcie naszego systemu, w tym celu należy w pierwszej kolejności stworzyć plik <em>n2n_autostart.sh</em> o następującej zawartości:</p>
<p style="text-align: justify;">Dla PC1:</p>
<pre style="text-align: justify;">#!/bin/bash

N2N_KEY=abcd1234 /usr/sbin/edge -d n2n0 -a 10.10.10.1 -c vpn -f -l 78.111.124.210:82 -b</pre>
<p style="text-align: justify;">Dla PC2:</p>
<pre style="text-align: justify;">#!/bin/bash

N2N_KEY=abcd1234 /usr/sbin/edge -d n2n0 -a 10.10.10.2 -c vpn -f -l 78.111.124.210:82 -b</pre>
<p style="text-align: justify;">Skryptowi należy nadać atrybut wykonywalności +x:</p>
<pre style="text-align: justify;">root@debian:~# chmod +x n2n_autostart.sh</pre>
<p style="text-align: justify;">Po utworzeniu skryptów konieczne jest dodanie poniższego wpisu do tablic crontab obu komputerów:</p>
<pre style="text-align: justify;">@reboot /root/n2n_autostart.sh &gt;&gt; /var/log/cron 2&gt;&amp;1 &amp;</pre>
<p style="text-align: justify;">Do edycji tablicy crontab służy polecenie:</p>
<pre style="text-align: justify;">root@debian:~# crontab -e</pre>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n6.png" data-rel="lightbox-image-5" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-80 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n6.png" alt="" width="666" height="407" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n6.png 666w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n6-300x183.png 300w" sizes="(max-width: 666px) 100vw, 666px" /></a></p>
<p style="text-align: justify;">W moim przykładzie plik n2n_autostart.sh znajduje się w katalogu /root/n2n_autostart.sh , jeśli jednak skrypt znajduje się w innym katalogu, to trzeba zmienić we wpisie crontab ścieżkę skryptu.</p>
<p style="text-align: justify;">Poniższy wpis w crontab spowoduje, że przy każdym restarcie i uruchomieniu się komputera zostanie uruchomiony skrypt n2n_autostart.sh, a jego wynik zostanie zapisany w logu: <em>/var/log/cron</em>.</p>
<p style="text-align: justify;"><strong>WYDAJNOŚĆ</strong></p>
<p style="text-align: justify;">Teraz pora na test wydajności połączenia pomiędzy komputerami w sieci N2N VPN. Do testowania połączenia użyłem oprogramowania <a href="https://iperf.fr/" title="">iperf</a>:</p>
<p><a href="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n7.png" data-rel="lightbox-image-6" data-rl_title="" data-rl_caption="" title=""><img class="aligncenter wp-image-81 size-full" src="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n7.png" alt="" width="581" height="228" srcset="https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n7.png 581w, https://kubsoo.github.io/rsnet-website/wp-content/uploads/2017/10/n2n7-300x118.png 300w" sizes="(max-width: 581px) 100vw, 581px" /></a></p>
<p style="text-align: justify;">Jak widać na powyższym screenie prędkość połączenia TCP pomiędzy komputerami PC1 i PC2 wynosi ok <strong>0,5Mb/s</strong>, co nie jest najgorszym wynikiem, a przy połączeniach terminalowych w zupełności wystarcza. Na ten wynik w głównej mierze ma wpływ korzystanie z serwera pośredniczącego jakim jest węzeł główny 78.111.124.210:82. Musimy wziąć pod uwagę, że serwer ten jest dostarczany za darmo i umożliwia nam dostęp do komputerów, które nie posiadają publicznych adresów IP (są za NAT&#8217;em i nie są dostępne z zewnątrz), więc nie ma co narzekać.</p>
]]></content:encoded>
			<wfw:commentRss>https://kubsoo.github.io/rsnet-website/tunel-vpn-p2p-bez-adresow-publicznych/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
