You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
johnrosen edited this page Feb 26, 2020
·
3 revisions
For security reasons, you might want to disable trojan's access to certain endpoints (such as loopback address and LAN). This can be done using per-user iptables rules.
First, create a system user for trojan:
sudo useradd -r trojan --shell=/usr/sbin/nologin
so that you can run trojan with
sudo -u trojan trojan /path/to/config
Or if you want to run trojan using systemd service, add the following lines under [Service] section of bothtrojan.service and trojan@.service:
User=trojan
Group=trojan
Note that if you want to bind to low ports, you have to add a capability to the trojan binary: