Giter Site home page Giter Site logo

Comments (11)

zfl9 avatar zfl9 commented on May 26, 2024 1

不记得版本了,应该1,2年前装的了。没更新过。能在线更新吗?

如果有时间,更新下比较好,因为新版本有一些重要改进(主要是 iptables 规则)。

更新指南:https://github.com/zfl9/ss-tproxy?tab=readme-ov-file#%E5%8D%87%E7%BA%A7%E8%84%9A%E6%9C%AC

更新的话,其实就是先把原来的卸载,然后重新安装新版而已啦。

不过你这个问题应该和 ss-tproxy 版本无关了。


使用 ss-tproxy version 查看版本

from ss-tproxy.

zfl9 avatar zfl9 commented on May 26, 2024

在其他局域网主机,执行 ssh -vv 192.168.123.5 看下什么错误?

from ss-tproxy.

wnpllrzodiac avatar wnpllrzodiac commented on May 26, 2024

ssh -vv [email protected]
OpenSSH_9.0p1, LibreSSL 3.3.6
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.123.5 is address
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 192.168.123.5 [192.168.123.5] port 22.

卡住了

from ss-tproxy.

zfl9 avatar zfl9 commented on May 26, 2024

进入 n1 里面,看下 iptables 规则:

for t in raw mangle nat filter; do
    echo "========= $t ==========="
    iptables -t $t -S
done

from ss-tproxy.

zfl9 avatar zfl9 commented on May 26, 2024

我也用过 n1、rpi 作为 ss-tproxy “旁路由”,没见过这种情况。

另外,关闭 ss-tproxy 时,局域网内能访问 n1 吗(网关和 dns 这些不要动,还是指向 n1)

from ss-tproxy.

wnpllrzodiac avatar wnpllrzodiac commented on May 26, 2024

========= raw ===========
-P PREROUTING ACCEPT
-P OUTPUT ACCEPT
========= mangle ===========
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-N SSTP_PREROUTING
-N SSTP_OUTPUT
-N SSTP_RULE
-A PREROUTING -j SSTP_PREROUTING
-A OUTPUT -j SSTP_OUTPUT
-A SSTP_PREROUTING -i lo -m mark ! --mark 0x2333 -j RETURN
-A SSTP_PREROUTING -p tcp -m addrtype ! --src-type LOCAL ! --dst-type LOCAL -j SSTP_RULE
-A SSTP_PREROUTING -p tcp -m mark --mark 0x2333 -j TPROXY --on-port 60080 --on-ip 127.0.0.1 --tproxy-mark 0x0/0x0
-A SSTP_OUTPUT -m owner --uid-owner 65534 --gid-owner 65534 -j RETURN
-A SSTP_OUTPUT -p tcp -m addrtype --src-type LOCAL ! --dst-type LOCAL -j SSTP_RULE
-A SSTP_RULE -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff
-A SSTP_RULE -m mark --mark 0x2333 -j RETURN
-A SSTP_RULE -d 8.8.8.8/32 -p tcp -m tcp --dport 53 -j MARK --set-xmark 0x2333/0xffffffff
-A SSTP_RULE -d 8.8.8.8/32 -p tcp -m tcp --dport 53 -j RETURN
-A SSTP_RULE -p tcp -m set --match-set gfwlist dst -m multiport --dports 1:65535 -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j MARK --set-xmark 0x2333/0xffffffff
-A SSTP_RULE -j CONNMARK --save-mark --nfmask 0xffffffff --ctmask 0xffffffff
========= nat ===========
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P POSTROUTING ACCEPT
-P OUTPUT ACCEPT
-N SSTP_OUTPUT
-N SSTP_POSTROUTING
-A POSTROUTING -j SSTP_POSTROUTING
-A OUTPUT -j SSTP_OUTPUT
-A SSTP_OUTPUT -d 127.0.0.1/32 -p udp -m owner --uid-owner 65534 --gid-owner 65534 -m udp --dport 53 -j DNAT --to-destination 192.168.123.1:53
-A SSTP_POSTROUTING -d 192.168.123.1/32 -p udp -m owner --uid-owner 65534 --gid-owner 65534 -m udp --dport 53 -j MASQUERADE
-A SSTP_POSTROUTING -m addrtype ! --src-type LOCAL -m conntrack --ctstate SNAT,DNAT -j RETURN
-A SSTP_POSTROUTING -p tcp -m addrtype ! --src-type LOCAL -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j MASQUERADE
-A SSTP_POSTROUTING -p udp -m addrtype ! --src-type LOCAL -m conntrack --ctstate NEW -j MASQUERADE
-A SSTP_POSTROUTING -p icmp -m addrtype ! --src-type LOCAL -m conntrack --ctstate NEW -j MASQUERADE
========= filter ===========
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

from ss-tproxy.

wnpllrzodiac avatar wnpllrzodiac commented on May 26, 2024

我也用过 n1、rpi 作为 ss-tproxy “旁路由”,没见过这种情况。

另外,关闭 ss-tproxy 时,局域网内能访问 n1 吗(网关和 dns 这些不要动,还是指向 n1)

网关设置成默认路由器,而不是N1的时候是正常的。你说的这种,我没试过,我试试

from ss-tproxy.

wnpllrzodiac avatar wnpllrzodiac commented on May 26, 2024

我也用过 n1、rpi 作为 ss-tproxy “旁路由”,没见过这种情况。
另外,关闭 ss-tproxy 时,局域网内能访问 n1 吗(网关和 dns 这些不要动,还是指向 n1)

网关设置成默认路由器,而不是N1的时候是正常的。你说的这种,我没试过,我试试

试过了。问题依旧。

外网可以端口映射到N1的ssh,或者先ssh登陆到路由器,再通过路由器ssh登陆到N1。感觉是WAN口可以ssh到N1,LAN口不行。

from ss-tproxy.

zfl9 avatar zfl9 commented on May 26, 2024

你这个 iptables 规则看起来是 旧版 ss-tproxy 的。是 4.6 吗?

from ss-tproxy.

zfl9 avatar zfl9 commented on May 26, 2024

尝试执行以下命令,将iptables规则完全清空,然后再试这个情况:

关闭 ss-tproxy 时,局域网内能访问 n1 吗(网关和 dns 这些不要动,还是指向 n1)

# 停止脚本 (v4.7版本之前)
ss-tproxy stop
ss-tproxy flush-postrule
ss-tproxy delete-gfwlist

# 停止脚本 (v4.7版本开始)
ss-tproxy stop
ss-tproxy flush-stoprule

from ss-tproxy.

wnpllrzodiac avatar wnpllrzodiac commented on May 26, 2024

你这个 iptables 规则看起来是 旧版 ss-tproxy 的。是 4.6 吗?

不记得版本了,应该1,2年前装的了。没更新过。能在线更新吗?
另外,我发现我用手机连路由器,可以ssh登陆N1的。

问题应该是 我的mac电脑连了VPN。路由的问题。奇怪的是路由器的ip是可以连的。
先把issue close了吧。应该不是个issue。

from ss-tproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.