mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6797] [CLOSED] Let Xray write rp_filter: set ProtectKernelTunables=no #6457
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#6457
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6797
Author: @freeb5d
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:fix/kernel-tunables-tun📝 Commits (2)
421a24afix(systemd): let Xray write rp_filter so tun inbounds start7b1d84dfix(systemd): name the real writer and drop the stale hardening warning📊 Changes
5 files changed (+11 additions, -7 deletions)
View changed files
📝
install.sh(+1 -2)📝
update.sh(+1 -2)📝
x-ui.service.arch(+3 -1)📝
x-ui.service.debian(+3 -1)📝
x-ui.service.rhel(+3 -1)📄 Description
Fixes #6796
Problem
The hardened systemd units set
ProtectKernelTunables=yes, which mounts/proc/sysread-only for the service. A WireGuard outbound in kernel-TUN mode (the default for a hand-added WireGuard outbound) writesrp_filterunder/proc/sysat startup, so Xray fails withfailed to disable ipv4 rp_filter for all: open /proc/sys/net/ipv4/conf/all/rp_filter: read-only file system. The unit file is replaced on every update, so a manual edit is lost each time.Change
ProtectKernelTunables=noin the arch, debian and rhel units, with a two-line comment naming the WireGuard outbound as the writer.ProtectKernelTunables:232from the "not applied on old systemd" list ininstall.shandupdate.sh, since it is no longer a hardening option.Notes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.