查看“内网穿透打洞”的源代码
←
内网穿透打洞
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=frp= ==info == 54.153.89.195 dev.evanlinux.com 54.153.89.195 devshop.evanlinux.com 192.168.0.11 ==install== <pre> wget https://github.com/fatedier/frp/releases/download/v0.9.3/frp_0.9.3_linux_amd64.tar.gz tar -zxvf frp_0.9.3_linux_amd64.tar.gz cd frp_0.9.3_linux_amd64 </pre> ==run== <pre> #server ./frps -c frps.ini #client ./frpc -c frpc.ini 建议线上用 screen 然后 ./frps -c ./frps.ini & or nohup </pre> ==for leanote 201811== <pre> #今天用的版本是0.21 on bsd for leanote #cat /data/apps/frp/frps.ini #/usr/bin/nohup /data/apps/frp/frps -c /data/apps/frp/frps.ini & [common] bind_port = 7000 vhost_http_port = 9000 #vhost_http_port = 88 [leanote] type = http auth_token = 123 custom_domains =t.linuxsa.org # cat /data/apps/frp/frpc.ini # /usr/bin/nohup /data/apps/frp/frpc -c /data/apps/frp/frpc.ini & [common] server_addr = 138.197.220.125 server_port = 7000 auth_token = 123 [leanote] type = http local_port = 9000 custom_domains =t.linuxsa.org #[ssh] #type = tcp #local_ip = 127.0.0.1 #local_port = 22 #remote_port = 6000 #other #cat frps.ini [common] bind_port = 7000 vhost_http_port = 9000 #vhost_http_port = 88 [leanote] type = http auth_token = 123 custom_domains =t.linuxsa.org #cat frpc.ini [common] server_addr = 138.197.220.125 server_port = 7000 auth_token = 123 [leanote] type = http local_port = 9000 custom_domains =t.linuxsa.org #[ssh] #type = tcp #local_ip = 127.0.0.1 #local_port = 22 #remote_port = 6000 #other test #今天用的版本是0.21 # frps.ini [common] bind_port = 7000 vhost_http_port = 80 #subdomain_host = evanlinux.com [web] type = http custom_domains = t.linuxsa.org auth_token = 123 # frpc.ini [common] server_addr = 45.77.26.200 server_port = 7000 auth_token = 123 [web] type = http local_port = 8080 custom_domains = t.linuxsa.org 打开 t.linuxsa.org #这个跳转 应试是docker的问题 因为 8888的cmdb不会跳的 最终跳到 http://192.168.0.10:8080/ </pre> ==frp开胃菜== <pre> cat frpc.ini # frpc.ini [common] server_addr = 54.153.89.195 server_port = 7000 auth_token = 123 [web] type = http #local_port = 80 local_port = 8000 cat frps.ini # frps.ini [common] bind_port = 7000 vhost_http_port = 80 #subdomain_host = evanlinux.com [web] type = http custom_domains = evanlinux.com #custom_domains = *.evanlinux.com auth_token = 123 visa evanlinux.com 就是内网的8000tomcat应用 </pre> == 进阶== === custom_domains多个域名=== ==== frps==== <pre> # frps.ini [common] bind_port = 7000 vhost_http_port = 80 #subdomain_host = evanlinux.com [web] type = http custom_domains = evanlinux.com #custom_domains = *.evanlinux.com auth_token = 123 [web02] vhost_http_port = 80 type = http auth_token = 123 custom_domains = devshop.evanlinux.com [web03] vhost_http_port = 80 type = http auth_token = 123 custom_domains = dev.evanlinux.com #https [web02s] vhost_https_port = 443 type = https auth_token = 123 custom_domains = devread.com </pre> ==== frpc==== <pre> # frpc.ini [common] server_addr = 54.153.89.195 server_port = 7000 auth_token = 123 [web] type = http #local_port = 80 local_port = 8000 #subdomain = devshop [web02] type = http local_port = 5080 custom_domains = devshop.evanlinux.com [web03] type = http local_port = 7080 custom_domains = dev.evanlinux.com #https [web02s] type = https local_port = 443 custom_domains = devread.com </pre> ====dns==== devshop.evanlinux.com dev.evanlinux.com 记得A到 frps 机器上去 ==== cus 80 eg ==== <pre> #request nginx has dev.evanlinux.com devshop.evanlinux.com # frpc.ini [common] server_addr = 54.153.89.195 server_port = 7000 auth_token = 123 [web] type = http #local_port = 80 local_port = 8000 #subdomain = devshop [web02] type = http #local_port = 5080 local_port = 80 custom_domains = devshop.evanlinux.com [web03] type = http #local_port = 5080 local_port = 80 custom_domains = dev.evanlinux.com </pre> =使用 80 端口访问= <pre> 些时候必须使用 80 端口访问网站服务,比如微信公众号服务。将服务器端的 vhost_http_port 参数配置成 80 就可以了。 但是,有时候 80 端口被 apache 或 nginx 使用了,那么就要通过修改 apache 或 nginx 的配置来解决。修改配置的目的是将域名域名对应的 80 端口转发到 vhost_http_port 配置的端口上来。 以 nginx 为例: server { listen 80; server_name frp.biliyu.com; #charset koi8-r; #access_log logs/host.access.log main; location / { proxy_set_header Host $host; proxy_set_header X_Real_IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://127.0.0.1:8080; } } </pre> =说明= <pre> 说明: server_addr 公网IP server_port 服务器端口 local_port 本地要替换的端口 remote_port 替换端口(ssh连接时候改成这个端口) local_port 本地http服务的端口号 custom_domains 有公网IP服务器的域名(必须有域名,否则无法实现http) </pre> =不太好用 = 花生壳有 linux 版本,支持内网穿透,容器跑一个就行了。 https://hsk.oray.com/download/ =see also= ==frp系列== https://www.cnblogs.com/sanduzxcvbnm/category/1171545.html [https://www.cnblogs.com/sanduzxcvbnm/p/8509150.html 七、利用frp 穿透到内网的http/https网站,实现对外开放] [https://blog.csdn.net/Meteor_s/article/details/80996737 树莓派3B+(06):frp内网穿透ssh] [https://www.oschina.net/p/nps 轻量级内网穿透代理服务器 NPS] https://github.com/cnlh/nps/ ==install config== [https://github.com/fatedier/frp/blob/master/README_zh.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8C%E7%BA%A7%E5%9F%9F%E5%90%8D frp官方中文文档] https://www.oschina.net/p/frp [https://blog.csdn.net/yp090416/article/details/85090273 linux、centos7 安装 frp 搭建高性能内网穿透服务] [https://www.jianshu.com/p/e8e26bcc6fe6 使用frp实现内网穿透] [https://www.hi-linux.com/posts/25686.html 推荐一款很好用的内网穿透工具 FRP] [https://blog.csdn.net/LunaW/article/details/50426873 n2n内网穿透神器(一条命令实现穿透)(linux,安卓,win,openwrt全介绍)] [https://mritd.me/2017/01/21/use-frp-for-internal-network-wear/ 利用 frp 进行内网穿透] [http://www.biliyu.com/article/1778.html 使用 frp 实现内网穿透] [https://www.jianshu.com/p/57658825ff0d frp 内网穿透] [http://www.voidcn.com/article/p-bykweqdk-bot.html n2n内网穿透打洞部署全过程 + nginx公网端口映射] [https://blog.csdn.net/u013144287/article/details/78589643 十分钟教你配置frp实现内网穿透] [https://www.jianshu.com/p/e8e26bcc6fe6 使用frp实现内网穿透] [https://www.v2ex.com/t/406714 内网穿透都有哪些解决方案] [https://blog.csdn.net/qq_29300341/article/details/79109544 内网穿透工具frp使用说明] [https://blog.csdn.net/pwb1994001/article/details/80769838 Linux 配置frp,实现内网穿透] [https://maoji.github.io/frp-setup/ frp内网穿透配置] [https://blog.csdn.net/zengd0/article/details/79522253 搭建frp实现内网穿透] [https://blog.csdn.net/zbgjhy88/article/details/55289785 自建服务器解决外网访问内网(内网穿透【端口映射】)问题的方法总结] [https://sunnyrx.com/2016/10/21/simple-to-use-frp/ 使用frp实现内网穿透] =https= [https://blog.csdn.net/u011644312/article/details/79903651 letsencrypt + frp + iris 实现https内网穿透] [https://ycfung.github.io/2018/05/20/rasp1/ 搭建 frp 内网穿透并启用 HTTPS 访问] [[category:ops]]
返回至
内网穿透打洞
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息