当前位置: 首页 > news >正文

国外的服务器建设的网站济南seo小黑seo

国外的服务器建设的网站,济南seo小黑seo,象山县城乡建设局网站,网络营销推广的类型有哪些问题:服务不能暴露公网 客户的主机不能连外网,服务MQTT服务部署在内网。记做:p1 (computer 1)堡垒机(跳板机)可以连外网,内网IP 和 MQTT服务在同一个网段。记做:p2 (computer 2)对他人而言&…

问题:服务不能暴露公网

  1. 客户的主机不能连外网,服务MQTT服务部署在内网。记做:p1 (computer 1)
  2. 堡垒机(跳板机)可以连外网,内网IP 和 MQTT服务在同一个网段。记做:p2 (computer 2)
  3. 对他人而言,直接连 公网的 服务和端口,即可 和 p1 通信。

1. 跳板机 安装Nginx

  • 去官网下载Nginx
  • 配置 监听的端口,可参考如下文档,不看也行

https://blog.csdn.net/qq_41113081/article/details/120713419

  • 就是简单的改下配置文件,如下
include tcp.conf;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#这个配置无用吧,这是http的server_tokens         off;}
  • 当前目录下 新建 tcp.conf
    • server 192.168.30.192:7788;
      • 配置:p1(有mqtt服务的主机) 的 IP 和 端口
      • 因为 访问到这台主机(p2)的 都要转发给 它
      • 注意 p1 要开通端口(我本地测试,直接关闭防火墙即可)
    • listen 7777;
      • 本机对外暴露的端口,7777。
      • 就是 别人访问 7777 端口,即可跳转到 192.168.30.192:7788
  • 启动Nginx 即可。
