/[smecontribs]/rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch
ViewVC logotype

Diff of /rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.5 by jpp, Thu Oct 28 03:29:13 2021 UTC Revision 1.7 by jpp, Mon Nov 1 02:41:08 2021 UTC
# Line 184  diff -Nur --no-dereference smeserver-wir Line 184  diff -Nur --no-dereference smeserver-wir
184  -  -
185  -#TODO  -#TODO
186  -  -
187    diff -Nur --no-dereference smeserver-wireguard-1.0.old/createlink smeserver-wireguard-1.0/createlink
188    --- smeserver-wireguard-1.0.old/createlink      2021-10-27 23:25:06.319000000 -0400
189    +++ smeserver-wireguard-1.0/createlink  2021-10-27 23:33:11.426000000 -0400
190    @@ -16,7 +16,7 @@
191    
192     event_services($event, qw(
193       masq restart
194    -  'wg-quick@wg0' restart
195    +  wg-quick@wg0 restart
196     ));
197     event_link("wireguard-network", $event, "30");
198     templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
199    @@ -54,7 +54,7 @@
200       /etc/wireguard/server_public.key
201     ));
202     event_services($event, qw(
203    -  'wg-quick@wg0' restart
204    +  wg-quick@wg0 restart
205     ));
206     event_link("wireguard-user-create", $event, "03");
207    
208    @@ -67,6 +67,11 @@
209     event_services($event, qw(
210       wg-quick@wg0 restart
211     ));
212    +
213    +$event="remoteaccess-update";
214    +event_services($event, qw(
215    +  wg-quick@wg0 restart
216    +));
217    
218    
219     panel_link("wireguard", "manager");
220    diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wireguard.pm smeserver-wireguard-1.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wireguard.pm
221    --- smeserver-wireguard-1.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wireguard.pm   2021-10-26 23:15:10.000000000 -0400
222    +++ smeserver-wireguard-1.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wireguard.pm       2021-10-31 22:37:41.238000000 -0400
223    @@ -224,6 +224,7 @@
224     my $wg0 = $cdb->get('wg-quick@wg0');
225     my $ServPublic = $wg0->prop('public');
226     my $Port = $wg0->prop('UDPPort');
227    +my $allowedips = $wg0->prop('allowedips') || "0.0.0.0/0";
228    
229     #here we guess wan IP
230     # are we server-gateway mode ? so external lan, should do
231    @@ -233,15 +234,20 @@
232     # dig @resolver4.opendns.com myip.opendns.com +short -4
233     # dig @resolver1.ipv6-sandbox.opendns.com AAAA myip.opendns.com +short -6
234    
235    +#DNS
236    +my $IPAddress = $cdb->get('InternalInterface')->prop('IPAddress');
237    +my $dns = ($allowedips =~ /0.0.0.0\/0/)? "DNS = $IPAddress" : "" ;
238    +
239    
240     my $fulltext ="#configuration for $key $info
241     [Interface]
242     PrivateKey = $private
243     Address = $key
244    +$dns
245    
246     [Peer]
247     PublicKey = $ServPublic
248    -AllowedIPs = 0.0.0.0/0
249    +AllowedIPs = $allowedips
250     Endpoint = $ExternalIP:$Port
251     ";
252     # we could add a DNS field in [Interface]


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed