From patchwork Sat Mar 21 16:03:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2846 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48l56H30DNz3yBY for ; Sat, 21 Mar 2020 16:03:35 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48l56F3B5Sz1RB; Sat, 21 Mar 2020 16:03:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48l56D6b1dz2yX0; Sat, 21 Mar 2020 16:03:32 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48l56B56cMz2yCC for ; Sat, 21 Mar 2020 16:03:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48l56901Mjz1RB; Sat, 21 Mar 2020 16:03:28 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1584806610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=81I6ZkpUxmav1iYC0pTh9uDRi4JzjXmAXx3zTdpMH6k=; b=EnS4wz1MIBHIypfZncbsPTkTiHTZthANEG5zNFnA9pOzHHiSsS+M3vvg8ISB316GyNBTRS KNTFWJZIeAwX2DCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1584806610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=81I6ZkpUxmav1iYC0pTh9uDRi4JzjXmAXx3zTdpMH6k=; b=ewSWS1xejQN+p8qb8NnAAW7EnCyD/j/k89jJGRhzBXcv2cjJ9d3bVtR38sO4jMX8gn6QxD OrCpzqp7wR46fjrxg3ssZc326IIvPH4tmVMzixT3zCEmDL3Xcak8g3OidTempc0D9akAgG TKnNfbvl43XvsYJqi6Oga/R1MF/aggQV4MaQI2hycqwXkxlAf88sNhpEYuP47a40yNqVsE zTratdWyp0yG2bVSdha5puQf2LPKMiB0rUe1nlrbelg7mjbzgVZ9uVdrWpOiE19+6yQdN1 mgdA8LhdS5RqTp+yvzLsC88kRE4kCmkm6NO732VJYVFpUCv15S5iHowwL3GR5Q== Subject: [PATCH v2] netother.cgi: show content of routing table 220 To: "IPFire: Development-List" References: <45750d21-4ee6-4269-c2b5-56ef4e75c259@ipfire.org> <36253712-E143-4794-84DA-A74562317C38@ipfire.org> <36EB6CA2-AC4A-4FE8-9357-01F8DAF745B4@ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= Message-ID: Date: Sat, 21 Mar 2020 16:03:00 +0000 MIME-Version: 1.0 In-Reply-To: <36EB6CA2-AC4A-4FE8-9357-01F8DAF745B4@ipfire.org> Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Since IPsec routing information do not show up in the normal routing table, also displaying the contents of table 220 on netother.cgi might be useful for debugging purposes. The second version of this patch omits the output if routing table 220 is empty and introduces a custom translation for IPsec routing table entries instead of just adding the table number to the generic translation. Cc: Michael Tremer Signed-off-by: Peter Müller Reviewed-by: Michael Tremer --- html/cgi-bin/netother.cgi | 8 ++++++++ langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 3 files changed, 10 insertions(+) mode change 100644 => 100755 html/cgi-bin/netother.cgi diff --git a/html/cgi-bin/netother.cgi b/html/cgi-bin/netother.cgi old mode 100644 new mode 100755 index dde1b603a..4f03c82e8 --- a/html/cgi-bin/netother.cgi +++ b/html/cgi-bin/netother.cgi @@ -79,6 +79,14 @@ if ( $querry[0] =~ "fwhits"){ print "
$output
\n"; &Header::closebox(); + $output = `/sbin/ip route list table 220`; + if ( $output ) { + &Header::openbox('100%', 'left', $Lang::tr{'ipsec routing table entries'}); + $output = &Header::cleanhtml($output,"y"); + print "
$output
\n"; + &Header::closebox() + } + &Header::openbox('100%', 'left', $Lang::tr{'arp table entries'}); $output = `/sbin/ip neigh show`; $output = &Header::cleanhtml($output,"y"); diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 80579e7cc..6f7b4db59 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1498,6 +1498,7 @@ 'ipsec mode tunnel' => 'Tunnel', 'ipsec network' => 'IPsec-Netzwerk', 'ipsec no connections' => 'Keine aktiven IPsec-Verbindungen', +'ipsec routing table entries' => 'Einträge der IPsec-Routing-Tabelle', 'ipsec settings' => 'IPsec-Einstellungen', 'iptable rules' => 'IPTable-Regeln', 'iptmangles' => 'IPTable Mangles', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index a68c8f411..1e1aed53c 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1547,6 +1547,7 @@ 'ipsec mode tunnel' => 'Tunnel', 'ipsec network' => 'IPsec network', 'ipsec no connections' => 'No active IPsec connections', +'ipsec routing table entries' => 'IPsec Routing Table Entries', 'ipsec settings' => 'IPsec Settings', 'iptable rules' => 'IPTable rules', 'iptmangles' => 'IPTable Mangles',