runfalk / synology-wireguard

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

Wireguard seems connected but no internet #115

Open astronyu opened 2 years ago

astronyu commented 2 years ago

I successfully installed wireguard, generated the keys but now stuck and do not know how to continue. I'm connected to wireguard but no internet.

Also, I doesn't seems to be able to add the script to autostart/upstart as per shown instruction.

Help is appreciated. Thank you.

===============================================================================

Synology NAS model DS1512+ DSM 6.2.4-25556 Update 2

Generated keys:
wg genkey | tee privatekey | wg publickey > publickey
root@DiskStation:~# synoservice --status pkgctl-WireGuard
Service [pkgctl-WireGuard] status=[enable]
required upstart job:
        [pkgctl-WireGuard] is start.
root@DiskStation:~# ls -l `which wg`
lrwxrwxrwx 1 root root 41 Nov 21 07:25 /usr/local/bin/wg -> /volume1/@appstore/WireGuard/wireguard/wg
root@DiskStation:~# lsmod|grep wireguard
wireguard             167943  0
ip_tunnel              11456  3 sit,vxlan,wireguard
ipv6                  306497  276 sit,rodsp_ep,nf_defrag_ipv6,wireguard,nf_conntrack_ipv6
root@DiskStation:~# cat /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.1.1/16
PrivateKey = redacted
ListenPort = redacted
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = redacted
AllowedIPs = 10.0.1.2/32
root@DiskStation:~# sudo wg-autostart enable wg0
sudo: wg-autostart: command not found
root@DiskStation:~# sudo wg show
interface: wg0
  public key: redacted
  private key: (hidden)
  listening port: 51820

peer: redacted
  endpoint: X.X.X.X:61343
  allowed ips: 10.0.1.2/32
  latest handshake: 26 seconds ago
  transfer: 244 B received, 92 B sent
astronyu commented 2 years ago

Apparently it is a known issue. https://github.com/runfalk/synology-wireguard/issues/10

Gonna try docker's route now.

astronyu commented 2 years ago

What I meant was instead of installing wire guard directly on the synology, I'm installing it using docker instead.

Right now using wg-easy and it is really easy.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Matteo Turilli @.> Sent: Friday, December 10, 2021 9:02:41 AM To: runfalk/synology-wireguard @.> Cc: astronyu @.>; Mention @.> Subject: Re: [runfalk/synology-wireguard] Wireguard seems connected but no internet (Issue #115)

@astronyuhttps://github.com/astronyu , could you give any detail about the 'docker's route'? I am trying to understand how to use wg on synology myself.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/runfalk/synology-wireguard/issues/115#issuecomment-990752926, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYRSTAZTNLMQVQ73OODPY3UQG63DANCNFSM5IORFAWQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.