###############################################################################
-# This file is part of the IPCop Firewall. #
# #
-# IPCop is free software; you can redistribute it and/or modify #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# #
+# This program 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 #
+# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
-# IPCop is distributed in the hope that it will be useful, #
+# This program 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> #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
include Config
+VER = ipfire
+
THISAPP = configroot
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
@$(PREBUILD)
# Create all directories
- for i in addon-lang alcatelusb auth backup backup/sets ca certs cnx_pci connscheduler crls ddns dhcp dhcpc dmzholes \
- eagle-usb eciadsl ethernet isdn key langs logging main mbmon modem net-traffic nfs optionsfw outgoing patches pakfire portfw \
- ppp private proxy/advanced qos/bin red remote snort time urlfilter/autoupdate urlfilter/bin vpn wakeonlan wireless xtaccess ; do \
+ for i in addon-lang auth backup ca certs connscheduler crls ddns dhcp dhcpc dmzholes dns \
+ ethernet extrahd/bin fwlogs isdn key langs logging mac main menu.d modem net-traffic \
+ net-traffic/templates nfs optionsfw outgoing/bin outgoing/groups outgoing/groups/ipgroups \
+ outgoing/groups/macgroups ovpn patches pakfire portfw ppp private proxy/advanced/cre \
+ proxy/calamaris/bin qos/bin red remote sensors snort time tripwire/report \
+ updatexlrator/bin updatexlrator/autocheck urlfilter/autoupdate urlfilter/bin upnp vpn \
+ wakeonlan wireless xtaccess ; do \
mkdir -p $(CONFIG_ROOT)/$$i; \
done
# Touch empty files
for i in auth/users backup/include.user backup/exclude.user \
certs/index.txt ddns/config ddns/noipsettings ddns/settings ddns/ipcache dhcp/settings \
- dhcp/fixleases dhcp/advoptions dmzholes/config ethernet/aliases ethernet/settings \
- isdn/settings main/hosts main/settings optionsfw/settings outgoing/settings outgoing/rules pakfire/settings \
- portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
- ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
- snort/settings vpn/config vpn/settings vpn/ipsec.conf \
+ dhcp/fixleases dhcp/advoptions dhcp/dhcpd.conf.local dmzholes/config dns/settings ethernet/aliases ethernet/settings ethernet/known_nics ethernet/scanned_nics \
+ extrahd/scan extrahd/devices extrahd/partitions extrahd/settings fwlogs/ipsettings fwlogs/portsettings \
+ isdn/settings mac/settings main/disable_nf_sip main/hosts main/routing main/settings net-traffic/settings optionsfw/settings outgoing/settings outgoing/rules \
+ ovpn/ccd.conf ovpn/ccdroute ovpn/ccdroute2 pakfire/settings portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
+ ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings proxy/advanced/cre/enable remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
+ qos/tosconfig snort/settings tripwire/settings upnp/settings vpn/config vpn/settings vpn/ipsec.conf \
vpn/ipsec.secrets vpn/caconfig wakeonlan/clients.conf wireless/config wireless/settings; do \
touch $(CONFIG_ROOT)/$$i; \
done
cp $(DIR_SRC)/config/cfgroot/general-functions.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/lang.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/countries.pl $(CONFIG_ROOT)/
+ cp $(DIR_SRC)/config/cfgroot/graphs.pl $(CONFIG_ROOT)/
cp $(DIR_SRC)/config/cfgroot/advoptions-list $(CONFIG_ROOT)/dhcp/advoptions-list
- cp $(DIR_SRC)/config/cfgroot/backup-exclude $(CONFIG_ROOT)/backup/exclude.system
- cp $(DIR_SRC)/config/cfgroot/backup-include $(CONFIG_ROOT)/backup/include.system
- cp $(DIR_SRC)/config/cfgroot/backup-exclude.hardware $(CONFIG_ROOT)/backup/exclude.hardware
cp $(DIR_SRC)/config/cfgroot/connscheduler-lib.pl $(CONFIG_ROOT)/connscheduler/lib.pl
cp $(DIR_SRC)/config/cfgroot/connscheduler.conf $(CONFIG_ROOT)/connscheduler
- cp $(DIR_SRC)/config/cfgroot/mbmon-settings $(CONFIG_ROOT)/mbmon/settings
+ cp $(DIR_SRC)/config/extrahd/* $(CONFIG_ROOT)/extrahd/bin/
+ cp $(DIR_SRC)/config/cfgroot/sensors-settings $(CONFIG_ROOT)/sensors/settings
+ cp $(DIR_SRC)/config/menu/* $(CONFIG_ROOT)/menu.d/
cp $(DIR_SRC)/config/cfgroot/modem-defaults $(CONFIG_ROOT)/modem/defaults
cp $(DIR_SRC)/config/cfgroot/modem-settings $(CONFIG_ROOT)/modem/settings
cp $(DIR_SRC)/config/cfgroot/net-traffic-lib.pl $(CONFIG_ROOT)/net-traffic/net-traffic-lib.pl
+ cp $(DIR_SRC)/config/cfgroot/net-traffic-admin.pl $(CONFIG_ROOT)/net-traffic/net-traffic-admin.pl
cp $(DIR_SRC)/config/cfgroot/nfs-server $(CONFIG_ROOT)/nfs/nfs-server
cp $(DIR_SRC)/config/cfgroot/p2protocols $(CONFIG_ROOT)/outgoing/p2protocols
+ cp $(DIR_SRC)/config/outgoingfw/outgoingfw.pl $(CONFIG_ROOT)/outgoing/bin/
+ cp $(DIR_SRC)/config/outgoingfw/defaultservices $(CONFIG_ROOT)/outgoing/
cp $(DIR_SRC)/config/cfgroot/proxy-acl $(CONFIG_ROOT)/proxy/acl-1.4
- cp $(DIR_SRC)/config/qos/makeqosscripts.pl $(CONFIG_ROOT)/qos/bin/makeqosscripts.pl
+ cp $(DIR_SRC)/config/qos/* $(CONFIG_ROOT)/qos/bin/
cp $(DIR_SRC)/config/cfgroot/ssh-settings $(CONFIG_ROOT)/remote/settings
cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config
cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings
cp $(DIR_SRC)/config/cfgroot/logging-settings $(CONFIG_ROOT)/logging/settings
cp $(DIR_SRC)/config/cfgroot/useragents $(CONFIG_ROOT)/proxy/advanced
+ cp $(DIR_SRC)/config/cfgroot/ethernet-vlans $(CONFIG_ROOT)/ethernet/vlans
cp $(DIR_SRC)/langs/list $(CONFIG_ROOT)/langs/
# Oneliner configfiles
echo "VPN_DELAYED_START=0" >>$(CONFIG_ROOT)/vpn/settings
echo "01" > $(CONFIG_ROOT)/certs/serial
echo "nameserver 1.2.3.4" > $(CONFIG_ROOT)/ppp/fake-resolv.conf
- echo "DISABLEPING=NO" > $(CONFIG_ROOT)/optionsfw/settings
-
- # Symbolic links
- ln -sf /etc/rc.d/rc.updatered $(CONFIG_ROOT)/dhcpc/dhcpcd.exe
+ echo "DROPNEWNOTSYN=on" >> $(CONFIG_ROOT)/optionsfw/settings
+ echo "DROPINPUT=on" >> $(CONFIG_ROOT)/optionsfw/settings
+ echo "DROPOUTPUT=on" >> $(CONFIG_ROOT)/optionsfw/settings
+ echo "DROPINPUT=on" >> $(CONFIG_ROOT)/optionsfw/settings
+ echo "DROPOUTPUT=on" >> $(CONFIG_ROOT)/optionsfw/settings
+ echo "DROPPORTSCAN=on" >> $(CONFIG_ROOT)/optionsfw/settings
# Modify variables in header.pl
sed -i -e "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" \
$(CONFIG_ROOT)/lang.pl
# Language files
- cp $(DIR_SRC)/langs/de/cgi-bin/de.pl $(CONFIG_ROOT)/langs/
- cp $(DIR_SRC)/langs/en/cgi-bin/en.pl $(CONFIG_ROOT)/langs/
-
+ cp $(DIR_SRC)/langs/*/cgi-bin/*.pl $(CONFIG_ROOT)/langs/
+
# Configroot permissions
chown -R nobody:nobody $(CONFIG_ROOT)
chown root:root $(CONFIG_ROOT)
for i in backup/ header.pl general-functions.pl lang.pl addon-lang/ langs/ red/ ; do \
chown -R root:root $(CONFIG_ROOT)/$$i; \
done
- chown nobody:nobody $(CONFIG_ROOT)/backup/sets
chown root:nobody $(CONFIG_ROOT)/dhcpc
+ # Set outgoingfw.pl executable
+ chmod 755 $(CONFIG_ROOT)/outgoing/bin/outgoingfw.pl
+
@$(POSTBUILD)