diff --git a/wgapi/mywgserver/server.go b/wgapi/mywgserver/server.go index 3273f5b..b4a985a 100644 --- a/wgapi/mywgserver/server.go +++ b/wgapi/mywgserver/server.go @@ -135,7 +135,7 @@ func (s *WGServer) configureDevice() { pk, err := wgtypes.GeneratePrivateKey() - listenPort := 51820 + listenPort := s.endpoint.Port err = c.ConfigureDevice(s.iface, wgtypes.Config{ PrivateKey: &pk,