Open
Conversation
|
Using this config for both For |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's a very bad practice to run an exposed networking service as root, and rathole shouldn't recommend doing that. Here are some changes to enhance security:
DynamicUser=yes– Run the binary in its own minimal-privilege user.NoNewPrivileges=yes– Prevents privilege escalation.PrivateTmp=yes– Isolates/tmpand/var/tmpto prevent interference.PrivateDevices=yesandDevicePolicy=closed– Restricts access to device files.ProtectSystem=strict– Makes the filesystem read-only except for essential directories.ProtectHome=read-only– Prevents modification of user home directories.ProtectControlGroups=yes,ProtectKernelModules=yes,ProtectKernelTunables=yes– Restricts access to kernel-related settings.RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK– Limits allowed network families.RestrictNamespaces=yes– Disables namespace usage to prevent container escape vulnerabilities.RestrictRealtime=yesandRestrictSUIDSGID=yes– Prevents real-time scheduling abuse and SUID/SGID privilege escalation.LockPersonality=yes– Prevents personality changes to avoid exploits.AmbientCapabilities=CAP_NET_BIND_SERVICE– Allow binding to lower port numbers (e.g. 80)