[{"data":1,"prerenderedAt":165},["ShallowReactive",2],{"term-t\u002Ftunnel":3,"related-t\u002Ftunnel":148},{"id":4,"title":5,"acronym":6,"body":7,"category":130,"description":131,"difficulty":132,"extension":133,"letter":134,"meta":135,"navigation":77,"path":136,"related":137,"seo":142,"sitemap":143,"stem":146,"subcategory":6,"__hash__":147},"terms\u002Fterms\u002Ft\u002Ftunnel.md","Tunnel",null,{"type":8,"value":9,"toc":124},"minimark",[10,15,19,23,26,30,113,117,120],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A tunnel is when you wrap one type of network traffic inside another. Imagine mailing a letter inside another letter. The outer envelope gets it across the network, and when it arrives, you open it to find the real message inside. VPNs and SSH both use tunneling.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Tunneling encapsulates one protocol's packets inside another protocol's packets to route traffic across incompatible networks or to add encryption. Common tunneling protocols include SSH tunneling, GRE, L2TP, and WireGuard.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# SSH tunnel: forward remote port to local\n# Access remote MySQL locally on port 3307\nssh -L 3307:localhost:3306 user@remote-server\n\n# Then connect locally:\nmysql -h 127.0.0.1 -P 3307 -u myuser -p\n","bash","",[38,39,40,49,55,72,79,85],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","# SSH tunnel: forward remote port to local\n",[41,50,52],{"class":43,"line":51},2,[41,53,54],{"class":47},"# Access remote MySQL locally on port 3307\n",[41,56,58,62,66,69],{"class":43,"line":57},3,[41,59,61],{"class":60},"sBMFI","ssh",[41,63,65],{"class":64},"sfazB"," -L",[41,67,68],{"class":64}," 3307:localhost:3306",[41,70,71],{"class":64}," user@remote-server\n",[41,73,75],{"class":43,"line":74},4,[41,76,78],{"emptyLinePlaceholder":77},true,"\n",[41,80,82],{"class":43,"line":81},5,[41,83,84],{"class":47},"# Then connect locally:\n",[41,86,88,91,94,98,101,104,107,110],{"class":43,"line":87},6,[41,89,90],{"class":60},"mysql",[41,92,93],{"class":64}," -h",[41,95,97],{"class":96},"sbssI"," 127.0.0.1",[41,99,100],{"class":64}," -P",[41,102,103],{"class":96}," 3307",[41,105,106],{"class":64}," -u",[41,108,109],{"class":64}," myuser",[41,111,112],{"class":64}," -p\n",[11,114,116],{"id":115},"when-youll-hear-this","When You'll Hear This",[16,118,119],{},"\"Set up an SSH tunnel to access the database on the private server.\" \u002F \"The VPN tunnel encrypts all traffic between offices.\"",[121,122,123],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":125},[126,127,128,129],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":115,"depth":51,"text":116},"networking","A tunnel is when you wrap one type of network traffic inside another. Imagine mailing a letter inside another letter.","intermediate","md","t",{},"\u002Fterms\u002Ft\u002Ftunnel",[138,139,140,141],"VPN","SSH","Proxy","Encryption",{"title":5,"description":131},{"changefreq":144,"priority":145},"weekly",0.7,"terms\u002Ft\u002Ftunnel","w27yh-NxPnMb5vweCAHJHf5Z-j3ZeJ0ua5aVvgeXEsI",[149,154,157,161],{"title":141,"path":150,"acronym":6,"category":151,"difficulty":152,"description":153},"\u002Fterms\u002Fe\u002Fencryption","security","beginner","Encryption is scrambling your message into gibberish so only someone with the secret decoder ring can read it.",{"title":140,"path":155,"acronym":6,"category":130,"difficulty":152,"description":156},"\u002Fterms\u002Fp\u002Fproxy","A proxy is a middleman between you and the internet.",{"title":139,"path":158,"acronym":159,"category":130,"difficulty":152,"description":160},"\u002Fterms\u002Fs\u002Fssh","Secure Shell","SSH is like a secure remote control for servers.",{"title":138,"path":162,"acronym":163,"category":130,"difficulty":152,"description":164},"\u002Fterms\u002Fv\u002Fvpn","Virtual Private Network","A VPN creates an encrypted tunnel from your device to a server somewhere else.",1776518320171]