Help for accessing the server LAN devices #6295
-
|
I have trouble configure the routes for specific users to access the LAN devices. Could a guru help me out? My config is running inside a 3x-ui docker container. And the protocol is VLESS-TCP-XTLS-Vision-REALITY. I steal myself. Here is the cleaned up config file: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
The issue is rule ordering. Your Xray evaluates routing rules top to bottom and stops at the first match. You need to add a user-specific LAN allow rule before the private IP block. Add this rule to your {
"type": "field",
"inboundTag": ["inbound-443"],
"user": ["user1"],
"ip": ["geoip:private"],
"outboundTag": "direct"
}Then your existing Note: since you're running inside Docker, "LAN" from Xray's perspective is the Docker host network. Make sure the container has |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a ton for the help. It works brilliantly now! |
Beta Was this translation helpful? Give feedback.
The issue is rule ordering. Your
geoip:privateblock rule applies toinbound-443without any user filter, so it catches LAN-bound traffic from all users including the ones you want to allow through.Xray evaluates routing rules top to bottom and stops at the first match. You need to add a user-specific LAN allow rule before the private IP block. Add this rule to your
routing.rulesarray, placed before thegeoip:privateblocked rule:{ "type": "field", "inboundTag": ["inbound-443"], "user": ["user1"], "ip": ["geoip:private"], "outboundTag": "direct" }Then your existing
geoip:private→blockedrule will only fire for users who didn't match the above.Note: since you're running in…