Skip to content

Instantly share code, notes, and snippets.

@WinterSnowfall
Created November 8, 2023 14:57
Show Gist options
  • Save WinterSnowfall/39c8184cb36e4f46fc2ec6cac6a17e15 to your computer and use it in GitHub Desktop.
Save WinterSnowfall/39c8184cb36e4f46fc2ec6cac6a17e15 to your computer and use it in GitHub Desktop.
Allow Wine(server) to use RAW sockets
#!/bin/bash
# short script to address the following exception:
# err:winediag:WSASocketW Failed to create a socket of type SOCK_RAW, this requires special permissions.
WINEBINARY="/opt/wine-staging/bin/wineserver"
# some games will use RAW sockets for their multiplayer implementation,
# however Wine can't properly support these without the below grant
# need to target the actual binary, not a symlink
sudo setcap cap_net_raw=ep $WINEBINARY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment