'enabled' => 1,
};
$substatus->{'70.hddtemp'} = {
- 'caption' => '$tr{'HDD temperature graphs'}',
+ 'caption' => "$tr{'harddisk temperature graphs'}",
'uri' => '/cgi-bin/hddgraph.cgi',
- 'title' => "$tr{'HDD temperature graphs'}",
+ 'title' => "$tr{'harddisk temperature graphs'}",
'enabled' => 1,
};
$substatus->{'80.connections'} = {
'title' => "$tr{'sstraffic'}",
'enabled' => 1,
};
- $substatus->{'99.iptfilters'} = {
- 'caption' => $tr{'iptfilters iptable rules'},
- 'uri' => '/cgi-bin/iptfilters.cgi',
- 'title' => "$tr{'iptfilters iptable rules'}",
+ $substatus->{'99.iptable'} = {
+ 'caption' => $tr{'iptable rules'},
+ 'uri' => '/cgi-bin/iptables.cgi',
+ 'title' => "$tr{'iptable rules'}",
'enabled' => 1,
};
'caption' => $tr{'aliases'},
'uri' => '/cgi-bin/aliases.cgi',
'title' => "$tr{'aliases'}",
- 'enabled' => 1,
+ 'enabled' => 0,
};
my %subserviceshash = ();
};
if (! blue_used() && ! orange_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'04.dmz'}{'enabled'} = 0;
+ $menu->{'05.firewall'}{'subMenu'}->{'40.dmz'}{'enabled'} = 0;
}
if (! blue_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'03.wireless'}{'enabled'} = 0;
+ $menu->{'05.firewall'}{'subMenu'}->{'30.wireless'}{'enabled'} = 0;
}
if (! $ethsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
- $menu->{'03.network'}{'subMenu'}->{'04.aliases'}{'enabled'} = 0;
+ $menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
}
--- /dev/null
+#!/usr/bin/perl
+#
+# IPFire CGIs
+#
+# This code is distributed under the terms of the GPL
+#
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+
+my @iplines;
+my $lines = 0;
+my @ipmanlines;
+my $manlines = 0;
+my @ipnatlines;
+my $natlines = 0;
+
+system('/usr/local/bin/getipstat');
+
+&Header::showhttpheaders();
+&Header::openpage($Lang::tr{'ipts'}, 1, '');
+&Header::openbigbox('100%', 'LEFT');
+&Header::openbox('100%', 'LEFT', $Lang::tr{'ipts'}.':');
+print <<END
+
+ <DIV align='left'>
+ <PRE>
+END
+;
+ open (FILE, '/home/httpd/html/iptables.txt');
+ while (<FILE>)
+ {
+ $iplines[$lines] = $_;
+ $lines++;
+ }
+ close (FILE);
+ foreach $_ (@iplines) {
+ print "$_"; }
+
+print <<END
+ </PRE>
+ </DIV>
+ <BR>
+
+END
+;
+&Header::closebox();
+
+## MANGLE
+&Header::openbox('100%', 'LEFT', $Lang::tr{'iptmangles'}.':');
+print <<END
+
+ <DIV align='left'>
+ <PRE>
+END
+;
+ open (FILEMAN, '/home/httpd/html/iptablesmangle.txt');
+ while (<FILEMAN>)
+ {
+ $ipmanlines[$manlines] = $_;
+ $manlines++;
+ }
+ close (FILEMAN);
+ foreach $_ (@ipmanlines) {
+ print "$_"; }
+
+print <<END
+ </PRE>
+ </DIV>
+ <BR>
+
+END
+;
+&Header::closebox();
+
+## NAT
+&Header::openbox('100%', 'LEFT', $Lang::tr{'iptnats'}.':');
+print <<END
+
+ <DIV align='left'>
+ <PRE>
+END
+;
+ open (FILENAT, '/home/httpd/html/iptablesnat.txt');
+ while (<FILENAT>)
+ {
+ $ipnatlines[$natlines] = $_;
+ $natlines++;
+ }
+ close (FILENAT);
+ foreach $_ (@ipnatlines) {
+ print "$_"; }
+
+print <<END
+ </PRE>
+ </DIV>
+ <BR>
+
+END
+;
+&Header::closebox();
+&Header::closebigbox();
+&Header::closepage();
'harddisk temperature' => 'Festplattentemperatur',
'harddisk temperature graphs' => 'Festplattentemperatur-Diagramme',
'hdd temperature in' => 'Festplattentemperatur in',
+'ipts' => 'IPTables',
+'iptable rules' => 'IPTable-Regeln',
+'iptmangles' => 'IPTable Mangles',
+'iptnats' => 'IPTable Network Address Translation',
);
'harddisk temperature' => 'Harddisk temperature',
'harddisk temperature graphs' => 'harddisk temperature graphs',
'hdd temperature in' => 'Harddisk temperature in',
+'ipts' => 'IPTables',
+'iptable rules' => 'IPTable rules',
+'iptmangles' => 'IPTable Mangles',
+'iptnats' => 'IPTable Network Address Translation',
);
+++ /dev/null
-###############################################################################
-# This file is part of the IPCop Firewall. #
-# #
-# IPCop is free software; you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation; either version 2 of the License, or #
-# (at your option) any later version. #
-# #
-# IPCop is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with IPCop; if not, write to the Free Software #
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
-# #
-# Makefiles are based on LFSMake, which is #
-# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
-# #
-# Modifications by: #
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
-# - Modified Makefile for IPCop build #
-# #
-# $Id: ntp,v 1.6.2.3 2005/02/05 15:38:15 gespinasse Exp $
-# #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER = 2.2.9
-
-THISAPP = postfix-$(VER)
-DL_FILE = $(THISAPP).tar.gz
-DL_FROM = ftp://netmirror.org/postfix.org/official
-DIR_APP = $(DIR_SRC)/$(THISAPP)
-TARGET = $(DIR_INFO)/$(THISAPP)
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE)
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-
-$(DL_FILE)_MD5 = be78631bd9b6bf7735e43abfa54d69f6
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-md5 : $(subst %,%_MD5,$(objects))
-
-dist:
- make-packages.sh postfix $(THISAPP)-ipfire-beta-1
-
-###############################################################################
-# Downloading, checking, md5sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
- @$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
- @$(LOAD)
-
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
- @$(PREBUILD)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && make -f Makefile.init makefiles \
- 'CCARGS=-DDEF_DAEMON_DIR=\"/usr/lib/postfix\" -DDEF_MANPAGE_DIR=\"/usr/share/man\" -DUSE_TLS -DUSE_SALS_AUTH -DHAS_PGSQL -I/usr/include/openssl -DHAS_MYSQL -I/opt/lampp/include/mysql -I/usr/include/sasl -I/opt/lampp/include' \
- 'AUXLIBS=-L/usr/lib -L/opt/lampp/lib/mysql -L/opt/lampp/lib -lmysqlclient -lz -lm -lssl -lsasl2 -lcrypto -lpq'
- cd $(DIR_APP) && make
- cd $(DIR_APP) && sh postfix-install -non-interactive
- cp -v /usr/src/config/etc/aliases /etc/aliases
- cd /etc/ && postmap aliases
- @rm -rf $(DIR_APP)
- @$(POSTBUILD)
\ No newline at end of file
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
-# Modifications by: #
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
-# - Modified Makefile for IPCop build #
-# #
-# $Id: procps,v 1.4.2.4 2005/07/10 16:01:33 franck78 Exp $
-# #
###############################################################################
###############################################################################
THISAPP = procps-$(VER)
DL_FILE = $(THISAPP).tar.gz
-DL_FROM = http://procps.sf.net
+DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
THISAPP = sudo-$(VER)
DL_FILE = $(THISAPP).tar.gz
-DL_FROM = http://www.courtesan.com/sudo/dist
+DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
md5 : $(subst %,%_MD5,$(objects))
-dist:
- make-packages.sh sudo $(THISAPP)-ipfire-beta-1
-
###############################################################################
# Downloading, checking, md5sum
###############################################################################
ipfiredist() {
if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then
- if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then
+# if [ ! `ls -w1 $BASEDIR/packages/*.tar.gz | grep $1` ]; then
echo "`date -u '+%b %e %T'`: Packaging $1" | tee -a $LOGFILE
cp -f $BASEDIR/src/scripts/make-packages.sh $BASEDIR/build/usr/local/bin
chroot $LFS /tools/bin/env -i HOME=/root \
if [ $? -ne 0 ]; then
exiterror "Packaging $1"
fi
- else
- echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
- fi
+# else
+# echo "`date -u '+%b %e %T'`: Packaging: The package $1 already exists"
+# fi
else
exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1"
fi
ipfiredist lame
ipfiredist libtiff
ipfiredist libxml2
- ipfiredist mc
ipfiredist ntop
ipfiredist postfix
ipfiredist pwlib
ipfiredist samba
- ipfiredist sane
- ipfiredist spandsp
- ipfiredist sudo
ipfiredist xampp
ipfiredist xinetd
test -d $BASEDIR/packages || mkdir $BASEDIR/packages
;;
sync)
echo -e "Syncing Cache to FTP:"
- echo -ne "Password for mirror.ipfire.org: "; read PASS
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
rm -f doc/packages-to-remove-from-ftp
ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/source/ > ftplist
for i in `ls -w1 cache/`; do
;;
pub-iso)
echo -e "Upload the ISO to the beta-mirror!"
- echo -ne "Password for mirror.ipfire.org: "; read PASS
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
ncftpls -u web3 -p $PASS ftp://mirror.ipfire.org/html/source-packages/beta/ | grep `svn info | grep Revision | cut -c 11-`
if [ "$?" -eq "1" ]; then
cp $BASEDIR/ipfire-install-1.4.i386.iso $BASEDIR/ipfire-install-1.4.i386-r`svn info | grep Revision | cut -c 11-`.iso
;;
pub-paks)
echo -e "Upload the packages to the beta-mirror!"
- echo -ne "Password for mirror.ipfire.org: "; read PASS
+ if [ -f .pass ]; then
+ PASS="`cat .pass`"
+ else
+ echo -ne "Password for mirror.ipfire.org: "; read PASS
+ fi
ncftpput -z -u web3 -p $PASS mirror.ipfire.org /html/source-packages/packages/ packages/*
if [ "$?" -eq "0" ]; then
echo -e "The packages were successfully uploaded to the ftp server."
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
##
## misc-progs
##
+usr/local/bin/getipstat
usr/local/bin/installfcdsl
usr/local/bin/installpackage
usr/local/bin/iowrap
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
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 $@
--- /dev/null
+/* 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;
+}
+
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
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];