$General::noipprefix = 'noipg-';
require "${General::swroot}/network-functions.pl";
+require "${General::swroot}/wireguard-functions.pl";
# Load the main settings file
our %mainsettings = ();
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'NET'} = $netaddress;
}
}
+
+ # WireGuard
+ if ($Wireguard::settings{'CLIENT_POOL'}) {
+ my $name = $Lang::tr{'wg rw peers'};
+
+ $defaultNetworks->{$name}{'NAME'} = "WGRW";
+ }
}
sub get_aliases
{
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
WARNING: untranslated string: wg no remote subnets = No remote subnets given
WARNING: untranslated string: wg peer configuration = Peer Configuration
WARNING: untranslated string: wg peer does not exist = Peer does not exist
+WARNING: untranslated string: wg rw peers = WireGuard Roadwarrior Peers
WARNING: untranslated string: wg scan the qr code = Scan the QR code to import the WireGuard configuration into a mobile client.
WARNING: untranslated string: wg warning configuration only shown once = Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.
WARNING: untranslated string: whitelisted = Whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< winbind daemon
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg rw peers
< wg scan the qr code
< wg warning configuration only shown once
< whitelisted
require '/var/ipfire/general-functions.pl';
require '/var/ipfire/network-functions.pl';
+require '/var/ipfire/wireguard-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "${General::swroot}/location-functions.pl";
$hint.=$Lang::tr{'fwdfw hint ip2'}." Source: $networkip1/$scidr Target: $networkip2/$tcidr<br>";
}
}else{
+ $errormessage .= $sip;
+ $errormessage .= $scidr;
+
+ $errormessage .= $tip;
+ $errormessage .= $tcidr;
+
if ( &General::IpInSubnet($networkip2,$sip,&General::iporsubtodec($scidr)) ){
- $errormessage.=$Lang::tr{'fwdfw err samesub'};
+ $errormessage.=$Lang::tr{'fwdfw err samesub'} . $fwdfwsettings{'grp1'} .$fwdfwsettings{$fwdfwsettings{'grp1'}} . $fwdfwsettings{'grp2'} . $fwdfwsettings{$fwdfwsettings{'grp2'}};
}
}
}
if ($fwdfwsettings{$grp} eq $val.'_addr'){
($a,$b) = split (/\//, $fwdfwsettings{$fwdfwsettings{$grp}});
}elsif($fwdfwsettings{$grp} eq 'std_net_'.$val){
- if ($fwdfwsettings{$fwdfwsettings{$grp}} =~ /Gr/i){
+ if ($fwdfwsettings{$fwdfwsettings{$grp}} eq "GREEN"){
$a=$netsettings{'GREEN_NETADDRESS'};
$b=&General::iporsubtocidr($netsettings{'GREEN_NETMASK'});
- }elsif($fwdfwsettings{$fwdfwsettings{$grp}} =~ /Ora/i){
+ }elsif($fwdfwsettings{$fwdfwsettings{$grp}} eq "ORANGE"){
$a=$netsettings{'ORANGE_NETADDRESS'};
$b=&General::iporsubtocidr($netsettings{'ORANGE_NETMASK'});
- }elsif($fwdfwsettings{$fwdfwsettings{$grp}} =~ /Bl/i){
+ }elsif($fwdfwsettings{$fwdfwsettings{$grp}} eq "BLUE"){
$a=$netsettings{'BLUE_NETADDRESS'};
$b=&General::iporsubtocidr($netsettings{'BLUE_NETMASK'});
- }elsif($fwdfwsettings{$fwdfwsettings{$grp}} =~ /OpenVPN/i){
+ }elsif($fwdfwsettings{$fwdfwsettings{$grp}} eq "OpenVPN-Dyn"){
&General::readhash("$configovpn",\%ovpnsettings);
($a,$b) = split (/\//, $ovpnsettings{'DOVPN_SUBNET'});
$b=&General::iporsubtocidr($b);
+
+ # WireGuard
+ } elsif ($fwdfwsettings{$fwdfwsettings{$grp}} eq "WGRW") {
+ return $Wireguard::settings{'CLIENT_POOL'};
}
}elsif($fwdfwsettings{$grp} eq 'cust_net_'.$val){
&General::readhasharray("$confignet", \%customnetwork);
}elsif ($val eq 'IPsec RW' ){
$tdcolor="style='background-color: $Header::colourvpn;color:white;'";
return;
+ }elsif ($val eq "WGRW") {
+ $tdcolor="style='background-color: $Header::colourwg; color: white;'";
+ return;
}elsif($val =~ /^(.*?)\/(.*?)$/){
my ($sip,$scidr) = split ("/",$val);
if ( &Header::orange_used() && &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
}
}
}
+
+ # WireGuard Roadwarrior
+ if ($Wireguard::settings{'CLIENT_POOL'}) {
+ if (&Network::ip_address_in_network($c, $Wireguard::settings{'CLIENT_POOL'})) {
+ $tdcolor="style='background-color: $Header::colourwg; color:white;'";
+ return;
+ }
+ }
}
#VPN networks
if ($nettype eq 'ovpn_n2n_src' || $nettype eq 'ovpn_n2n_tgt' || $nettype eq 'ovpn_net_src' || $nettype eq 'ovpn_net_tgt'|| $nettype eq 'ovpn_host_src' || $nettype eq 'ovpn_host_tgt'){
$tdcolor="style='background-color: $Header::colourvpn;color:white;'";
return;
}
+
#ALIASE
foreach my $alias (sort keys %aliases)
{
$tdcolor="<font style='color: $Header::colourred;'>$c</font>";
return $tdcolor;
}
+
+ # 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 N2N subnet
foreach my $key (sort keys %ccdhost){
if ($ccdhost{$key}[3] eq 'net'){
&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";
}
'wg peer configuration' => 'Peer Configuration',
'wg peer does not exist' => 'Peer does not exist',
'wg pre-shared key (optional)' => 'Pre-Shared Key (optional)',
+'wg rw peers' => 'WireGuard Roadwarrior Peers',
'wg scan the qr code' => 'Scan the QR code to import the WireGuard configuration into a mobile client.',
'wg warning configuration only shown once' => 'Attention: This WireGuard configuration file will only be shown this one time as it contains private key material that is not being stored on IPFire.',
'whitelisted' => 'Whitelisted',