diff --git a/firewall/index.cgi b/firewall/index.cgi index 6450a0d9b..f260444cb 100755 --- a/firewall/index.cgi +++ b/firewall/index.cgi @@ -19,7 +19,8 @@ $subhead = $text{"index_title_v${ipvx}"}; if ($ipvx_save) { $subhead .= ", ".&text('index_editing', "$ipvx_save"); } -&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")); diff --git a/firewall/lang/en b/firewall/lang/en index d18461251..5c652ddf8 100644 --- a/firewall/lang/en +++ b/firewall/lang/en @@ -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 diff --git a/firewall/module.info b/firewall/module.info index 7faa08216..154663280 100644 --- a/firewall/module.info +++ b/firewall/module.info @@ -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. diff --git a/firewall6/module.info b/firewall6/module.info index 81fbe5246..5e43891f1 100644 --- a/firewall6/module.info +++ b/firewall6/module.info @@ -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 diff --git a/nftables/config.info b/nftables/config.info index e97a45585..028d9adfd 100644 --- a/nftables/config.info +++ b/nftables/config.info @@ -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 diff --git a/nftables/index.cgi b/nftables/index.cgi index e03a4b0f8..cb5af2cae 100755 --- a/nftables/index.cgi +++ b/nftables/index.cgi @@ -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()); } diff --git a/nftables/lang/en b/nftables/lang/en index e9bb275a1..61a60e3b8 100644 --- a/nftables/lang/en +++ b/nftables/lang/en @@ -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 diff --git a/nftables/module.info b/nftables/module.info index 3aeb690fe..3889e80c6 100644 --- a/nftables/module.info +++ b/nftables/module.info @@ -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. diff --git a/nftables/nftables-lib.pl b/nftables/nftables-lib.pl index cda88638a..ce6bbd7ad 100644 --- a/nftables/nftables-lib.pl +++ b/nftables/nftables-lib.pl @@ -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