<?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>Technology Bits and Bytes &#187; bhupat.parmar</title>
	<atom:link href="http://blogs.circlesource.com/author/bhupatparmar/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.circlesource.com</link>
	<description>CircleSource Technical Talent ShowCase</description>
	<lastBuildDate>Thu, 10 Dec 2009 20:01:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to SSH tunneling</title>
		<link>http://blogs.circlesource.com/2009/01/27/ssh-tunneling/</link>
		<comments>http://blogs.circlesource.com/2009/01/27/ssh-tunneling/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 10:04:47 +0000</pubDate>
		<dc:creator>bhupat.parmar</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tunneling]]></category>

		<guid isPermaLink="false">http://blogs.circlesource.com/?p=178</guid>
		<description><![CDATA[SSH Tunneling

 What is tunneling?

A technology that enables private network (single machines or entire internetworks) to send its data or allow to use its resources via another network’s connections.Tunneling works by encapsulating a network protocol within packets carried by the second network.

Example:

PPTP (Point-to-Point Tunneling Protocol) technology enables organizations to use the Internet to transmit data [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong>SSH Tunneling</strong></span></p>
<ul>
<li> What is tunneling?</li>
</ul>
<p>A technology that enables private network (single machines or entire internetworks) to send its data or allow to use its resources via another network’s connections.Tunneling works by encapsulating a network protocol within packets carried by the second network.</p>
<ul>
<li>Example:</li>
</ul>
<p>PPTP (Point-to-Point Tunneling Protocol) technology enables organizations to use the Internet to transmit data across a VPN. It does this by embedding its own network protocol within the TCP/IP packets carried by the Internet.</p>
<p><span style="text-decoration: underline;"><strong>Various Tunneling protocols include:</strong></span></p>
<p><strong> </strong><span style="text-decoration: underline;"><strong>Datagram-based:</strong></span></p>
<ul>
<li><span style="text-decoration: underline;"><strong> </strong></span>IPsec (Internet Protocol Security)</li>
<li> GRE (Generic Routing Encapsulation) supports multiple protocols and multiplexing</li>
<li> IP in IP Tunneling: Lower overhead than GRE and used when only 1 IP stream is to be tunneled</li>
<li> L2TP (Layer 2 Tunneling Protocol)</li>
<li> MPLS (Multi-Protocol Label Switching)</li>
<li> GTP (GPRS Tunneling Protocol)</li>
<li> PPTP (Point-to-Point Tunneling Protocol)</li>
<li> PPPoE (point-to-point protocol over Ethernet)</li>
<li> PPPoA (point-to-point protocol over ATM)</li>
<li> IEEE 802.1Q (Ethernet VLANs)</li>
<li> DLSw (SNA over IP)</li>
<li> XOT (X.25 datagrams over TCP)</li>
<li> IPv6 tunneling: 6to4; 6in4; Teredo</li>
<li>Anything In Anything (AYIYA; e.g. IPv6 over UDP over IPv4, IPv4 over IPv6, IPv6 over TCP IPv4,             etc.)</li>
</ul>
<p><strong> </strong><span style="text-decoration: underline;"><strong>Stream-based:</strong></span></p>
<ul>
<li>TLS (Transport Layer Security)</li>
<li>SSH (Secure Shell)</li>
<li>SOCKS (sockets)</li>
<li>HTTP CONNECT command</li>
<li>Various circuit-level proxy protocols, such as Microsoft Proxy Server&#8217;s Winsock RedirectionProtocol, or WinGate Winsock Redirection Service.</li>
</ul>
<p>Out of above available Tunneling protocol we will describe SSH based Tunneling.</p>
<p><span style="text-decoration: underline;"><strong>SSH Tunneling:<br />
</strong></span> -	SSH tunnel is an encrypted tunnel created through a SSH protocol connection.<br />
-	It takes place by using mechanism of port forwarding over a secure tunnel.<br />
-	SSH tunnels provide a means to bypass firewalls that prohibit certain Internet services provided that outgoing connections are allowed.</p>
<p>To understand SSH tunneling we will take a following example.<br />
In the following network diagram, my requirement is to access System B’s private network resources on system A. here system D’s application myWebApp on System A.</p>
<p><!--[if !mso]&gt; &lt;!  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:Calibri;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} --> <!--[endif]--><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;"><!--[if gte vml 1]&gt;                    &lt;![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--></span><!--[if !mso]&gt; &lt;!  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:Calibri;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} --> <!--[endif]--><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;"><!--[if gte vml 1]&gt;                    &lt;![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--></span></p>
<p>Here system A and system B are connected via Internet. So we can create a tunnel between system A and system D via system B and forward a 8080 port of system D to local port of system A.</p>
<p><img class="alignnone size-full wp-image-181" src="http://blogs.circlesource.com/wp-content/uploads/2009/01/image1.jpg" alt="image1" width="625" height="332" /></p>
<p>Below are steps to create a tunnel using SSH client (Putty).<br />
-	Start the SSH client (Putty) at system A.</p>
<p><img class="alignnone size-full wp-image-183" src="http://blogs.circlesource.com/wp-content/uploads/2009/01/image2.jpg" alt="image2" width="600" height="400" /></p>
<p><img class="alignnone size-full wp-image-184" src="http://blogs.circlesource.com/wp-content/uploads/2009/01/image3.jpg" alt="image3" width="600" height="400" /></p>
<p><img class="alignnone size-full wp-image-185" src="http://blogs.circlesource.com/wp-content/uploads/2009/01/image4.jpg" alt="image4" width="600" height="400" /></p>
<p>Step 4:<br />
This step is to verify Tunnel we created by above 1-3 steps:</p>
<p><img class="alignnone size-full wp-image-186" src="http://blogs.circlesource.com/wp-content/uploads/2009/01/image5.jpg" alt="image5" width="600" height="400" /></p>
<p>-	Right click on the caption bar of the shell window and then click on option ‘Change Settings…’, it will open a ‘Putty Reconfiguration’ window.<br />
-	On Putty Reconfiguration window, click on connection-&gt;SSH-&gt;Tunnels and right hand side you will see the mapping we did.<br />
-	Click on Apply<br />
-	Then open a web browser on your local system and type: http://localhost:1001/myWebApp<br />
Press Enter and you will see magic. You won’t believe yourself that you can access the application running on system D which in the private network of B.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.circlesource.com/2009/01/27/ssh-tunneling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
