mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
firewall: Add WireGuard RW to the UI
commit 5a1c02df8973b3acc5c3101a94e86fe6df4b43b6
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Thu Sep 12 19:39:26 2024 +0200
firewall: Add WireGuard RW to the UI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -1965,6 +1965,13 @@ sub getcolor
|
||||
}
|
||||
}
|
||||
|
||||
# WireGuard Roadwarrior
|
||||
if ($Wireguard::settings{'CLIENT_POOL'}) {
|
||||
if (&Network::ip_address_in_network($sip, $Wireguard::settings{'CLIENT_POOL'})) {
|
||||
return "<font style='color: $Header::colourwg;'>$c</font>"
|
||||
}
|
||||
}
|
||||
|
||||
#Check if IP is part of OpenVPN dynamic subnet
|
||||
my ($a,$b) = split("/",$ovpnsettings{'DOVPN_SUBNET'});
|
||||
if (&General::IpInSubnet($sip,$a,$b)){
|
||||
@@ -3036,6 +3043,9 @@ sub getipforgroup
|
||||
&General::readhash("${General::swroot}/ethernet/settings",\%hash);
|
||||
return $hash{'ORANGE_NETADDRESS'}."/".&Network::convert_netmask2prefix($hash{'ORANGE_NETMASK'}) || $hash{'ORANGE_NETMASK'};
|
||||
}
|
||||
if ($name eq "WGRW") {
|
||||
return $Wireguard::settings{'CLIENT_POOL'};
|
||||
}
|
||||
if ($name eq 'ALL'){
|
||||
return "0.0.0.0/0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user