Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix systemd unit #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SupinePandora43
Copy link

CAP_NET_ADMIN was required to make it run under systemd (ArchLinux)

Signed-off-by: SupinePandora43 <[email protected]>
@txtsd
Copy link
Owner

txtsd commented Nov 15, 2024

Can you show me the specifics of how you're using it such that it needs CAP_NET_ADMIN? It runs fine for me without it.

@SupinePandora43
Copy link
Author

SupinePandora43 commented Nov 17, 2024

Can you show me the specifics of how you're using it such that it needs CAP_NET_ADMIN? It runs fine for me without it.

Right now I've been getting

ноя 18 00:34:26 supine dpitunnel[76274]: Sniff raw socket creation failure. Errno: Operation not permitted
ноя 18 00:34:31 supine dpitunnel[76274]: Sniff raw socket creation failure. Errno: Operation not permitted
...

previously I received setsockopt operation not permitted.

@txtsd
Copy link
Owner

txtsd commented Nov 19, 2024

Are you using the dpitunnel package on the AUR?

If not, paste the output of systemctl cat dpitunnel

@SupinePandora43
Copy link
Author

Are you using the dpitunnel package on the AUR?

If not, paste the output of systemctl cat dpitunnel

yes
the only differences are:

[Unit]
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/usr/bin/dpitunnel --ca-bundle-path "/usr/share/ca-certificates/" --desync-attacks "fake,disorder_fake" --split-position 2 --wrong-seq --doh --doh-server https://dns.google/dns-query --wsize 1 --wsfactor 6
[Install]
WantedBy=multi-user.target
systemctl cat dpitunnel
# /usr/lib/systemd/system/dpitunnel.service
[Unit]
Description=DPITunnel
#After=network.target
Wants=network-online.target
After=network-online.target


[Service]
SyslogIdentifier=dpitunnel
Restart=always
RestartSec=5
Type=simple
User=root
Group=root
#ExecStart=/usr/bin/dpitunnel -doh -doh-server https://dns.google/dns-query -ttl 1 -ca-bundle-path "/etc/ssl/certs/ca-bundle.crt" -desync-attacks disorder_fake
#ExecStart=/usr/bin/dpitunnel --ca-bundle-path=/etc/ssl/certs/ca-bundle.crt --desync-attacks=fake,disorder_fake --split-position=2 --wrong-seq --doh --doh-server=https://dns.google/dns-query --wsize=1 --wsfactor=6
ExecStart=/usr/bin/dpitunnel --ca-bundle-path "/usr/share/ca-certificates/" --desync-attacks "fake,disorder_fake" --split-position 2 --wrong-seq --doh --doh-server https://dns.google/dns-query --wsize 1 --wsfactor 6
#ExecStart=/usr/bin/dpitunnel --ca-bundle-path=/usr/share/ca-certificates/ --desync-attacks=fake,disorder_fake --split-position=2 --wrong-seq --doh --doh-server=https://dns.google/dns-query --wsize=1 --wsfactor=6
TimeoutStopSec=15
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN
IPAddressAllow=localhost link-local multicast
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProcSubset=pid
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=noaccess
ProtectSystem=strict
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@basic-io @file-system @io-event @ipc @network-io @process @signal @system-service

[Install]
WantedBy=multi-user.target
#WantedBy=default.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants