[GH-ISSUE #6800] [Bug]: Xray fails to start after updating to 3.10.0: "failed to disable ipv4 rp_filter" #4530

Closed
opened 2026-10-31 20:40:18 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @HaniWhiz on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6800

Describe the bug

When i updated from 3.9.0 to 3.10.0 with the error "server failed to disable ipv4 rp_filer" on the xray core. And no xray version and restart fixed it, it only got fixed after downgrading back to 3.9.0 and this was new for me and have had never happened since version 2.8.0

How to reproduce the problem

When i updated from 3.9.0 to 3.10.0 with the error "server failed to disable ipv4 rp_filer" on the xray core. And no xray version and restart fixed it, it only got fixed after downgrading back to 3.9.0 and this was new for me and have had never happened since version 2.8.0

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.10.0

Xray-core version

No response

How did you install 3x-ui?

Other (please describe in the bug body)

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @HaniWhiz on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6800 ### Describe the bug When i updated from 3.9.0 to 3.10.0 with the error "server failed to disable ipv4 rp_filer" on the xray core. And no xray version and restart fixed it, it only got fixed after downgrading back to 3.9.0 and this was new for me and have had never happened since version 2.8.0 ### How to reproduce the problem When i updated from 3.9.0 to 3.10.0 with the error "server failed to disable ipv4 rp_filer" on the xray core. And no xray version and restart fixed it, it only got fixed after downgrading back to 3.9.0 and this was new for me and have had never happened since version 2.8.0 ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.10.0 ### Xray-core version _No response_ ### How did you install 3x-ui? Other (please describe in the bug body) ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:40:18 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 12, 2026):

This is a duplicate of #6796, and it is already fixed: the v3.10.0 release was rebuilt with the fix after the first build went out. Re-running the update to v3.10.0 should clear the error, so you do not need to stay on 3.9.0.

Why it happened. The first 3.10.0 build shipped a hardened systemd unit (b42a1c0b fix(systemd): harden shipped x-ui unit files (#6718)) with ProtectKernelTunables=yes. That setting mounts all of /proc/sys read-only. A WireGuard outbound in kernel-TUN mode has to write net.ipv4.conf.all.rp_filter while Xray starts, so the core aborted with failed to disable ipv4 rp_filter for all: ... read-only file system. 3.9.0 did not have that line in x-ui.service.debian, which is why downgrading made the error go away.

How to get the fix. Run the update again from the x-ui menu, or with the install script. update.sh downloads the current latest release (update.sh:521) and reinstalls the unit file from the tarball (update.sh:723), so you get the corrected unit. Then check:

grep -n 'proc/sys/net' /etc/systemd/system/x-ui.service
systemctl restart x-ui

You should see ReadWritePaths=-/proc/sys/net. If the core still fails after that, please post:

  1. How you installed 3x-ui (the form says "Other": Docker, a script, or something else?).
  2. The full Xray error line from the panel logs or journalctl -u x-ui.
  3. The WireGuard outbound JSON, with the keys removed.

Verdict: Duplicate
Severity: High (the core does not start on hosts with a kernel-TUN WireGuard outbound)
Confidence: High
Root cause: ProtectKernelTunables=yes, added to x-ui.service.{debian,arch,rhel} by b42a1c0b (#6718), makes /proc/sys read-only. Xray's WireGuard kernel TUN writes /proc/sys/net/ipv4/conf/all/rp_filter while it starts, so the core aborts.
Same class: The same abort happens in any environment where the core holds CAP_NET_ADMIN but /proc/sys/net is read-only or /dev/net/tun is missing (for example the shipped docker-compose with NET_ADMIN). This is covered by 68435837 below.
Already fixed: 1f2738ed fix(systemd): let the WireGuard kernel TUN write rp_filter under the sandbox and 68435837 fix(xray): fall back to the userspace TUN where kernel TUN cannot be set up. The v3.10.0 tag now points at 74c3cc38, which includes both, and its assets were rebuilt at 2026-10-12 16:23 UTC.
Duplicate of: #6796 (same error, same root cause; closed by 1f2738ed)
Evidence: - x-ui.service.debian: ReadWritePaths=-/proc/sys/net added just before ProtectKernelTunables=yes (1f2738ed). git show v3.9.0:x-ui.service.debian has no ProtectKernelTunables.
- internal/xray/kernel_tun_linux.go:22: return hasEffectiveNetAdmin() && !kernelTunReachable() probes /proc/sys/net/ipv4/conf/all/rp_filter for writing.
- internal/web/service/xray.go:192-193: if xray.KernelTunBlocked() { xrayConfig.OutboundConfigs = forceUserspaceWireGuardTun(...) } sets noKernelTun on every WireGuard outbound when the probe fails.
- .github/workflows/release.yml:109-111 copies the unit files into the release tarball.
Not determined: Whether you installed the first v3.10.0 build or the rebuilt one. The issue was opened at 17:50 UTC, after the rebuild. If a fresh update still shows the error, the three answers above will settle it.

I changed the title from "[Bug]: xray core error after update" to make the problem clearer.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:6129624840 --> @github-actions[bot] commented on GitHub (Oct 12, 2026): This is a duplicate of #6796, and it is already fixed: the `v3.10.0` release was rebuilt with the fix after the first build went out. Re-running the update to `v3.10.0` should clear the error, so you do not need to stay on 3.9.0. **Why it happened.** The first 3.10.0 build shipped a hardened systemd unit (`b42a1c0b fix(systemd): harden shipped x-ui unit files (#6718)`) with `ProtectKernelTunables=yes`. That setting mounts all of `/proc/sys` read-only. A WireGuard outbound in kernel-TUN mode has to write `net.ipv4.conf.all.rp_filter` while Xray starts, so the core aborted with `failed to disable ipv4 rp_filter for all: ... read-only file system`. 3.9.0 did not have that line in `x-ui.service.debian`, which is why downgrading made the error go away. **How to get the fix.** Run the update again from the `x-ui` menu, or with the install script. `update.sh` downloads the current `latest` release (`update.sh:521`) and reinstalls the unit file from the tarball (`update.sh:723`), so you get the corrected unit. Then check: ```bash grep -n 'proc/sys/net' /etc/systemd/system/x-ui.service systemctl restart x-ui ``` You should see `ReadWritePaths=-/proc/sys/net`. If the core still fails after that, please post: 1. How you installed 3x-ui (the form says "Other": Docker, a script, or something else?). 2. The full Xray error line from the panel logs or `journalctl -u x-ui`. 3. The WireGuard outbound JSON, with the keys removed. Verdict: Duplicate Severity: High (the core does not start on hosts with a kernel-TUN WireGuard outbound) Confidence: High Root cause: `ProtectKernelTunables=yes`, added to `x-ui.service.{debian,arch,rhel}` by b42a1c0b (#6718), makes `/proc/sys` read-only. Xray's WireGuard kernel TUN writes `/proc/sys/net/ipv4/conf/all/rp_filter` while it starts, so the core aborts. Same class: The same abort happens in any environment where the core holds CAP_NET_ADMIN but `/proc/sys/net` is read-only or `/dev/net/tun` is missing (for example the shipped docker-compose with NET_ADMIN). This is covered by 68435837 below. Already fixed: 1f2738ed `fix(systemd): let the WireGuard kernel TUN write rp_filter under the sandbox` and 68435837 `fix(xray): fall back to the userspace TUN where kernel TUN cannot be set up`. The `v3.10.0` tag now points at 74c3cc38, which includes both, and its assets were rebuilt at 2026-10-12 16:23 UTC. Duplicate of: #6796 (same error, same root cause; closed by 1f2738ed) Evidence: - `x-ui.service.debian`: `ReadWritePaths=-/proc/sys/net` added just before `ProtectKernelTunables=yes` (1f2738ed). `git show v3.9.0:x-ui.service.debian` has no `ProtectKernelTunables`. - `internal/xray/kernel_tun_linux.go:22`: `return hasEffectiveNetAdmin() && !kernelTunReachable()` probes `/proc/sys/net/ipv4/conf/all/rp_filter` for writing. - `internal/web/service/xray.go:192-193`: `if xray.KernelTunBlocked() { xrayConfig.OutboundConfigs = forceUserspaceWireGuardTun(...) }` sets `noKernelTun` on every WireGuard outbound when the probe fails. - `.github/workflows/release.yml:109-111` copies the unit files into the release tarball. Not determined: Whether you installed the first `v3.10.0` build or the rebuilt one. The issue was opened at 17:50 UTC, after the rebuild. If a fresh update still shows the error, the three answers above will settle it. I changed the title from "[Bug]: xray core error after update" to make the problem clearer. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4530
No description provided.