runfalk / synology-wireguard

WireGuard support for some Synology NAS drives
MIT License
919 stars 131 forks source link

Wireguard kernel module and Docker #62

Open Kopernikus1979 opened 3 years ago

Kopernikus1979 commented 3 years ago

Hi,

I have installed the Wireguard package on my Synology DS920+, all is working. I also have docker where I run different containers, one of the is qBittorent VPN, now running with OpenVPN but since the last version it supports Wireguard but therefore the Wireguard kernel needed to be installed on the host OS, I suppose with installing this package this was done, however still getting this error "could not detect a useable init system"

Any idea?

runfalk commented 3 years ago

One thing to bear in mind is that the kernel module is only loaded if synology-wireguard is started. I can't remember if you need to enable it manually or not. It could also be that the Docker container loads before the kernel module.

I have no idea how qBittorrent VPN works or how a container uses a host kernel module so I'm afraid I can't be of much help.

Kopernikus1979 commented 3 years ago

Ok, I see.... is there a command to enable it?

runfalk commented 3 years ago

You should be able to start it using the UI. Once it's loaded it should be visible if you run lsmod|grep wireguard.

dooniem commented 3 years ago

@Kopernikus1979 Did you manage to get this to work? I happen to have the same platform as you, Gemenilake (220+), and run qBittorrent VPN from docker.

I have not yet compiled the geminilake spk, if you don't mind, could you share both the spk and how you were able to connect the Docker app?

Kopernikus1979 commented 3 years ago

@dooniem

I haven't proceeded to test it further because I've upgraded to DSM7 so this would require to build a DSM7 compatible spk. As a temporary solution I have installed Debian as a Virtual machine, installed wireguard & qbittorent and mapped the download folder of my NAS to it, created some firewall rules and all running fine as it would in a container. Anyway I hope Synology updates it's docker, now running DSM7 and still old kernel...

@runfalk

Would it be hard to compile a DSM7 compatible spk?

https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/7.0/enu/DSM_Developer_Guide_7_0_Beta.pdf

Avsynthe commented 2 years ago

@Kopernikus1979 did you ever go back to give this a go now that this works for DSM7 on the 220+?

I'm using a 718+ and it looks like DSM7 isn't supported yet, but I'd love to know if this works for when it does. There's so little documentation on this but I'm also trying to get wireguard to work with a qBittorrent Docker container. It's the last step to the perfect setup that I'm always chasing

Kopernikus1979 commented 2 years ago

@Avsynthe

Hi,

No I migrated a few months ago to Unraid and didn't look back :-)

dooniem commented 2 years ago

@Kopernikus1979 Just curious. Are you running Unraid using your DS920+ somehow or have you left Synology completely?

Kopernikus1979 commented 2 years ago

@dooniem

No, left Synology completely needed more power and control...

bartoszkaminski commented 1 year ago

Hello! I'm in a very similar situation. I have a DS902+, I installed synology-wireguard via Package Manager, started it, lsmod | grep wireguard says it's running. Now I'm trying to configure arch-delugevpn in Docker but I keep having "could not detect a useable init system". Do you have any solutions to that? @dooniem, did it work for you after all?

Reshma1206 commented 9 months ago

Hi,

I have installed the Wireguard package on my Synology DS920+, all is working. I also have docker where I run different containers, one of the is qBittorent VPN, now running with OpenVPN but since the last version it supports Wireguard but therefore the Wireguard kernel needed to be installed on the host OS, I suppose with installing this package this was done, however still getting this error "could not detect a useable init system"

Any idea?

here im try to compile wireguard in kernal version 6.2.0.32 error im facing sk_buff file missing in kernal header like this -------> eg: error: ‘struct sk_buff’ has no member named ‘headers_end’; did you mean ‘headers’? 85 | offsetof(struct sk_buff, headers_end)

but file was inside kernal header here sk_buff file not fetching while compiling wireguard in kernal . here im trying to wireguard in kernal version 5.10 its compiling .im not facing any issuse.

here , question is wireguard does compile in kernal version above 6.2.0.32 ? any can tell the process?