idragonet

请教下: K2P 刷老毛子后如何做中转机?

  •  
  •   idragonet · Apr 15, 2023 · 3512 views
    This topic created in 1322 days ago, the information mentioned may be changed or developed.

    需求:自己家的 K2P (有公网 IP+已经刷最新老子+DDNS 搞定)希望:把 9000 端口做 TCP/UDP 转发到 Oracle VPS:168.138.1.1:443 上。 也就是:等于路由器做中转机,因为公司电信出海太慢,家里联通快(联通出海轻轻松松 150-200M )

    24 replies  •  2023-04-18 08:59:48 +08:00
    jiangzm
    jiangzm
    Apr 15, 2023
    1
    K2P 操作系统中的 XP
    linhu66
    linhu66
    Apr 15, 2023
    2
    坐标:上海,电信出海轻轻松松 2000M
    titanium98118
    titanium98118
    Apr 15, 2023 via Android
    3
    socat
    109653VIP
    109653VIP
    Apr 15, 2023 via Android
    4
    n2n
    ghjexxka
    ghjexxka
    Apr 15, 2023 via Android
    5
    路由器防火墙自带端口转发功能
    xctcc
    xctcc
    Apr 15, 2023
    6
    上行够吗,我 500M 联通上行 30M ,有公网 ip ,在公司连接家里速度也是 30M
    xctcc
    xctcc
    Apr 15, 2023
    7
    而且说起这个就无语,之前我是 200M 上下行对等的(不知道是 bug 还是本来就是这样),被客户经理一个电话说可以免费升级 500M 就同意了,然后过了很久才发现上行变 30M 了,因为平时基本没注意上行,投诉无门,建议有电话免费升级的宽带的时候问一下上行多少
    idragonet
    idragonet
    OP
    Apr 15, 2023
    8
    @xctcc #6 我也是联通 1000M 下行,70 上行, 自己一个人 70M 够了,现在是公司电信出海是通过家里笔记本电脑中转,缺点是要长期开着笔记本。
    xctcc
    xctcc
    Apr 15, 2023
    9
    @idragonet 买个 n1 刷个 openwrt 或者 armbian 把中转搭在上面,功耗也不高
    idragonet
    idragonet
    OP
    Apr 15, 2023
    10
    @xctcc #9 嗯,先把吃灰的 K3 刷 openwrt 试试
    aydd2004
    aydd2004
    Apr 15, 2023
    11
    我也是 K2P 刷了 openWRT 。

    上网都设置不明白,擦。
    bibiisme
    bibiisme
    Apr 15, 2023
    12
    iptables 就行了,根本不用其他系统或者设备

    iptables -t nat -A PREROUTING --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    bibiisme
    bibiisme
    Apr 15, 2023❤️1
    13
    iptables -t nat -A PREROUTING -p tcp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    iptables -t nat -A PREROUTING -p udp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    idragonet
    idragonet
    OP
    Apr 15, 2023
    14
    @bibiisme #13
    请教下:在路由器“在防火墙规则启动后执行:”加入以下脚本,在局域网电脑可以正常范围 9000 中转( xray 测试 OK ),可是在外网的电脑发现无法中转的,而且在外网检测端口发现 9000 页没开的。


    iptables -t nat -A PREROUTING -p tcp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    iptables -t nat -A PREROUTING -p udp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
    iptables -A OUTPUT -p tcp --dport 9000 -j ACCEPT
    iptables -A OUTPUT -p udp --dport 9000 -j ACCEPT
    iptables -A OUTPUT -p udp --dport 9000 -j ACCEPT
    bibiisme
    bibiisme
    Apr 15, 2023
    15
    @idragonet iptables -A INPUT -p udp --dport 9000 -j ACCEPT

    udp 没写? input 应该就够了吧
    idragonet
    idragonet
    OP
    Apr 15, 2023
    16
    @bibiisme #15 iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
    iptables -A INPUT -p udp --dport 9000 -j ACCEPT
    iptables -A OUTPUT -p udp --dport 9000 -j ACCEPT
    iptables -A OUTPUT -p udp --dport 9000 -j ACCEPT

    问题依旧,还是外网的电脑无法访问 9000 端口,在线网页测试也是 9000 端口关闭的。
    cwbsw
    cwbsw
    Apr 15, 2023
    17
    @idragonet
    filter 表的接受应该是在 FORWARD 上的。
    idragonet
    idragonet
    OP
    Apr 15, 2023
    18
    @cwbsw #17 什么意思?个人水平有限
    cwbsw
    cwbsw
    Apr 15, 2023
    19
    @idragonet
    iptables -t nat -I PREROUTING -p tcp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    iptables -t nat -I PREROUTING -p udp --dport 9000 -j DNAT --to-destination 168.138.1.1:443
    iptables -I FORWARD -p tcp --dport 9000 -j ACCEPT
    iptables -I FORWARD -p udp --dport 9000 -j ACCEPT
    Mandy0
    Mandy0
    Apr 16, 2023 via Android
    20
    有风险,我朋友之前买了个韩国的 VPS ,映射到国内老家里的服务器做的中转,也是家庭宽带,DDNS 映射,被联通扫到了,幸好只是警告了一下,具体咋建的他没和我说,他应该是在家里建了一个 v2ray 的服务端,就我们几个人用,不得不说是真滴爽。
    idragonet
    idragonet
    OP
    Apr 16, 2023
    21
    @Mandy0 #20 谢谢告知。
    bibiisme
    bibiisme
    Apr 16, 2023
    22
    @idragonet 理论上是这样,实在不行 padavan web 界面里端口转发加个 xx 端口转发到路由器自身 9000 端口的规则,然后自己连 xx 端口
    letmefly
    letmefly
    Apr 18, 2023
    23
    楼主莫非是公司的老板?家里的路由器做中转给公司用,出了事不算你的吗?
    idragonet
    idragonet
    OP
    Apr 18, 2023
    24
    @letmefly #23 打工的,自己用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2188 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 11:10 · PVG 19:10 · LAX 03:10 · JFK 06:10
    ♥ Do have faith in what you're doing.