Commit Graph

12 Commits

Author SHA1 Message Date
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Robin Roevens
8b68ed1226 misc-progs: getipstat: Refactor + extend
* Return output of iptables directly instead of writing it to files.
 * Make iptables wait for 5s if xtables is locked by another iptables
 process. (--wait 5 argument)
 * Add optional parameter "-x" to have iptables report exact numbers.
 * Add optional parameter "-f" to display  the filter table  (default).
 * Add optional parameter "-n" to display the nat table.
 * Add optional parameter "-m" to display the mangle table.
  * Adapt iptables.cgi and guardian.cgi to catch getipstat output
  instead of reading temp-files.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-04 14:27:27 +00:00
Matthias Fischer
77cdccf4c0 BUG 11318: Fix deletion of temporary files from IPTables-GUI
For details see:
https://bugzilla.ipfire.org/show_bug.cgi?id=11318

Temporary files for 'iptables', 'iptablesmangle' and 'iptablesnat' created by
'iptables.cgi' were not deleted after use but stayed in '/srv/weg/ipfire/html/'.

As a workaround I changed 'getipstat.c' to create these files in '/var/tmp' and the
"open (file..." and "rm" commands in 'iptables.cgi'.

Works here.

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-04-18 11:22:18 +01:00
Matthias Fischer
58c2333bdc iptables.cgi: cosmetics - wider columns
Hi,

Since the first three columns of 'iptables.cgi' gave a nearly unreadable output
with large numbers, so I made 'pkts', 'bytes' and 'target'-columns a bit wider.

BEFORE - it was something like this:

Chain INPUT (policy DROP 0 packets, 0 bytes)
  pkts bytestarget        proc opt in     out source    destination
  32M38G    BADTCP        tcp  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M38G    CUSTOMINPUT   all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M38G    P2PBLOCK      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M38G    GUARDIAN      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  00        OVPNBLOCK     all  --  tun+   *   0.0.0.0/0 0.0.0.0/0
  32M38G    IPTVINPUT     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M38G    ICMPINPUT     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M38G    LOOPBACK      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  21M21G    CONNTRACK     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  393873484KDHCPGREENINPUTall  --  green0 *   0.0.0.0/0 0.0.0.0/0
  645153642KGEOIPBLOCK    all  --  *      *   0.0.0.0/0 0.0.0.0/0
  386592304KIPSECINPUT    all  --  *      *   0.0.0.0/0 0.0.0.0/0
  386592304KGUIINPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  368332209KWIRELESSINPUT all  --  *      *   0.0.0.0/0 0.0.0.0/0 ctstate NEW
  368332209KOVPNINPUT     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  368332209KTOR_INPUT     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  368332209KINPUTFW       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  309641833KREDINPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  309641833KPOLICYIN      all  --  *      *   0.0.0.0/0 0.0.0.0/0

AFTER - somehow better readable - I think: ;-)

Chain INPUT (policy DROP 0 packets, 0 bytes)
  pkts  bytes target         proc opt in     out source    destination
  32M   38G   BADTCP         tcp  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M   38G   CUSTOMINPUT    all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M   38G   P2PBLOCK       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M   38G   GUARDIAN       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  0     0     OVPNBLOCK      all  --  tun+   *   0.0.0.0/0 0.0.0.0/0
  32M   38G   IPTVINPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M   38G   ICMPINPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  32M   38G   LOOPBACK       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  21M   21G   CONNTRACK      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  39387 3484K DHCPGREENINPUT all  --  green0 *   0.0.0.0/0 0.0.0.0/0
  64515 3642K GEOIPBLOCK     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  38659 2304K IPSECINPUT     all  --  *      *   0.0.0.0/0 0.0.0.0/0
  38659 2304K GUIINPUT       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  36833 2209K WIRELESSINPUT  all  --  *      *   0.0.0.0/0 0.0.0.0/0 ctstate NEW
  36833 2209K OVPNINPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  36833 2209K TOR_INPUT      all  --  *      *   0.0.0.0/0 0.0.0.0/0
  36833 2209K INPUTFW        all  --  *      *   0.0.0.0/0 0.0.0.0/0
  30964 1833K REDINPUT       all  --  *      *   0.0.0.0/0 0.0.0.0/0
  30964 1833K POLICYIN       all  --  *      *   0.0.0.0/0 0.0.0.0/0

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-10-10 12:03:51 +01:00
Alf Høgemark
52ee27b200 iptables.cgi: htmlcleanup, change html tags from uppercase to lowercase 2014-02-15 15:51:41 +01:00
Christian Schmidt
51d002bdef Fixed the missing display of the last chains in the tables. 2010-05-02 22:18:12 +02:00
Christian Schmidt
1ddefbbdc8 Rewritten the iptables cgi, fixes bug #578 2010-03-11 20:46:37 +01:00
ms
70df830214 Ein Paar Dateien fuer die GPLv3 angepasst.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@853 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-29 13:25:32 +00:00
ms
55b4c7edc1 Bootscripte an den IPFire angepasst.
Ramdisk bearbeitet und Diskettenimages entfernt.
PCMCIA-Utils entfernt.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@381 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-01-06 12:55:49 +00:00
ms
f0ca8c34a1 Hinzugefügt:
* Consolenprogramme erscheinen nun in Farbe statt in S/W.
  * MC in die ISO gepackt.
  * Pakete für amavisd, nmap, nfs, mailx und spamassassin erstellt.
Geändert:
  * IMAP-Ordnerstrukturen des Cyrus-IMAPd angelegt mit richtigen Rechten.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@180 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-20 18:31:22 +00:00
ms
483f59cd33 Hinzugefügt:
* Asterisk-Konfigurationsdateien fürs Webinterface.
  * Funktionierender Packager.
  * CUPS-Paket
Geändert:
  * Postfix ohne PostgreSQL


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@177 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-14 17:35:12 +00:00
ms
a68fedca8f Hinzugefügt:
* IPTables ins Webinterface - Muss der Benne nochmal drüberkucken!
Geändert:
  * Blinde Datei oh323 gelöscht.
  * Kein sudo-Paket mehr, da bereits in ISO.
  * makegraphs gefixt wegen hddtemp
  * Menü im Webinterface wieder einmal bearbeitet.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@171 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-12 15:00:19 +00:00