V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
night98
V2EX  ›  云计算

oracle cloud 的免费小机, iptables 全干掉了还是访问不通

  •  
  •   night98 · 158 天前 · 2781 次点击
    这是一个创建于 158 天前的主题,其中的信息可能已经有所发展或是发生改变。

    iptables 全干掉了

    云面板上的网络防火墙全部选择打开 0.0.0.0/0 所有协议流量开放

    试了半天还是不行,用了 net 命令,端口确实是监听了所有地址的流量

    问题死活访问不了,又怀疑是 clash 的问题,切成全局模式访问,还是不行

    这破云文档也没几个,搜了半天没一个情况和我对上的

    想了想操作上确实没啥问题,唯一的差异就是给机器加了个 ipv6

    发了个工单,看看多久能回复我,真是服了

    第 1 条附言  ·  157 天前
    刚发现 append 按钮,面板情况和 iptables 的情况都发到帖子末尾了,各位老哥有空帮忙看看是什么情况
    31 条回复    2023-11-22 11:05:40 +08:00
    baobao1270
        1
    baobao1270  
       158 天前   ❤️ 1
    你甲骨文面板里 网络 ACL 放行了吗?看看 VPC 默认规则?
    最近甲骨文网络质量变得很差,也有可能有影响
    hysjw
        2
    hysjw  
       158 天前
    oracle 早被玩坏了 在国外还可以 国内没什么意思 不如黑五随便找个线路还可以便宜的小鸡
    hefish
        3
    hefish  
       158 天前
    oracle cloud 的机器我觉着相当好。 还能自己换系统。 自己开了 3 台在用。
    s609926202
        4
    s609926202  
       158 天前 via iPhone   ❤️ 2
    hefish
        5
    hefish  
       158 天前
    @s609926202 这位老哥讲的有道理,可能就是这个问题。 当时我是改 /etc/iptables/rules.v4 重启 解决的。
    szdosar
        6
    szdosar  
       158 天前
    dd ,静候 30-40 分钟后登录:
    wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/dd/master/InstallNET.sh && chmod +x InstallNET.sh && ./InstallNET.sh -u 20.04 -v 64 -p "rootpassword (密码)" -port "22"
    Lexgni
        7
    Lexgni  
       158 天前
    不是有两个组吗,一个是端口的,还有一个忘了叫啥了,你找找
    knightgao2
        8
    knightgao2  
       158 天前   ❤️ 1
    安全组没设置而已,不要选所有服务,选允许 0.0.0.0/0 入栈就行
    jonsmith
        9
    jonsmith  
       158 天前
    IP 被墙了,Oracle 很多 IP 都不行的
    ChengLuffy
        10
    ChengLuffy  
       158 天前   ❤️ 1
    我之前也遇到这个问题,解决命令是:

    ```
    iptables -P INPUT ACCEPT
    iptables -P OUTPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -F
    ```

    其中 FORWARD 命令是必须设置的,具体原因不清楚
    devjia
        11
    devjia  
       158 天前
    DD 成 debian, 整个世界都清净了
    hahasong
        12
    hahasong  
       158 天前   ❤️ 1
    它家控制台比 AWS 还难用 主打一个正常人无法理解,v4 的还好说,配个 v6 也是复杂的一笔
    shyangs
        13
    shyangs  
       158 天前
    Oracle 有一個叫「存取控制清單」(Access Control List ; 縮寫 ACL )的東東.
    malaohu
        14
    malaohu  
       158 天前   ❤️ 1
    参考 开放端口 和 Ubuntu 端口 部分内容
    https://51.ruyo.net/14138.html
    yumusb
        15
    yumusb  
       158 天前   ❤️ 1
    oracle 里面的 ubuntu 镜像默认有 iptables 限制。
    night98
        16
    night98  
    OP
       158 天前
    @s609926202 #4 我是起的 docker ,v6v4 看 net 命令是都监听了的
    night98
        17
    night98  
    OP
       158 天前
    @knightgao2 #8 设置了,子网的安全组和另外一个都设置了
    night98
        18
    night98  
    OP
       158 天前
    @jonsmith #9 开 clash 也进不去
    night98
        19
    night98  
    OP
       158 天前
    @ChengLuffy #10 试过了,还是不行
    night98
        20
    night98  
    OP
       158 天前
    @hahasong #12 确实,aws 之前用了一小段时间,勉强还能用,他这个主打的就是一堆乱七八糟的东西,也没有完整的文档
    night98
        21
    night98  
    OP
       158 天前
    @yumusb #15 iptables pure 都直接卸载了,然后执行了所有端口全开的命令,还是不行
    night98
        22
    night98  
    OP
       158 天前
    @malaohu #14 这个 ubuntu 端口的部分倒没试过,不过我吧 iptables-persistent 这玩意卸载了,等会回去试试
    night98
        23
    night98  
    OP
       158 天前
    @baobao1270 #1 等会回去看看
    ailaodao
        24
    ailaodao  
       158 天前
    osms-agent 插件卸载了吗?
    xxxxman
        25
    xxxxman  
       157 天前
    删除 iptables ,安全组开放,还不行,那就是 ip 坏了,换个 ip
    night98
        26
    night98  
    OP
       157 天前


    各位老哥帮忙看一下,到底是啥情况,我已经裂开了
    night98
        27
    night98  
    OP
       157 天前
    @xxxxman #25 刚才听你的又试了一下,把 ip 换掉,还是不行🙇
    night98
        28
    night98  
    OP
       157 天前
    sudo iptables -L -n
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:28002
    ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:28001
    ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:28002
    ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9443

    Chain FORWARD (policy DROP)
    target prot opt source destination
    DOCKER-USER all -- 0.0.0.0/0 0.0.0.0/0
    DOCKER-ISOLATION-STAGE-1 all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
    DOCKER all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
    DOCKER all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
    DOCKER all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

    Chain DOCKER (3 references)
    target prot opt source destination
    ACCEPT tcp -- 0.0.0.0/0 172.19.0.2 tcp dpt:9443
    ACCEPT tcp -- 0.0.0.0/0 172.19.0.2 tcp dpt:9000
    ACCEPT tcp -- 0.0.0.0/0 172.19.0.2 tcp dpt:8000

    Chain DOCKER-ISOLATION-STAGE-1 (1 references)
    target prot opt source destination
    DOCKER-ISOLATION-STAGE-2 all -- 0.0.0.0/0 0.0.0.0/0
    DOCKER-ISOLATION-STAGE-2 all -- 0.0.0.0/0 0.0.0.0/0
    DOCKER-ISOLATION-STAGE-2 all -- 0.0.0.0/0 0.0.0.0/0
    RETURN all -- 0.0.0.0/0 0.0.0.0/0

    Chain DOCKER-ISOLATION-STAGE-2 (3 references)
    target prot opt source destination
    DROP all -- 0.0.0.0/0 0.0.0.0/0
    DROP all -- 0.0.0.0/0 0.0.0.0/0
    DROP all -- 0.0.0.0/0 0.0.0.0/0
    RETURN all -- 0.0.0.0/0 0.0.0.0/0

    Chain DOCKER-USER (1 references)
    target prot opt source destination
    RETURN all -- 0.0.0.0/0 0.0.0.0/0
    szdosar
        29
    szdosar  
       157 天前   ❤️ 1
    从你的贴图看,你有好几个虚拟云网络( VCN ),不知道为何要弄那么多个,其实多个实例可以共用一个 VCN ,你 OCID: ...3c4nvq 那个是正确的。
    所以:
    1.检测 ip 被封否?--https://tcp.ping.pe
    2.检查你的实例是不是在此虚拟云网络( VCN )中--OCID: ...3c4nvq
    2.1.--检查 ufw status 是不是开着?再不行把防火墙先关了 ufw disable
    3.为了避免维护麻烦,如无必要,勿增实体,建议删除其他虚拟云网络( VCN )
    night98
        30
    night98  
    OP
       157 天前
    @szdosar #29 老哥,没太懂 2.1 是啥意思,VCN 我是只有一个,里面有两个安全列表,有一个默认的干不掉,不过两个安全列表的配置都是一样的全放开的,iptables 已经关闭过了还是不行。

    昨天晚上换了个 ip ,还是连不上,等今天回去用你这个网站试试
    Nav4ai
        31
    Nav4ai  
       157 天前
    如果是 Ubuntu ,Oracle 的 Ubuntu 把 iptables 和 ufw 绑定在一起了。我一般都是 ufw allow 22 ,ufw allow 80 ,ufw allow 443 ,ufw enable ,apt-get remove iptables 这一步会把 iptables 和 ufw 一起卸载。接着 apt-get install ufw 。然后 reboot 。开机后检测一下 ufw 有没有启用没有的话手动 ufw enable 。基本上到这一步只需要手动 allow 端口,就可以用了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2914 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:48 · PVG 20:48 · LAX 05:48 · JFK 08:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.