mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 13:02:58 +02:00
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
This commit is contained in:
@@ -21010,6 +21010,7 @@ home/httpd/cgi-bin/hddgraph.cgi
|
||||
home/httpd/cgi-bin/ids.cgi
|
||||
home/httpd/cgi-bin/index.cgi
|
||||
home/httpd/cgi-bin/ipinfo.cgi
|
||||
home/httpd/cgi-bin/iptables.cgi
|
||||
home/httpd/cgi-bin/fwhits.cgi
|
||||
home/httpd/cgi-bin/ovpnfunc.pl
|
||||
home/httpd/cgi-bin/ovpnmain.cgi
|
||||
@@ -22519,6 +22520,7 @@ sbin/mingetty
|
||||
##
|
||||
## misc-progs
|
||||
##
|
||||
usr/local/bin/getipstat
|
||||
usr/local/bin/installfcdsl
|
||||
usr/local/bin/installpackage
|
||||
usr/local/bin/iowrap
|
||||
|
||||
@@ -9,7 +9,8 @@ SUID_PROGS = setdmzholes setportfw setfilters setxtaccess restartdhcp restartsno
|
||||
ipfirebkcfg ipfirerscfg installpackage installfcdsl ipsecctrl \
|
||||
setaliases ipfirebackup restartntpd \
|
||||
restartapplejuice setdate rebuildhosts \
|
||||
restartsyslogd logwatch openvpnctrl timecheckctrl restartwireless
|
||||
restartsyslogd logwatch openvpnctrl timecheckctrl \
|
||||
restartwireless getipstat
|
||||
|
||||
install : all
|
||||
install -m 755 $(PROGS) /usr/local/bin
|
||||
@@ -80,5 +81,8 @@ ipsecctrl: ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
timecheckctrl: timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
getipstat: getipstat.c setuid.o ../install+setup/libsmooth/varval.o
|
||||
$(COMPILE) -I../install+setup/libsmooth/ getipstat.c setuid.o ../install+setup/libsmooth/varval.o -o $@
|
||||
|
||||
ipfirebackup: ipfirebackup.c setuid.o
|
||||
$(COMPILE) -lcrypt ipfirebackup.c setuid.o -o $@
|
||||
|
||||
27
src/misc-progs/getipstat.c
Normal file
27
src/misc-progs/getipstat.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* IPFire helper program - IPStat
|
||||
*
|
||||
* Get the list from IPTABLES -L
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include "setuid.h"
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (!(initsetuid()))
|
||||
exit(1);
|
||||
|
||||
safe_system("/sbin/iptables -L -v -n > /home/httpd/html/iptables.txt");
|
||||
safe_system("/sbin/iptables -L -v -n -t nat > /home/httpd/html/iptablesnat.txt");
|
||||
safe_system("/sbin/iptables -t mangle -L -v -n > /home/httpd/html/iptablesmangle.txt");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ cd /paks/$1/ROOT && tar cvfz /paks/$1/files.tgz *
|
||||
cd /paks/$1/CONF && tar cvfz /paks/$1/conf.tgz *
|
||||
|
||||
cd /paks/$1 && tar cvfz ../$2.tar.gz files.tgz conf.tgz install.sh uninstall.sh
|
||||
cd .. && md5sum $2.tar.gz >> $2.tar.gz.md5
|
||||
cd .. && md5sum $2.tar.gz > $2.tar.gz.md5
|
||||
|
||||
rm -fr /paks/$1
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ my $rrdlog = "/var/log/rrd";
|
||||
my $graphs = "/home/httpd/html/graphs";
|
||||
$ENV{PATH}="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
|
||||
my $hdd_device = "/dev/harddisk";
|
||||
my $temp = '';
|
||||
|
||||
sub gettraffic {
|
||||
my $interface = $_[0];
|
||||
|
||||
Reference in New Issue
Block a user