{"id":15469,"date":"2021-07-29T13:08:57","date_gmt":"2021-07-29T07:38:57","guid":{"rendered":"https:\/\/www.varutra.com\/?p=15469"},"modified":"2022-12-02T12:27:39","modified_gmt":"2022-12-02T06:57:39","slug":"port-forwarding-pivoting-and-tunneling","status":"publish","type":"post","link":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/","title":{"rendered":"Port Forwarding &#8211; Pivoting and Tunneling"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/varutra-1a3b6.kxcdn.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding-1024x573.png\"  class=\"sh-overlay-item sh-table-cell ls-is-cached lazyloaded\" data-rel=\"lightcase\" title=\"Port Forwarding - Varutra Consulting\"><br \/>\nPort forwarding is a key activity in any <a href=\"https:\/\/www.varutra.com\/network-infrastructure-security\/\">network security<\/a> testing. Once we get an initial foothold into the victim network, our next stage is to make lateral movement inside the victim&#8217;s internal network, which is not directly accessible from outside the network. To access the internal network attacker pivot to a compromised machine and hence it is called pivoting. An attacker will use the compromised machine as pivoting point and break into other internal machines.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15472 size-full\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/DMZ-and-internal-network-LAN.png\" alt=\"Port Forwading - DMZ and internal network (LAN)\" width=\"582\" height=\"130\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/DMZ-and-internal-network-LAN.png 582w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/DMZ-and-internal-network-LAN-300x67.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Fig. DMZ and internal network (LAN)<\/strong><\/p>\n<p>To access the internal network compromised machine should be connected to the internal network. Let us suppose the attacker has access to machine ABC, then this machine should have interfaces like eth0, eth1(one of which IS for public communication and another for internal communication). One can check Ethernet interfaces with network commands (windows use ipconfig \/all, Linux uses ifconfig).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15473 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Multiple-Ethernet-Interfaces.png\" alt=\"Multiple Ethernet Interfaces\" width=\"582\" height=\"207\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Multiple-Ethernet-Interfaces.png 582w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Multiple-Ethernet-Interfaces-300x107.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Fig.Multiple Ethernet Interfaces<\/strong><\/p>\n<p>There are few techniques to access the internal networks we will discuss some of them here. According to port open on machine and firewall configuration rule set for inbound and out-band techniques might differ.<\/p>\n<p>We will discuss some most used techniques as mentioned below:<\/p>\n<ol>\n<li>Routing with Metasploit.<\/li>\n<li>SSH Tunneling.<\/li>\n<\/ol>\n<ul>\n<li><strong>Routing with Metasploit:<\/strong> To use the below-mentioned techniques we first need to have an active Meterpreter session on the machine having internal and external connections.<\/li>\n<\/ul>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15474\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Pivoting-to-Internal-Network-Using-Metasploit.png\" alt=\"Pivoting to Internal Network Using Metasploit\" width=\"582\" height=\"297\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Pivoting-to-Internal-Network-Using-Metasploit.png 582w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Pivoting-to-Internal-Network-Using-Metasploit-300x153.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Fig. Pivoting to Internal Network Using Metasploit<\/strong><\/p>\n<p>In this section we will be discussing some techniques with an inbuilt tools in Metasploit Framework:<\/p>\n<ol>\n<li>PORTFWD<\/li>\n<li>Autoroute<\/li>\n<li>Proxychains<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li><strong>PORTFWD<\/strong><\/li>\n<\/ol>\n<p>We can use Meterpreter built-in command &#8220;portfwd&#8221; with some arguments. Basic Command will be like: &#8211;<\/p>\n<p>meterpreter ]portfwd add \u2013l [pivoting port] \u2013p [final port] \u2013r\u00a0 [target host IP]<\/p>\n<p>Hence<\/p>\n<ul>\n<li>Add: for adding route (also we have delete, List, Flush)<\/li>\n<li>l: This is a local port that will listen to the attacking (our)machine. Connections to this port will be forwarded to the remote system.<\/li>\n<li>p: The port to which connections will be forward to (target machine).<\/li>\n<li>r: The IP address of the final target machine (compromised machine).<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol>\n<li><strong>Autoroute<\/strong><\/li>\n<\/ol>\n<p>Autoroute is a built-in command in Meterpreter used to route network traffic.<\/p>\n<ol>\n<li>Background Meterpreter session and run autoroute command as below.<\/li>\n<\/ol>\n<p>metasploit&gt;run autoroute -s [ip_block of target machine]<\/p>\n<ol>\n<li>Use Socks proxy Module from Metasploit and Set the port to listen on which will open the listening port on our machine<\/li>\n<\/ol>\n<p>use auxiliary\/server\/socks4a<\/p>\n<p>set SRVPORT [port number]<\/p>\n<p>run<\/p>\n<ul>\n<li>Now you can directly contact the target machine with that opened port on our machine.<\/li>\n<\/ul>\n<ol>\n<li><strong>Proxychains<\/strong><\/li>\n<\/ol>\n<p>We are using the Proxychain tool built-in kali OS for proxying network from host to host.<\/p>\n<p>First background Meterpreter session (with \u201cbackground\u201d command).<\/p>\n<ol>\n<li>Use route command from Metasploit console as below which will add a route.<\/li>\n<\/ol>\n<p>route add [IP_victim] [netmask] [meterpreter session no.]<\/p>\n<ol>\n<li>Run metasploitSocks_proxy module and set up a server and set port to anything you want<\/li>\n<\/ol>\n<p>use auxiliary\/server\/socks4a<\/p>\n<p>set SRVPORT [port number]<\/p>\n<p>run<\/p>\n<ul>\n<li>Now we need to set a rule to route all traffic through Socks proxy. The below command will add that rule.<\/li>\n<\/ul>\n<p>echo &#8220;socks4 127.0.0.1 1080&#8221; &gt; \/etc\/proxychains.conf<\/p>\n<p>Now all the traffic will be routed to target machine through proxychain.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>SSH tunneling<\/strong>: In this Method Service ports are relayed by creating encrypted SSH connections Between server and client machine. This is one of the safest methods and doesn\u2019t require any separate tool and is also applicable for windows as well Linux.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-15471 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/SSH-tunneling.png\" alt=\"SSH tunneling\" width=\"580\" height=\"235\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/SSH-tunneling.png 580w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/SSH-tunneling-300x122.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Fig.SSH tunneling<\/strong><\/p>\n<p>To use the below techniques port 22 should open on a compromised machine and out-band and the inbound connection is allowed.<\/p>\n<p>In this section, we will be discussing 3 types of tunneling.<\/p>\n<ol>\n<li>Local Port Forwarding<\/li>\n<li>Remote Port Forwarding<\/li>\n<li>Dynamic Port forwarding<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li><strong>Local Port Forwarding<\/strong>:<\/li>\n<\/ol>\n<p>To make a connection to the destination host port it serves the attacker machine as ssh server and a compromised machine as an ssh client. Local port forwarding allows forwarding port of local machine to a compromised machine, which is then get connected destination machine having only internal access.<\/p>\n<p>Here is example command:<\/p>\n<p>ssh -L [LOCAL_PORT]:[DESTINATION_IP]:[DESTINATION_PORT][USER@]SSH_SERVER_IP]<\/p>\n<ol>\n<li><strong>Remote Port Forwarding:<\/strong><\/li>\n<\/ol>\n<p>To make a connection with the destination host, the compromised machine act as ssh server and tunnel traffic to a destination host. Hence attacker acts as ssh client and connect to the destination through ssh server hence which is a compromised machine.<\/p>\n<p>Here is example command:<\/p>\n<p>ssh -R [REMOTE]:[REMOTE_PORT]:[DESTINATION]:[DESTINATION_PORT] [USER@]SSH_SERVER]<\/p>\n<ol>\n<li><strong>Dynamic Port Forwarding<\/strong>:<\/li>\n<\/ol>\n<p>This is easiest among other techniques and less complex to understand. Also, it provides communication across a range of ports on the destination port. This compromised machine will act as ssh server and be able to create a tunnel to the destination port. Attacker machine will act as ssh client and by connecting to ssh server which is compromised machine, in this case, can access destination host.<\/p>\n<p>Here is an example command:<\/p>\n<p>ssh -D [LOCAL_IP]:[LOCAL_PORT] [USER]@[SSH_SERVER]<\/p>\n<p>Here we have discussed some of the most used techniques, there are lots of techniques but some are scenario specific so we will not discuss them here. But please check out the below references for better understanding and to learn another way of Pivoting and Port-forwarding.<\/p>\n<p>&nbsp;<\/p>\n<p>References:<\/p>\n<ul>\n<li><a href=\"https:\/\/linuxize.com\/post\/how-to-setup-ssh-tunneling\/\">https:\/\/linuxize.com\/post\/how-to-setup-ssh-tunneling\/<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/swisskyrepo\/PayloadsAllTheThings\/blob\/master\/Methodology%20and%20Resources\/Network%20Pivoting%20Techniques.md\">https:\/\/github.com\/swisskyrepo\/PayloadsAllTheThings\/blob\/master\/Methodology%20and%20Resou rces\/Network%20Pivoting%20Techniques.md<\/a><\/li>\n<li><a href=\"https:\/\/sushant747.gitbooks.io\/total-oscp-guide\/content\/port_forwarding_and_tunneling.html\">https:\/\/sushant747.gitbooks.io\/total-oscp-guide\/content\/port_forwarding_and_tunneling.html<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Author,<\/p>\n<p><strong>Abhijit Karande<\/strong><\/p>\n<p>Attack &amp;PenTest Team<\/p>\n<p>Varutra Consulting Pvt. Ltd.<\/p>","protected":false},"excerpt":{"rendered":"<p>Port forwarding is a key activity in any network security testing. Once we get an initial foothold into the victim network, our next stage is&#8230;<\/p>\n","protected":false},"author":4,"featured_media":15477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[278],"tags":[479,477,476,478],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.7.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"kalpblogger\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.7.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Varutra Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Port Forwarding - Pivoting and Tunneling Mechanism\" \/>\n\t\t<meta property=\"og:description\" content=\"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1060\" \/>\n\t\t<meta property=\"og:image:height\" content=\"593\" \/>\n\t\t<meta property=\"article:section\" content=\"Network Pentesting\" \/>\n\t\t<meta property=\"article:tag\" content=\"data security\" \/>\n\t\t<meta property=\"article:tag\" content=\"network security\" \/>\n\t\t<meta property=\"article:tag\" content=\"security\" \/>\n\t\t<meta property=\"article:tag\" content=\"server\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-07-29T07:38:57+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-12-02T06:57:39+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Port Forwarding - Pivoting and Tunneling Mechanism\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"kalpblogger\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#article\",\"name\":\"Port Forwarding - Pivoting and Tunneling Mechanism\",\"headline\":\"Port Forwarding &#8211; Pivoting and Tunneling\",\"author\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Port-Forwarding.png\",\"width\":1060,\"height\":593,\"caption\":\"Port Forwarding - Pivoting and Tunneling\"},\"datePublished\":\"2021-07-29T13:08:57+05:30\",\"dateModified\":\"2022-12-02T12:27:39+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#webpage\"},\"articleSection\":\"Network Pentesting, data security, network security, security, server\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/category\\\/network-pentesting\\\/#listItem\",\"name\":\"Network Pentesting\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/category\\\/network-pentesting\\\/#listItem\",\"position\":2,\"name\":\"Network Pentesting\",\"item\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/category\\\/network-pentesting\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#listItem\",\"name\":\"Port Forwarding &#8211; Pivoting and Tunneling\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#listItem\",\"position\":3,\"name\":\"Port Forwarding &#8211; Pivoting and Tunneling\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/category\\\/network-pentesting\\\/#listItem\",\"name\":\"Network Pentesting\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\",\"name\":\"Varutra\",\"description\":\"Secure your digital world with our Cybersecurity services.\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Varutra-Found-e1612984024606.jpg\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#organizationLogo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/\",\"name\":\"kalpblogger\",\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5e96a9b330da7c941c1e39217a2fbe38?s=96&d=mm&r=g\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#webpage\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/\",\"name\":\"Port Forwarding - Pivoting and Tunneling Mechanism\",\"description\":\"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client & server machine through services ports can be relayed.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/Port-Forwarding.png\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#mainImage\",\"width\":1060,\"height\":593,\"caption\":\"Port Forwarding - Pivoting and Tunneling\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/port-forwarding-pivoting-and-tunneling\\\/#mainImage\"},\"datePublished\":\"2021-07-29T13:08:57+05:30\",\"dateModified\":\"2022-12-02T12:27:39+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#website\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/\",\"name\":\"Varutra Consulting\",\"description\":\"Secure your digital world with our Cybersecurity services.\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Port Forwarding - Pivoting and Tunneling Mechanism<\/title>\n\n","aioseo_head_json":{"title":"Port Forwarding - Pivoting and Tunneling Mechanism","description":"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client & server machine through services ports can be relayed.","canonical_url":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#article","name":"Port Forwarding - Pivoting and Tunneling Mechanism","headline":"Port Forwarding &#8211; Pivoting and Tunneling","author":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"publisher":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","width":1060,"height":593,"caption":"Port Forwarding - Pivoting and Tunneling"},"datePublished":"2021-07-29T13:08:57+05:30","dateModified":"2022-12-02T12:27:39+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#webpage"},"isPartOf":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#webpage"},"articleSection":"Network Pentesting, data security, network security, security, server"},{"@type":"BreadcrumbList","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3#listItem","position":1,"name":"Home","item":"https:\/\/www.varutra.com\/varutravrt3","nextItem":{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/#listItem","name":"Network Pentesting"}},{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/#listItem","position":2,"name":"Network Pentesting","item":"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#listItem","name":"Port Forwarding &#8211; Pivoting and Tunneling"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#listItem","position":3,"name":"Port Forwarding &#8211; Pivoting and Tunneling","previousItem":{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/#listItem","name":"Network Pentesting"}}]},{"@type":"Organization","@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization","name":"Varutra","description":"Secure your digital world with our Cybersecurity services.","url":"https:\/\/www.varutra.com\/varutravrt3\/","logo":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/11\/Varutra-Found-e1612984024606.jpg","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#organizationLogo"},"image":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author","url":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/","name":"kalpblogger","image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/5e96a9b330da7c941c1e39217a2fbe38?s=96&d=mm&r=g"}},{"@type":"WebPage","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#webpage","url":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/","name":"Port Forwarding - Pivoting and Tunneling Mechanism","description":"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client & server machine through services ports can be relayed.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#website"},"breadcrumb":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#breadcrumblist"},"author":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"creator":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#mainImage","width":1060,"height":593,"caption":"Port Forwarding - Pivoting and Tunneling"},"primaryImageOfPage":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/#mainImage"},"datePublished":"2021-07-29T13:08:57+05:30","dateModified":"2022-12-02T12:27:39+05:30"},{"@type":"WebSite","@id":"https:\/\/www.varutra.com\/varutravrt3\/#website","url":"https:\/\/www.varutra.com\/varutravrt3\/","name":"Varutra Consulting","description":"Secure your digital world with our Cybersecurity services.","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization"}}]},"og:locale":"en_US","og:site_name":"Varutra Consulting","og:type":"article","og:title":"Port Forwarding - Pivoting and Tunneling Mechanism","og:description":"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.","og:url":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/","og:image":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","og:image:secure_url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","og:image:width":"1060","og:image:height":"593","article:section":"Network Pentesting","article:tag":["data security","network security","security","server"],"article:published_time":"2021-07-29T07:38:57+00:00","article:modified_time":"2022-12-02T06:57:39+00:00","twitter:card":"summary_large_image","twitter:title":"Port Forwarding - Pivoting and Tunneling Mechanism","twitter:description":"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.","twitter:image":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","twitter:label1":"Written by","twitter:data1":"kalpblogger","twitter:label2":"Est. reading time","twitter:data2":"5 minutes"},"aioseo_meta_data":{"post_id":"15469","title":"Port Forwarding - Pivoting and Tunneling Mechanism","description":"Port forwarding - Pivoting and Tunneling is a mechanism of creating a secure connection between client &amp; server machine through services ports can be relayed.","keywords":[],"keyphrases":{"focus":{"keyphrase":"Port Forwarding","analysis":{"keyphraseInTitle":{"title":"Focus keyphrase in SEO title","description":"Focus keyphrase found in SEO title.","score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"title":"Focus keyphrase in meta description","description":"Focus keyphrase found in meta description.","score":9,"maxScore":9,"error":0},"keyphraseLength":{"title":"Focus keyphrase length","description":"Good job!","score":9,"maxScore":9,"error":0,"length":2},"keyphraseInURL":{"title":"Focus keyphrase in URL","description":"Focus keyphrase used in the URL.","score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"title":"Focus keyphrase in introduction","description":"Your Focus keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.","score":3,"maxScore":9,"error":1},"keyphraseInSubHeadings":[],"keyphraseInImageAlt":{"title":"Focus keyphrase in image alt attributes","description":"Focus keyphrase not found in image alt attribute(s). Add an image with your Focus keyphrase as alt text.","score":3,"maxScore":9,"error":1}},"score":76},"additional":[{"keyphrase":"Pivoting","score":83,"analysis":{"keyphraseInDescription":{"title":"Keyphrase in meta description","description":"Keyphrase found in meta description.","score":9,"maxScore":9,"error":0},"keyphraseLength":{"title":"Keyphrase length","description":"Good job!","score":9,"maxScore":9,"error":0,"length":1},"keyphraseInIntroduction":{"title":"Keyphrase in introduction","description":"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.","score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":{"title":"Keyphrase in image alt attributes","description":"Keyphrase found in image alt attribute(s).","score":9,"maxScore":9,"error":0}}},{"keyphrase":"Tunneling","score":83,"analysis":{"keyphraseInDescription":{"title":"Keyphrase in meta description","description":"Keyphrase found in meta description.","score":9,"maxScore":9,"error":0},"keyphraseLength":{"title":"Keyphrase length","description":"Good job!","score":9,"maxScore":9,"error":0,"length":1},"keyphraseInIntroduction":{"title":"Keyphrase in introduction","description":"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.","score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":{"title":"Keyphrase in image alt attributes","description":"Keyphrase found in image alt attribute(s).","score":9,"maxScore":9,"error":0}}}]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"featured","og_image_url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/07\/Port-Forwarding.png","og_image_width":"1060","og_image_height":"593","og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"Network Pentesting","og_article_tags":[],"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"reviewed_by":null,"open_ai":null,"created":"2021-10-27 15:11:07","updated":"2026-05-24 09:56:49","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":"2026-05-22 11:56:53"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.varutra.com\/varutravrt3\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/\" title=\"Network Pentesting\">Network Pentesting<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tPort Forwarding \u2013 Pivoting and Tunneling\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.varutra.com\/varutravrt3"},{"label":"Network Pentesting","link":"https:\/\/www.varutra.com\/varutravrt3\/category\/network-pentesting\/"},{"label":"Port Forwarding &#8211; Pivoting and Tunneling","link":"https:\/\/www.varutra.com\/varutravrt3\/port-forwarding-pivoting-and-tunneling\/"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/15469"}],"collection":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/comments?post=15469"}],"version-history":[{"count":5,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/15469\/revisions"}],"predecessor-version":[{"id":20275,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/15469\/revisions\/20275"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/media\/15477"}],"wp:attachment":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/media?parent=15469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/categories?post=15469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/tags?post=15469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}