Add SSH configuration options (#21)

This commit is contained in:
Bethuel Mmbaga
2025-11-24 17:05:03 +03:00
committed by GitHub
parent 52b2b42ef6
commit ef5220a908
4 changed files with 64 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
PORTNAME= netbird
DISTVERSIONPREFIX= v
DISTVERSION= 0.60.0
DISTVERSION= 0.60.2
CATEGORIES= security net net-vpn
MAINTAINER= hakan.external@netbird.io
@@ -132,6 +132,62 @@
</description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable Root Login</fielddescr>
<fieldname>enablesshroot</fieldname>
<description>
<![CDATA[
Allow root user login
]]>
</description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable SFTP</fielddescr>
<fieldname>enablesshsftp</fieldname>
<description>
<![CDATA[
Enable SFTP subsystem for file transfers
]]>
</description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable Local Port Forwarding</fielddescr>
<fieldname>enablesshlocalportfwd</fieldname>
<description>
<![CDATA[
Allow clients to forward local ports through the server
]]>
</description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable Remote Port Forwarding</fielddescr>
<fieldname>enablesshremoteportfwd</fieldname>
<description>
<![CDATA[
Allow clients to request remote port forwarding
]]>
</description>
<type>checkbox</type>
</field>
<field>
<fielddescr>Enable SSH Authentication</fielddescr>
<fieldname>enablesshauth</fieldname>
<description>
<![CDATA[
Enable JWT authentication for SSH connections
]]>
</description>
<sethelp>
<![CDATA[
When disabled, allows any peer with network access
]]>
</sethelp>
<type>checkbox</type>
<default_value>on</default_value>
</field>
<field>
<name>DNS</name>
@@ -45,6 +45,11 @@ function netbird_resync_config()
$config_map = [
'enablessh' => ['ServerSSHAllowed', true],
'enablesshroot' => ['EnableSSHRoot', true],
'enablesshsftp' => ['EnableSSHSFTP', true],
'enablesshlocalportfwd' => ['EnableSSHLocalPortForwarding', true],
'enablesshremoteportfwd' => ['EnableSSHRemotePortForwarding', true],
'enablesshauth' => ['DisableSSHAuth', false],
'blockinboundconn' => ['BlockInbound', true],
'allowfirewallconfig' => ['DisableFirewall', false],
'enabledns' => ['DisableDNS', false],
@@ -82,6 +87,7 @@ function netbird_validate_input($post, &$input_errors)
if (!empty($wireguard_port) && (!ctype_digit($wireguard_port) || !is_port($wireguard_port))){
$input_errors[] = sprintf(gettext('WireGuard port (%s) is not a valid port.'), $wireguard_port);
}
}
function netbird_is_connected(): bool
+1 -1
View File
@@ -1,5 +1,5 @@
PORTNAME= pfSense-pkg-NetBird
PORTVERSION= 0.1.0
PORTVERSION= 0.2.0
CATEGORIES= security
MASTER_SITES= # empty
DISTFILES= # empty