WARNING: untranslated string: smb daemon = SMB Daemon
WARNING: untranslated string: subscription code = Subscription code
WARNING: untranslated string: user management = User Management
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
WARNING: untranslated string: website = Website
WARNING: untranslated string: wednesday = Wednesday
WARNING: untranslated string: weeks = Weeks
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: total = Total
WARNING: untranslated string: transport mode does not support vti = VTI is not support in transport mode
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
WARNING: untranslated string: total = Total
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
WARNING: untranslated string: vulnerability = Vulnerability
WARNING: untranslated string: vulnerable = Vulnerable
WARNING: untranslated string: warning = Warning
+WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
WARNING: untranslated string: wg client pool = Client Pool
WARNING: untranslated string: wg create peer = Create A New Peer
WARNING: untranslated string: wg edit peer = Edit Peer
WARNING: untranslated string: wg name is already used = The name is already in use
WARNING: untranslated string: wg no local subnets = No local subnets given
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 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: whois results from = WHOIS results from
WARNING: untranslated string: winbind daemon = Winbind Daemon
< user management
< vpn configuration main
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< winbind daemon
< wireguard
< wlanap 802.11w disabled
< transport mode does not support vti
< warning
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< wireguard
< wlanap
< upload fcdsl.o
< warning
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< wireguard
< wlanap hide ssid
< warning
< Weekly
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< whois results from
< winbind daemon
< warning
< Weekly
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< whois results from
< winbind daemon
< warning
< Weekly
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< whois results from
< winbind daemon
< week-graph
< Weekly
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< whois results from
< winbind daemon
< warning
< Weekly
< wg
+< wg client configuration file
< wg client pool
< wg create peer
< wg edit peer
< wg name is already used
< wg no local subnets
< wg no remote subnets
+< wg peer configuration
< wg peer does not exist
< wg pre-shared key (optional)
+< wg warning configuration only shown once
< whitelisted
< whois results from
< winbind daemon
} elsif ($cgiparams{"ACTION"} eq "SAVE-PEER-HOST") {
my @local_subnets = ();
+ my $private_key;
# Fetch or allocate a new key
my $key = $cgiparams{'KEY'} || &General::findhasharraykey(\%peers);
# If there are any errors, we go back to the editor
goto EDITHOST if (scalar @errormessages);
- # Fetch some configuration parts
- if (exists $peers{$key}) {
- $cgiparams{"PUBLIC_KEY"} = $peers{$key}[3];
- $cgiparams{"PSK"} = $peers{$key}[9];
+ # Is this a new connection?
+ my $is_new = !exists $peers{$key};
- # Set some things if we are creating a new peer
- } else {
+ # Generate things for a new peer
+ if ($is_new) {
# Generate a new private key
- my $private_key = &generate_private_key();
+ $private_key = &generate_private_key();
# Derive the public key
$cgiparams{"PUBLIC_KEY"} = &derive_public_key($private_key);
# Generate a new PSK
$cgiparams{"PSK"} = &generate_private_key();
+
+ # Fetch some configuration parts
+ } else {
+ $cgiparams{"PUBLIC_KEY"} = $peers{$key}[3];
+ $cgiparams{"PSK"} = $peers{$key}[9];
}
# Save the connection
&General::system("/usr/local/bin/wireguardctrl", "reload");
}
+ # Show the client configuration when creating a new peer
+ &show_peer_configuration($key, $private_key) if ($is_new);
+
} elsif ($cgiparams{"ACTION"} eq $Lang::tr{'add'}) {
if ($cgiparams{"TYPE"} eq "net") {
goto EDITNET;
exit(0);
+sub show_peer_configuration($$) {
+ my $key = shift;
+ my $private_key = shift;
+
+ # Send HTTP Headers
+ &Header::showhttpheaders();
+
+ # Open the page
+ &Header::openpage($Lang::tr{'wireguard'}, 1, '');
+
+ # Load the configuration
+ my %peer = (
+ "NAME" => $peers{$key}[2],
+ "PUBLIC_KEY" => $peers{$key}[3],
+ "CLIENT_ADDRESS" => $peers{$key}[6],
+ "LOCAL_SUBNETS" => &decode_subnets($peers{$key}[8]),
+ "PSK" => $peers{$key}[9],
+
+ # Other stuff
+ "PRIVATE_KEY" => $private_key,
+ );
+
+ # Generate the client configuration
+ my $config = &generate_client_configuration(\%peer);
+
+ # Open a new box
+ &Header::openbox('100%', '', "$Lang::tr{'wg peer configuration'}: $peer{'NAME'}");
+
+ print <<END;
+ <h6>$Lang::tr{'wg client configuration file'}</h6>
+
+ <code><pre>$config</textarea></code>
+END
+
+ &Header::closebox();
+
+ # Show a note that this configuration cannot be shown again
+ &Header::errorbox((
+ $Lang::tr{'wg warning configuration only shown once'},
+ ));
+
+ &Header::closepage();
+
+ exit(0);
+}
+
# This function generates a set of keys for this host if none exist
sub generate_keys($) {
my $force = shift || 0;
# No match found
return 0;
}
+
+sub generate_client_configuration($) {
+ my $peer = shift;
+
+ my @conf = (
+ "[Interface]",
+ "PrivateKey = $peer->{'PRIVATE_KEY'}",
+ "Address = $peer->{'CLIENT_ADDRESS'}",
+ "",
+
+ "[Peer]",
+ "Endpoint = $General::main{'HOSTNAME'}.$General::main{'DOMAINNAME'}",
+ "PublicKey = $settings{'PUBLIC_KEY'}",
+ "PresharedKey = $peer->{'PSK'}",
+ "AllowedIPs = $peer->{'LOCAL_SUBNETS'}",
+ "PersistentKeepalive = $DEFAULT_KEEPALIVE",
+ );
+
+ return join("\n", @conf);
+}
'weekly firewallhits' => 'weekly firewallhits',
'weeks' => 'Weeks',
'wg' => 'WireGuard',
+'wg client configuration file' => 'WireGuard Client Configuration File',
'wg client pool' => 'Client Pool',
'wg create peer' => 'Create A New Peer',
'wg edit peer' => 'Edit Peer',
'wg name is already used' => 'The name is already in use',
'wg no local subnets' => 'No local subnets given',
'wg no remote subnets' => 'No remote subnets given',
+'wg peer configuration' => 'Peer Configuration',
'wg peer does not exist' => 'Peer does not exist',
'wg pre-shared key (optional)' => 'Pre-Shared Key (optional)',
+'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',
'whois results from' => 'WHOIS results from',
'wildcards' => 'Wildcards',