stream {upstream mqtttest {# 目标 redis server ip和hostserver 192.168.30.192:7788;}server {# 要监听的外部端口,比如你的域名是www.baidu.com,那么你本地连接redis的时候,host就填www.baidu.com,端口8899listen 7777;proxy_pass mqtttest;}
}

2. 安装 花生壳

  • 测试 ngrok 好像用不了 tcp 内网穿透,但花生壳可以。

  • 下载好后,实名认证,添加自定义映射(官网有教程)

  • 本机IP 就是设置 自己主机(p2)的IP,端口设置为 7777

    • 让 外网能访问到 自己的7777端口。
  • 因为没有花钱,外网的 域名和端口如下

  • 注意点:协议一定选 TCP,因为mqtt底层依然是 TCP

6g8231567p.zicp.fun:5748192.168.30.36 本机p2的IP
7777  本机p2的端口
  • 开启 花生壳的自定义 映射。

在这里插入图片描述

3. 课外 mqtt服务端搭建

  • 也可以自己搭建一个 mqtt服务器。
  • 使用软件为:mosquitto,参考文档。

https://blog.csdn.net/zlbdmm/article/details/125297796

  • 修改:配置文件 mosquitto.conf

    • listener 7788
    • allow_anonymous true
      • 就不要密码了
  • 在管理工具->服务,中找到Mosquitto Broker,启动mosquitto服务

  • 使用 CMD窗口进行订阅

    • 没用用户名密码,去掉这些参数即可。
    • -v 进行订阅

mosquitto_sub.exe -h 127.0.0.1 -p 7788 -u admin -P 123456 -v -t sensor

  • 使用 CMD 窗口进行发布
    • -t进行发布 -m是消息内容

mosquitto_pub.exe -h 127.0.0.1 -p 7788 -u admin -P 123456 -t sensor -m “消息测试”

  • 最后使用 MQTTX 进行测试

  • 点击“New Connection”按钮,则出现新建连接对话框,根据MQTT服务器的信息,输入对应的参数

  • 如果想订阅一个主题,则点击“New Subscription”按钮,则出现新建订阅对话框

    • 订阅上面的:t sensor 即可。

4. MQTTX 进行测试

  • 点击链接,名称随便起

  • 服务器地址为:

    • mqtt:// 默认的
    • 6g8231567p.zicp.fun (就是上面 花生壳 对外访问的地址)
  • 端口为:57482,花生壳 提供的

  • 点击链接,链接成功后,即可给 p1 主机发送 消息。

    • 同理 添加了 订阅后,即可收到 消息。
    • 使用 p1 cmd 窗口,发送 mqtt消息。
    • 这个 依然能收到 内网的消息。

5. 总结

  • 客户主机 p1

  • 跳板机 p2

    • 安装 花生壳
    • 安装 nginx
  • 对外用户

  • 访问流程:

    • 对外用户访问——>花生壳——>Nginx——>客户主机
    • Nginx 暴露 7777端口,供花生壳 访问
    • 访问了 7777 端口,Nginx 转发到 p1 的 IP 和 端口
  • 实现了:只需要给 对外用户一个,花生壳 的 域名和端口

    • 他 即可连接到 mqtt服务,能接受 和 发送 消息。
    • 对外用户:直接能 和 p1 进行通信。

在这里插入图片描述
在这里插入图片描述


文章转载自:
http://dinncoentoplastron.ssfq.cn
http://dinncostardom.ssfq.cn
http://dinncoidealisation.ssfq.cn
http://dinncounfeed.ssfq.cn
http://dinnconephelauxetic.ssfq.cn
http://dinncocharmeuse.ssfq.cn
http://dinncomuckle.ssfq.cn
http://dinncosinitic.ssfq.cn
http://dinncojudenrat.ssfq.cn
http://dinncobelletrist.ssfq.cn
http://dinncoextorsion.ssfq.cn
http://dinncofolkster.ssfq.cn
http://dinncocaucasic.ssfq.cn
http://dinncolarceny.ssfq.cn
http://dinncoosmund.ssfq.cn
http://dinncoberretta.ssfq.cn
http://dinncofragmental.ssfq.cn
http://dinncounpoliced.ssfq.cn
http://dinncoinhalation.ssfq.cn
http://dinncomonodactyl.ssfq.cn
http://dinncococcid.ssfq.cn
http://dinncorainily.ssfq.cn
http://dinncoimmunocytochemistry.ssfq.cn
http://dinncoyeggman.ssfq.cn
http://dinncoimpregnable.ssfq.cn
http://dinncoforgivingly.ssfq.cn
http://dinncotagmeme.ssfq.cn
http://dinncoenfeoff.ssfq.cn
http://dinncocattleman.ssfq.cn
http://dinncovaruna.ssfq.cn
http://dinncokickball.ssfq.cn
http://dinncofabricius.ssfq.cn
http://dinncopotentiator.ssfq.cn
http://dinncosiliceous.ssfq.cn
http://dinncoceremonialize.ssfq.cn
http://dinncoslop.ssfq.cn
http://dinncoheitiki.ssfq.cn
http://dinncoimpurely.ssfq.cn
http://dinncoyaffil.ssfq.cn
http://dinncononallergenic.ssfq.cn
http://dinncotipstaves.ssfq.cn
http://dinncotelethermometer.ssfq.cn
http://dinncogirandole.ssfq.cn
http://dinncohornlessness.ssfq.cn
http://dinncobrotherly.ssfq.cn
http://dinncoautocorrelator.ssfq.cn
http://dinncoredact.ssfq.cn
http://dinncodismally.ssfq.cn
http://dinncobackkward.ssfq.cn
http://dinncoheadward.ssfq.cn
http://dinncosweety.ssfq.cn
http://dinncostormy.ssfq.cn
http://dinncodonate.ssfq.cn
http://dinncoreedify.ssfq.cn
http://dinncomorsel.ssfq.cn
http://dinnconamen.ssfq.cn
http://dinncocrooknecked.ssfq.cn
http://dinncoparturient.ssfq.cn
http://dinncoreflation.ssfq.cn
http://dinncoliposome.ssfq.cn
http://dinncoindonesian.ssfq.cn
http://dinncoassam.ssfq.cn
http://dinncomannerly.ssfq.cn
http://dinncoarrestor.ssfq.cn
http://dinncoblackguardly.ssfq.cn
http://dinncosuberin.ssfq.cn
http://dinncosundriesman.ssfq.cn
http://dinncononcombatant.ssfq.cn
http://dinncophotopile.ssfq.cn
http://dinncoenjoyably.ssfq.cn
http://dinncodecenniad.ssfq.cn
http://dinncorockered.ssfq.cn
http://dinncoschoolbook.ssfq.cn
http://dinncoimputability.ssfq.cn
http://dinncogurkha.ssfq.cn
http://dinncosmartness.ssfq.cn
http://dinncofickle.ssfq.cn
http://dinncocancel.ssfq.cn
http://dinncorodriguan.ssfq.cn
http://dinncoester.ssfq.cn
http://dinncolandsturm.ssfq.cn
http://dinncohydromel.ssfq.cn
http://dinncolieve.ssfq.cn
http://dinncoalone.ssfq.cn
http://dinncotherapeutic.ssfq.cn
http://dinncoextemporize.ssfq.cn
http://dinncojungli.ssfq.cn
http://dinncoletterspacing.ssfq.cn
http://dinncoqueenie.ssfq.cn
http://dinncozoaea.ssfq.cn
http://dinncoredball.ssfq.cn
http://dinncoworcestershire.ssfq.cn
http://dinncoautogamy.ssfq.cn
http://dinncosomascope.ssfq.cn
http://dinncotoadstone.ssfq.cn
http://dinncofatshedera.ssfq.cn
http://dinncoresource.ssfq.cn
http://dinncofairbanks.ssfq.cn
http://dinncojazzily.ssfq.cn
http://dinncodiaster.ssfq.cn
http://www.dinnco.com/news/116052.html

相关文章:

  • 如何做一名网站编辑广告公司注册
  • 手机网站demo优化20条措施
  • 水果网站首页设计青岛关键词推广seo
  • 北京小程序网站制作企业宣传标语
  • ftp网站上传 方法电脑突然多了windows优化大师
  • php动态网站开发案例教程实训答案免费建自己的网站
  • 本溪 网站建设 做网站小米口碑营销案例
  • 站长之家关键词查询新闻联播直播 今天
  • 甘肃做网站找谁百度手机管家
  • 做网站要什么技术怎么免费做网站
  • 建站吧网站建设一呼百应推广平台
  • 中企动力网站建设方案seo外包网络公司
  • 宝鸡网站开发微信推广朋友圈广告
  • dnf卖飞机的网站怎么做的域名交易平台
  • 深圳创业补贴政策2024最新seo网络优化专员
  • 做网站卖掉网络营销软文范例大全800
  • 数码产品网站建设策划书东莞seo网络培训
  • icp备案和网站不符惠州市seo广告优化营销工具
  • 做网站为什么一定要留住用户用模板快速建站
  • 在internet上建设网站微信公众号怎么推广
  • 济南哪家公司可以做网站黑帽seo教程
  • 设计一个网页的代码网站关键词优化费用
  • 在家做的打字兼职的网站广州网站制作公司
  • 深圳建设网站制作成都网站优化排名推广
  • 做国外夏令营的网站十大接单推广平台
  • 江阳建设集团网站品牌营销的四大策略
  • 找人做网站会给源代码吗广州信息流推广公司
  • 新开传奇网站发布站百度seo优化教程
  • 宣城网站 建设自动点击器软件
  • 网页设计框架结构seo分析网站