NaiP

joined 2 years ago
[–] NaiP@lemmy.world 1 points 7 months ago (1 children)

Not sure what you mean here, but I am quite sure I need to set the network mode like that to route the network through the VPN.

[–] NaiP@lemmy.world 1 points 7 months ago

I prefer docker because I can plop it in elsewhere if needed.

[–] NaiP@lemmy.world 1 points 7 months ago (1 children)

How does one do this? Is there an article I could read up on?

[–] NaiP@lemmy.world 5 points 7 months ago

I wanted to do it with pure wireguard. I like the headscale idea though. Might give that a shot.

39
submitted 7 months ago* (last edited 7 months ago) by NaiP@lemmy.world to c/selfhosted@lemmy.world
 

Hello there,

Just want to preface that this is for selfhosted purposes, I may be routing my network in other way later.

I wanted to be able to setup a wireguard docker container with gluetun such that I can connect multiple devices to it at home, in order to minimize my "five device limit" with mullvad. I have the following docker compose:

  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun-wireguard
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - ./gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=#
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=#
      - WIREGUARD_ADDRESSES=#
      - SERVER_CITIES=#setup#setup
      # Timezone for accurate log times
      - TZ=#
      # Server list updater
      # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
      - UPDATER_PERIOD=24h
    ports:
      - 51820:51820/udp
  wireguard-server:
    image: linuxserver/wireguard
    container_name: wireguard-server
    network_mode: service:gluetun # << important
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - SERVERPORT=51820
      - PEERS=iphone
      - PEERDNS=auto
    volumes:
      - ./config:/config
      - /lib/modules:/lib/modules
    restart: unless-stopped

Whenever I try connecting to it by iphone, which is my first attempt for the peer, it doesn't quite work out. The packets are received by the container, and querying cloudflare as such works:

$ sudo docker exec -it wireguard-server ping -c 3 1.1.1.1

Is there any obvious error I've made?

If I'm making the XY Problem, please let me know. If there is a more apt community, please let me know.

[–] NaiP@lemmy.world 5 points 8 months ago (1 children)

That 20% performance hit on linux is only for dx12 games. The rest are fine.

[–] NaiP@lemmy.world 2 points 9 months ago (1 children)

Apologies. Was under the impression you installed the cachy os kernel. Keep in mins you can join the discord and ask there!

[–] NaiP@lemmy.world 1 points 9 months ago

Ty :) will have a look into it.

[–] NaiP@lemmy.world 1 points 9 months ago (3 children)

Be thorough, what messages did you get?

Also their tool i stalls the repos only (you install the kernel right after)

[–] NaiP@lemmy.world 4 points 9 months ago (2 children)

How’d ya do that?

[–] NaiP@lemmy.world 2 points 9 months ago (5 children)

Follow up that you can also just install the cachy-os kernel which has it baked in.

[–] NaiP@lemmy.world 1 points 9 months ago

If you’re gaming DX12 has really ass issues. It’s a bit annoying to setup for wayland too, but otherwise works fine!

[–] NaiP@lemmy.world 9 points 10 months ago* (last edited 10 months ago)

I reversed engineered a keyboard for a presentation in uni. I’ll drop you an excerpt of a written review:

Resources used I learned the USB protocol from this (the relevant parts I needed). We’re thinking of including some basic understanding of the USB protocol in the slides. https://www.beyondlogic.org/usbnutshell/usb6.shtml I got an idea of what could be going on from the following link, specifically the section I’ve set. https://github.com/openrazer/openrazer/wiki/Reverse-Engineering-USB-Protocol#phase-4%E2%80%94decoding-the-protocol I deciphered the protocol using the USBHID packets that would be sent. I was highly sure it was USBHID from a pointer from another Linux community member, but this article was my third source to confirming this. https://hackaday.com/2020/04/14/reverse-engineering-an-rgb-keyboard-under-linux/ One of the sources for information to develop these procedures was from the openRGB wiki. This stream has to do with reversing using URB. I find this might be out of scope, and it would’ve been way tougher to reverse engineer with this.

Feel free to ask as needed here. Spam the requests on the software while monitoring wireshark to be sure of what is what.

The other large comment by “taaz” is also very useful and parts of which I did use while reverse engineering.

view more: next ›