V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
feunterban
V2EX  ?  宽带症候群

端口映射套 cdn

  •  
  •   feunterban · 19 天前 · 1031 次点击
    坐标 0752 ,公司是电信宽带,目前已申请公网 ip ,现在内网有个测试服务挂了个 helloworld 页面(脱敏:1.2.3.4:5678 ),内网端口被爱快端口映射为公网 ip 的另一个端口(脱敏:9.10.11.12:1234 ),公网 ip+端口目前可以访问,现在想着套 cdn 在上证书的同时防止被抓到源站以避免不必要的麻烦。但现在套了 aws 的 cdn 一直报错 502 。
    目前就这些吧,暂时也想不到还要提供什么,如果还有别的要补充的在评论区说。还请万能的 v 友若能指点一二。
    12 条回复  ?  2024-04-11 10:00:57 +08:00
    Lentin
        1
    Lentin  
       19 天前
    直接用 cloudflare tunnel
    feunterban
        2
    feunterban  
    OP
       19 天前
    @Lentin 内网机器还挂着别的核心业务,不敢随便动
    totoro625
        3
    totoro625  
       19 天前
    1. 手机不连 WiFi 试试公网 ip+端口访问
    2. 检查回源端口,回源协议
    3. 是不是 aws cdn 被墙了
    4. 测试服务是否指定了 host
    titanium98118
        4
    titanium98118  
       19 天前
    CDN 回源端口,不是你想用哪个就哪个,通常只能 80 443 ,但 cloudflare 除了 80 443 还有几个可用
    https://developers.cloudflare.com/fundamentals/reference/network-ports/
    feunterban
        5
    feunterban  
    OP
       19 天前
    @totoro625
    1.可以访问,在 itdog 测试了也没问题
    2.cloudfront 可以自定义回源端口
    3.有可能,但内网机器有收到 cloudfront 回源 ip 的 get 请求
    4.内网测试服务是 ip+端口,公网映射是 ddns 域名+端口
    feunterban
        6
    feunterban  
    OP
       19 天前
    @titanium98118
    cloudfront 可以自定义回源端口
    windychen0
        7
    windychen0  
       19 天前
    CNAME 不会是带端口了吧
    正常的大概是 A 和 AAAA 到真实公网 ip
    然后加 CNAME 到 A 和 AAAA 的域名
    feunterban
        8
    feunterban  
    OP
       19 天前
    @windychen0
    你是说备选域名的 cname 还是公网 ip 的 cname ?
    Ipsum
        9
    Ipsum  
       19 天前
    记得 ban 掉所有非 cdn server 的 ip 。回源一般只有 80 和 443.如果需要其他的端口加钱 cloudfront
    windychen0
        10
    windychen0  
       18 天前
    @feunterban 就是用于隐藏真实公网 IP 的那条 cf 代理的 CNAME
    feunterban
        11
    feunterban  
    OP
       18 天前
    @windychen0
    额,我用的是 cloudfront 来着
    dodakt
        12
    dodakt  
       18 天前
    @titanium98118 用 Origin Rules 可以任意端口
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1198 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 153ms · UTC 18:12 · PVG 02:12 · LAX 11:12 · JFK 14:12
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com