Comments (10)
ip rule add fwmark 0x01/0x01 table 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N V2RAY
iptables -t mangle -I V2RAY -d 192.168.1.0/24 -j RETURN
iptables -t mangle -I V2RAY -d 127.0.0.1/32 -j RETURN
iptables -t mangle -A V2RAY -p udp -j TPROXY --on-port 12345 -s !192.168.1.10 --tproxy-mark 0x01/0x01
iptables -t mangle -A V2RAY -p tcp -j TPROXY --on-port 12345 -s !192.168.1.10 --tproxy-mark 0x01/0x01
iptables -t mangle -A PREROUTING -j V2RAY
改成上面这个样子端口映射就恢复正常了
from ss-tproxy.
试试把你本机(你应该是在网关上设置的规则吧)的 IP 添加到 V2RAY 自定义链中,放行它,即:
iptables -t mangle -I V2RAY -d $public_ipaddr -j RETURN
或者,把最后一条规则改一下:
iptables -t mangle -A PREROUTING -i $内网网卡 -j V2RAY
from ss-tproxy.
测试了一下,还是不行,我主路由器192.168.1.1 (有公网IP) 映射 4000 端口到 192.168.1.10 (V2RAY 服务器)
from ss-tproxy.
那我也不知道,iptables 规则单靠说是很难调试得当的,必须自己会调试才行。
from ss-tproxy.
ip route add local 0.0.0.0/0 dev lo table 100
是否可以通过这个形式排除掉某个目标地址
from ss-tproxy.
请参考 ip rule 的语法,ip rule help
from ss-tproxy.
忘了一点,将最后一条规则改为:
iptables -t mangle -A PREROUTING -i $内网网卡 ! -s 192.168.1.10/32 -j V2RAY
from ss-tproxy.
测试了一下,还是不行,
从外网进入流量是有的,再从192.168.1.10 返回192.168.1.1 就没有流量了。
from ss-tproxy.
so...,我也无能为力。
from ss-tproxy.
Anyway , 还是要感谢你。
from ss-tproxy.
Related Issues (20)
- 关于ipts_proxy_dst_port的疑问 HOT 41
- 只有http代理应该如何使用 HOT 4
- 在树莓派5上运行.,不起作用 (tproxy模式但ss-redir缺少"tcp_tproxy": true) HOT 16
- Question.请问如何配置DNS HOT 4
- iptables相关内核模块缺失
- 是否有并发线程限制? HOT 12
- 端口检测时机的小疑问 HOT 3
- 教程修改建议,关于naive,. HOT 4
- 新版的能在ss-tproxy.conf里添加个设置参数来过滤IPV6吗? HOT 3
- 有关远程局域网 HOT 11
- Will this tool support trans-proxy a network behind a openvpn? HOT 9
- 按照clash的配置在docker上部署,似乎是没有生效,可以帮忙看下吗 HOT 18
- 4.8版本的ss-libev无法启动 HOT 2
- 怎么排查dns路由错误? HOT 29
- Question:如何只重启代理? HOT 7
- 有兴趣做singbox吗? HOT 1
- ignlist.ext设置无效的问题 HOT 2
- 如何设置指定域名的DNS转发规则? HOT 3
- wiki page about china-dns install was out-of-date HOT 2
- 麻烦分享一下文件 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ss-tproxy.