-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
透明代理能设置转发访问端口白名单吗? #256
Comments
在其他局域网主机,执行 |
ssh -vv root@192.168.123.5 卡住了 |
进入 n1 里面,看下 iptables 规则: for t in raw mangle nat filter; do
echo "========= $t ==========="
iptables -t $t -S
done |
我也用过 n1、rpi 作为 ss-tproxy “旁路由”,没见过这种情况。 另外,关闭 ss-tproxy 时,局域网内能访问 n1 吗(网关和 dns 这些不要动,还是指向 n1) |
========= raw =========== |
网关设置成默认路由器,而不是N1的时候是正常的。你说的这种,我没试过,我试试 |
试过了。问题依旧。 外网可以端口映射到N1的ssh,或者先ssh登陆到路由器,再通过路由器ssh登陆到N1。感觉是WAN口可以ssh到N1,LAN口不行。 |
你这个 iptables 规则看起来是 旧版 ss-tproxy 的。是 4.6 吗? |
尝试执行以下命令,将iptables规则完全清空,然后再试这个情况:
# 停止脚本 (v4.7版本之前)
ss-tproxy stop
ss-tproxy flush-postrule
ss-tproxy delete-gfwlist
# 停止脚本 (v4.7版本开始)
ss-tproxy stop
ss-tproxy flush-stoprule |
不记得版本了,应该1,2年前装的了。没更新过。能在线更新吗? 问题应该是 我的mac电脑连了VPN。路由的问题。奇怪的是路由器的ip是可以连的。 |
如果有时间,更新下比较好,因为新版本有一些重要改进(主要是 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 查看版本 |
现在路由器下连的N1盒子开启了透明代理,路由器上设置N1盒子为网关。
N1盒子自身,以及路由器下的其他设备访问网页均没有问题。
但是从路由器下的其他设备通过ssh访问N1,连接不上,ping也似乎不同。感觉是iptable错误认为是需要转发的数据流。
PS 从路由器上ssh是可以登陆到N1盒子的,另外路由器配置了端口映射,从外网访问路由器再通过端口映射也是可以ssh登陆到N1盒子的。
望答疑解惑,谢谢!
The text was updated successfully, but these errors were encountered: