mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5710] [Feature]: Network segmentation support for separating service traffic and management access #3974
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Officer-rabbit on GitHub (Jul 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5710
Is your feature request related to a problem?
In some deployment environments, the network used for client service traffic should be separated from the network used for panel management. Currently, 3x-ui does not provide a clear panel-level way to separate the management network from the service/business network.
For security and operational reasons, I would like the 3x-ui admin panel, API access, and management functions to be reachable only through a dedicated management interface or management network, while proxy service traffic uses separate service interfaces or service networks.
Describe the solution you'd like
I would like 3x-ui to support a network segmentation model similar to VLAN separation, where management traffic and service traffic can be separated.
Expected behavior:
Possible configuration example:
This would allow administrators to keep the control plane and data plane separated.
Alternatives you've considered
I considered using only external Linux firewall rules, VLAN configuration, reverse proxy rules, or manual bind-address settings. These methods can work, but they are not easy to manage from the 3x-ui panel and can be error-prone.
A panel-level configuration would make deployments safer and easier to maintain, especially when the server has multiple NICs, VLANs, PPPoE links, or separate private/public networks.
Concrete use case
A typical deployment has two different networks:
For example:
eth0/10.0.0.2: management network, only accessible from the administrator’s private network.eth1/ public IP: service network, used for client inbound traffic.ppp0toppp15: optional WAN or outbound interfaces used for service traffic.The goal is to prevent the admin panel from being exposed on the public service network, while still allowing proxy traffic to work normally.
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jul 1, 2026):
Most of this is already possible with existing settings; a few pieces (CIDR allowlisting, an explicit "management vs service" UI label) are not implemented.
Already supported today
webListen). The Gin HTTP(S) server binds only to this IP:port (internal/web/web.go,GetListen()/net.ListenConfig.Listen). Set it to your management interface's address, e.g.10.0.0.2, and the panel + REST API (including/panel/api/...) are only reachable there.subListen,internal/web/service/setting.go), independent ofwebListen, validated so it can't reuse the sameip:portas the panel (internal/web/entity/entity.go).listenfield (internal/database/model/model.go, the Address field in the inbound edit form,frontend/src/pages/inbounds/form/InboundFormModal.tsx). You can bind different inbounds toeth1's address,eth2's address, etc., completely independently of the panel's listen IP.So the concrete deployment you describe — panel/API on
eth0/10.0.0.2, proxy inbounds oneth1/public IP — can be built today purely from panel settings, with no VLAN/firewall trickery: setwebListen(andsubListenif you use subscriptions) to the management IP, and set each inbound'slistento the service-network IP you want it to bind.Not implemented
allowCIDRidea in your example). The only related setting,trustedProxyCIDRs, is unrelated — it only tells the panel which reverse-proxy IPs to trust forX-Forwarded-Forheaders, it does not restrict who can connect. The only built-in request-level gate isDomainValidatorMiddleware(internal/web/middleware/domainValidator.go), which checks the HTTPHostheader againstwebDomain, not the source network.eth0,ppp0-ppp15) isn't supported directly — Go'snet.Listen/xray-core bind by IP or Unix socket, not by NIC name, so you'd bind to that interface's IP address instead.If real IP/CIDR-based access control at the panel level (not just documentation of "set
webListento your management IP") is what you're after, that would need new code — an allowlist middleware checkingc.ClientIP()/RemoteAddragainst configured CIDRs, applied ahead of the panel/API routes ininternal/web/web.go. That's a reasonable, scoped enhancement; the multi-fieldnetworkSegmentationJSON block in the issue is broader than what's likely to be adopted, since bind-address separation for panel/sub/inbounds already exists.This reply was generated automatically; a maintainer may follow up.
@Officer-rabbit commented on GitHub (Jul 1, 2026):
Thank you for the clarification. I would like to further explain the “maintenance/OOB network” part of the use case.
In my scenario, the Windows Remote Desktop access is not just a normal LAN-side RDP connection. I would like it to be reachable through a separate access path created and managed by 3x-ui.
For example:
The important point is that these three paths should be isolated from each other:
A concrete failure scenario:
If the 3x-ui management network and the normal user traffic network both fail, the administrator should still be able to connect through the dedicated maintenance/OOB path to reach Windows Remote Desktop and troubleshoot the environment.
Likewise, if the user service network has routing problems, packet loss, PPPoE failure, or firewall issues, those failures should not affect the Windows Remote Desktop maintenance path. If the maintenance path fails, it should not affect the user proxy traffic or panel management path.
So the request is not only about binding the panel and inbounds to different IP addresses. It is about making it easier to define independent access planes with separate routing, binding, access control, and failure domains.
A practical implementation could be smaller in scope:
10.10.30.5:3389.This would be useful in PVE or multi-NIC environments where the 3x-ui VM, Windows VM, PPPoE links, WireGuard access, management network, and user service traffic are intentionally separated.
The goal is not necessarily for 3x-ui to create VLANs directly. The goal is for 3x-ui to provide clearer support for operating separate network roles and failure domains, especially for emergency access paths such as Windows Remote Desktop through a dedicated WireGuard or subscription-based maintenance node.
@MHSanaei commented on GitHub (Jul 3, 2026):
The deployment you describe is achievable with existing panel features today:
webListen, plussubListenfor the subscription server) to your management interface's IP so the panel/API are only reachable there.10.10.30.5:3389, blackhole the rest) and source CIDRs.That gives you the three isolated planes — management, user service, and maintenance/OOB — with independent bindings and failure behavior. The remaining items (interface-name pickers, generated firewall/nftables rules, VLAN/role orchestration) are OS-level network management outside what a proxy panel should own, so a dedicated "network segmentation" subsystem is not planned.
If one specific small gap matters to you (e.g. a CIDR allowlist for panel access), please open a focused issue for just that. Closing as achievable with current features.