<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Port-Forwarding on ioctl</title><link>https://ioctl.lol/tags/port-forwarding/</link><description>Recent content in Port-Forwarding on ioctl</description><generator>Hugo</generator><language>en</language><copyright>ioctl</copyright><lastBuildDate>Mon, 16 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ioctl.lol/tags/port-forwarding/index.xml" rel="self" type="application/rss+xml"/><item><title>Tunneling &amp; Pivoting</title><link>https://ioctl.lol/tools/tunneling/</link><pubDate>Mon, 16 Mar 2026 00:00:00 +0000</pubDate><guid>https://ioctl.lol/tools/tunneling/</guid><description>&lt;p>Every method. Copy-paste the command. Move on.&lt;/p>
&lt;p>Conventions: &lt;code>10.10.14.x&lt;/code> = attacker, &lt;code>172.16.0.x&lt;/code> = internal target, &lt;code>pivot&lt;/code> = compromised dual-homed host.&lt;/p>
&lt;hr>
&lt;h2 id="ssh-tunneling">SSH Tunneling&lt;/h2>
&lt;p>The foundation. If you have SSH creds to a pivot host, you have everything you need.&lt;/p>
&lt;h3 id="local-port-forward--l">Local port forward (-L)&lt;/h3>
&lt;p>Route traffic from your machine through the pivot to an internal target.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Access 172.16.0.10:80 via pivot, available at localhost:8080&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ssh -L 8080:172.16.0.10:80 user@pivot -N
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Now &lt;code>curl http://127.0.0.1:8080&lt;/code> hits the internal web app. The pivot does the routing.&lt;/p></description></item></channel></rss>