<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on DBA学习笔记</title><link>https://blog.zhangjt.fun/tags/linux/</link><description>Recent content in Linux on DBA学习笔记</description><generator>Hugo</generator><language>zh-cn</language><managingEditor>281304173@qq.com (张天师)</managingEditor><webMaster>281304173@qq.com (张天师)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Tue, 20 Oct 2026 17:21:57 +0800</lastBuildDate><atom:link href="https://blog.zhangjt.fun/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux端口转发方式</title><link>https://blog.zhangjt.fun/linux-port-proxy/</link><pubDate>Wed, 18 May 2022 23:52:08 +0800</pubDate><author>281304173@qq.com (张天师)</author><guid>https://blog.zhangjt.fun/linux-port-proxy/</guid><description>&lt;h2 id="ssh端口转发模式" class="headerLink">
 &lt;a href="#ssh%e7%ab%af%e5%8f%a3%e8%bd%ac%e5%8f%91%e6%a8%a1%e5%bc%8f" class="header-mark">&lt;/a>7. ssh端口转发模式&lt;/h2>&lt;blockquote>
&lt;p>这种方式，有以下特点：&lt;/p>
&lt;ol>
&lt;li>可以在本地执行，也可以在服务器执行，部署方案灵活；&lt;/li>
&lt;li>通信会经过ssh加密，安全性好；&lt;/li>
&lt;li>同样是因为经过ssh加密，所以性能比较低&lt;/li>
&lt;/ol>&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">ssh -L &lt;span class="si">${&lt;/span>&lt;span class="nv">local_port&lt;/span>&lt;span class="si">}&lt;/span>:&lt;span class="si">${&lt;/span>&lt;span class="nv">server_ip&lt;/span>&lt;span class="si">}&lt;/span>:&lt;span class="si">${&lt;/span>&lt;span class="nv">server_port&lt;/span>&lt;span class="si">}&lt;/span> -fN root@&lt;span class="si">${&lt;/span>&lt;span class="nv">proxy_ip&lt;/span>&lt;span class="si">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="xinetd-端口转发" class="headerLink">
 &lt;a href="#xinetd-%e7%ab%af%e5%8f%a3%e8%bd%ac%e5%8f%91" class="header-mark">&lt;/a>8. &lt;em>xinetd&lt;/em> 端口转发&lt;/h2>&lt;blockquote>
&lt;ol>
&lt;li>没有加密，性能高；&lt;/li>
&lt;li>在应用层转发，不需要root权限&lt;/li>
&lt;/ol>&lt;/blockquote>
&lt;ul>
&lt;li>
&lt;p>安装xinetd：&lt;code>yum install -y xinetd&lt;/code>&lt;/p></description></item></channel></rss>