tusc / wireguard-kmod

WireGuard for UDM series routers
https://www.wireguard.com/
350 stars 18 forks source link

not getting IP from server #53

Closed lowrisk75 closed 2 years ago

lowrisk75 commented 2 years ago

I think I managed to configure properly both UDM and client (can we export the config using a QRcode ?)

vi /etc/wireguard/wg0.conf

# Sample file. Please update private/public keys
[Interface]
Address = 192.168.2.1
ListenPort = 51820
PrivateKey = ########
[Peer]
PublicKey = ########
AllowedIPs = 192.168.2.2/32

client config here : https://ibb.co/jHjKVcF

  1. when I use a DDNS I can't manage to connect, when I'm using my static IP no issue (is that expected?)
  2. when I'm connected the client still have his own public IP and not a IP from the UDM PRO instead
  3. just to confirm the firewall rule in UNIFI Internet Local , source any ip any port / destination IP (what IP? I set to any for now) and port WG port
  4. finally the address in the config 192.168.2.1 / 192.168.2.2 > this need to be setup on UDM PRO network config? can I use a existing VLAN?
peacey commented 2 years ago

Hi @lowrisk75,

  1. You should be able to use DDNS on your client to connect to server. Check your DDNS is connected to the proper IP.
  2. If you want your clients to route their whole internet through, you need to add 0.0.0.0/0 to the AllowedIPs on client-side.
  3. Any is correct.
  4. No, do not set up the WireGuard subnet on a UDM network. That will cause conflicts and routing will have issues.

Regards, Peacey

peacey commented 2 years ago

I'm closing this since I'm guessing we solved it with your other issue.