惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
U
Unit 42
H
Help Net Security
博客园_首页
雷峰网
雷峰网
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Recorded Future
Recorded Future
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Cloudflare Blog
S
Security @ Cisco Blogs
M
MIT News - Artificial intelligence
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
K
Kaspersky official blog
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
C
CERT Recently Published Vulnerability Notes
V
Vulnerabilities – Threatpost
WordPress大学
WordPress大学
C
Cisco Blogs
G
Google Developers Blog
N
News and Events Feed by Topic
P
Palo Alto Networks Blog
Apple Machine Learning Research
Apple Machine Learning Research
Schneier on Security
Schneier on Security
博客园 - 聂微东
Security Latest
Security Latest
Security Archives - TechRepublic
Security Archives - TechRepublic
O
OpenAI News
云风的 BLOG
云风的 BLOG
IT之家
IT之家
PCI Perspectives
PCI Perspectives
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
小众软件
小众软件
Scott Helme
Scott Helme
大猫的无限游戏
大猫的无限游戏
L
LINUX DO - 最新话题
Microsoft Azure Blog
Microsoft Azure Blog
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
F
Fortinet All Blogs
The Last Watchdog
The Last Watchdog

高金的博客

人机协作逆向:用 AI + Frida 打通微信 4.1.8 macOS 数据库密钥提取 情绪价值与求真:如何平衡与应对? friend_tech 第一笔交易只能买 1 个key? friend_tech 套利到底有多卷 植物挖矿 浏览器环境检测 加密、编码相关知识汇总 使用tensorflow识别验证码 POW与反爬虫 appium 安卓无法点击搜索框解决办法 知乎直播弹幕抓取与解析 知乎直播套利分析 1000刀+的羊毛在等你 如何创建一个完全匿名的EOS、ETH账号 如何通过技术手段证明"我"没有去过武汉 XUNTA 季度报告 玩游戏不如CX,JUSTGAME邀请分析(内附元数据) 如何在conflux上部署合约 程序员找对象聚合平台-xunta.today EOS 1.8 bidname的漏洞分析
无公网ip,无服务器实现内网穿透
Gao JIn · 2023-09-16 · via 高金的博客

背景

家里有台服务器,想着能远程 ssh上去改改 bug 啥的,发现无公网 ip

网上搜了一堆方案,发现都挺麻烦,有的确实不需要公网 ip,但是他却要有一台有公网 ip的服务器…

实现.

本次实现要感谢这篇文章 使用Cloudfalre Tunnels实现内网穿透,同时突破80/443限制

他这篇主要讲的是80,443端口,那么同理 22 应该也没有问题

操作

  • 你需要注册一个域名,买一个最便宜的就行,一年 10rmb 的那种.
  • 打开Cloudfalre控制台,依次点击Access -> Tunnels(这边记得选 0 元的,需要你绑卡才能下一步,直接关掉,重新打开控制台发现不绑卡也开通了.)
  • 然后就是创建隧道了,可以参考官方文档 Set up a tunnel through the dashboard

Subdomain选择你想要的前缀(随便写都可以)
domain选择你注册的域名
type记得选择 ssh
URL 选择localhost:22(如果你把自己 sshd端口改了,那这边写你改以后的.)

操作流程我复制一下

  • 下载 cloudflared 在客户端

  • 修改SSH configuration file:
    vim ~/.ssh/config

  • 新增下面的内容,把下面的ssh.example.com 替换成你的,比如我就应该替换成ssh.igaojin.me
    还需要注意的是 cloudflared的位置.记得where cloudflared看一下,如果不一致就替换成你的

    1
    2
    Host ssh.example.com
    ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
  • ssh @ssh.example.com (最后可以直接 ssh 登录了.)


本文作者:高金
本文地址https://igaojin.me/2023/09/16/内网穿透/
版权声明:转载请注明出处!

推荐文章