mirror of
https://github.com/webmin/webmin.git
synced 2026-05-06 15:20:29 +01:00
Fix nftables and firewall modules title for consistency and clarity
* Note: Rename legacy iptables firewalls and make nftables the Linux Firewall
This commit is contained in:
@@ -19,7 +19,8 @@ $subhead = $text{"index_title_v${ipvx}"};
|
||||
if ($ipvx_save) {
|
||||
$subhead .= ", ".&text('index_editing', "<tt>$ipvx_save</tt>");
|
||||
}
|
||||
&ui_print_header($subhead, $text{'index_title'}, undef,
|
||||
my $title = $ipvx_version == 6 ? $text{'index_title6'} : $text{'index_title'};
|
||||
&ui_print_header($subhead, $title, undef,
|
||||
"intro", 1, 1, 0,
|
||||
&help_search_link("ip${ipvx}tables", "man", "doc"));
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
index_title=Linux IPTables Firewall
|
||||
index_title=Linux Firewall (iptables)
|
||||
index_title6=Linux Firewall (ip6tables)
|
||||
index_title_v=IPv4 Firewall
|
||||
index_title_v6=IPv6 Firewall
|
||||
index_position=Showing rules $1 to $2 of $3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name=Firewall
|
||||
desc=Linux Firewall
|
||||
desc=Linux Firewall (iptables)
|
||||
os_support=*-linux
|
||||
category=net
|
||||
longdesc=Configure a Linux firewall using iptables. Allows the editing of all tables, chains, rules and options.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
desc=Linux IPv6 Firewall
|
||||
desc=Linux Firewall (ip6tables)
|
||||
category=net
|
||||
longdesc=Configure a Linux firewall using ip6tables. Allows the editing of all tables, chains, rules and options.
|
||||
name=Firewall6
|
||||
|
||||
@@ -6,6 +6,6 @@ before_cmd=Command to run before changing rules,3,None
|
||||
after_cmd=Command to run after changing rules,3,None
|
||||
before_apply_cmd=Command to run before applying configuration,3,None
|
||||
after_apply_cmd=Command to run after applying configuration,3,None
|
||||
line2=NFTables configuration,11
|
||||
line2=nftables configuration,11
|
||||
nft_cmd=Full path to nft command,0
|
||||
save_file=File to save/edit NFTables rules,3,Use operating system or Webmin default
|
||||
save_file=File to save/edit nftables rules,3,Use operating system or Webmin default
|
||||
|
||||
@@ -14,7 +14,7 @@ if (!$can_view_saved && !check_acl('active') && !check_acl('create') &&
|
||||
}
|
||||
my $partial = $in{'partial'};
|
||||
if (!$partial) {
|
||||
ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1,
|
||||
ui_print_header(nft_version_text(), $text{'index_title'}, "", "intro", 1, 1,
|
||||
undef, restart_button());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
index_title=NFTables Firewall
|
||||
index_title=Linux Firewall
|
||||
index_version=nftables version $1
|
||||
index_tab_chains=Chains
|
||||
index_tab_sets=Sets
|
||||
index_editing=Rules file $1
|
||||
index_ecommand=The NFTables command $1 was not found on your system.
|
||||
index_ekernel=An error occurred checking your current NFTables configuration: $1
|
||||
index_header=Existing NFTables Rules
|
||||
index_ecommand=The nftables command $1 was not found on your system.
|
||||
index_ekernel=An error occurred checking your current nftables configuration: $1
|
||||
index_header=Existing nftables rules
|
||||
index_change=Selected table
|
||||
index_table_filter=Packet filtering
|
||||
index_table_nat=Network address translation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name=Nftables
|
||||
desc=NFTables Firewall
|
||||
desc=Linux Firewall
|
||||
os_support=*-linux
|
||||
category=net
|
||||
longdesc=Configure a Linux firewall using NFTables. Allows the editing of all tables, chains, and rules.
|
||||
longdesc=Configure a Linux firewall using nftables. Allows the editing of tables, chains, sets, and rules.
|
||||
|
||||
@@ -147,6 +147,25 @@ my $cmd = $config{'nft_cmd'} || "nft";
|
||||
return has_command($cmd);
|
||||
}
|
||||
|
||||
# nft_version_text()
|
||||
# Returns a friendly nftables version string for page subtitles
|
||||
sub nft_version_text
|
||||
{
|
||||
my $cmd = get_nft_command();
|
||||
return undef if (!$cmd);
|
||||
my $out = backquote_command(quotemeta($cmd)." --version 2>&1");
|
||||
return undef if ($? || !$out);
|
||||
$out =~ s/\r?\n.*$//s;
|
||||
$out =~ s/^\s+|\s+$//g;
|
||||
if ($out =~ /^nftables\s+v?(\S+)(?:\s+(.*))?$/i) {
|
||||
my $details = $2 || "";
|
||||
$details =~ s/^\s+|\s+$//g;
|
||||
return text('index_version',
|
||||
$1.($details ne "" ? " ".$details : ""));
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
# check_nftables()
|
||||
# Returns an error message if nftables is not installed, undef if all is OK
|
||||
sub check_nftables
|
||||
|
||||
Reference in New Issue
Block a user