Commit Graph

302 Commits

Author SHA1 Message Date
Costa Tsaousis (ktsaou)
9b8c5c93e3 added check of iptables-restore command 2013-10-10 01:46:35 +03:00
Costa Tsaousis (ktsaou)
77c4a8a45e updated ident 2013-10-05 04:18:01 +03:00
Costa Tsaousis (ktsaou)
ae235d6500 fixed debug mode when fast activating 2013-09-28 12:16:56 +03:00
box@home root
502d70231c redesigned fast activation 2013-09-28 12:03:57 +03:00
box@home root
a934778b83 replaced sed and tr commands with variables 2013-09-26 23:10:00 +03:00
Costa Tsaousis (ktsaou)
31abff337a added support for fast activation 2013-09-26 02:50:30 +03:00
ktsaou
83d96d89ce Removed depedency to get-iana.sh
It is not usefull any more.
2013-01-06 23:49:08 +00:00
ktsaou
9d08b544d6 Updated blackist command so that it does not lead to timeouts when an internal host is trying to reach a blacklisted host. 2013-01-06 23:26:04 +00:00
ktsaou
af8e017fc9 Updated RESERVED_IPS 2010-10-05 21:10:08 +00:00
ktsaou
b93042939c Removed unnecessary quotes from logs. 2010-04-08 22:27:18 +00:00
ktsaou
79971c77cd Added service:
sane
2010-04-08 22:16:03 +00:00
ktsaou
401106b7fa Added services:
ipsecnatt
l2tp
2010-04-08 22:12:35 +00:00
ktsaou
0902549b0f Fixed bug: 2873689
Mispelled server_yppasswdd.
2010-04-08 21:55:07 +00:00
ktsaou
13ab79b2da Added support for NFLOG as requested per patch 2954470. 2010-04-08 21:51:26 +00:00
ktsaou
021ad5b6af Added support to block concurrent running of FireHOL by multiple admins.
FireHOL uses the lockfile command, if it finds it, allowing to detect
stale locks if 600 seconds have been passed since the last lock.

The lock file is /var/run/firehol.lck
2010-04-06 22:23:16 +00:00
ktsaou
0e613368c8 Fixed issue with TRY and START. 2009-10-01 10:25:23 +00:00
ktsaou
c2c72b2472 Added syslog support. FireHOL now logs to syslog all important events.
Variable for the user:

FIREHOL_SYSLOG_FACILITY="daemon"

Default is shown. User can set it in config file.
2009-02-26 02:13:54 +00:00
ktsaou
58867ee4c2 Made it detect when the simple services have either server or client ports
defined, but not both.
2009-02-25 23:30:14 +00:00
ktsaou
17ffaeeb65 Fixed an issue where the wizard/helpme generated too long names. 2009-02-22 00:35:16 +00:00
ktsaou
aeccc26c8e Updated the kernel module handling for certain helpers. 2009-02-21 21:42:07 +00:00
ktsaou
e236cedb2f Added helper_<service>="helper" functionality.
This allows to consider as simple all the services which rely on a kernel
netfilter module.

Converted the following services to simple:
amanda, ftp, pptp, tftp

Updated the following simple services to use kernel modules:
h323, GRE, sip
2009-02-19 05:27:49 +00:00
ktsaou
9c2fa99046 Fixed ftp helper match to allow only ESTABLISHED or RELATED connections.
Otherwise it would allow NEW connections in the reverse direction too.
2009-02-19 02:47:36 +00:00
ktsaou
358181cf7d Updated service ftp to match everything with the kernel ftp helper.
Removed incomplete p2p service.
2009-02-19 02:33:08 +00:00
ktsaou
e6ea7d99cb Service SIP now uses the kernel modules. 2009-02-06 04:18:31 +00:00
ktsaou
1661da6cf5 Fixed a copy and paste error in connmark helper. 2009-02-05 02:45:00 +00:00
ktsaou
04c6cd7ee0 Updated RESERVED_IPS for the latest IANA reservations.
Added classify helper for traffic shapping without marks.
Added connmark helper for statefull connection marking to assist the
routing decision (i.e. multiple upstream providers).
2009-02-05 02:03:07 +00:00
ktsaou
8e9119a6ae Renamed fixtos to tosfix, optimize it a bit, and added documentation about it. 2008-12-02 20:28:02 +00:00
ktsaou
508798f573 Added fixtos helper to mangle packets that may have invalid TOS 2008-12-02 20:01:11 +00:00
ktsaou
50a90f64fe fixed tcpmss issue described in bug 2043915.
It seems that LARTC is very old for this.
2008-08-09 21:48:02 +00:00
ktsaou
b8409b9ca7 update RESERVED_IPS according to latest IANA reservations. 2008-07-31 00:46:41 +00:00
ktsaou
e1cc6ea5c1 Updated IANA reservations. 2008-04-09 21:03:13 +00:00
ktsaou
4fbf8c9373 Updated for latest IANA reservations format. 2008-03-17 22:08:43 +00:00
ktsaou
b77eb930e6 Added service xbox.
This is not final, as it opens all unprivileged UDP ports to anyone from source port UDP 3074.
2007-12-11 22:05:24 +00:00
ktsaou
292d0d82ee Fixed the operation of FIREHOL_DROP_ORPHAN_TCP_ACK_FIN. It did not work
because it was also checking for a NEW state (which is not the case).
2007-12-08 10:39:06 +00:00
ktsaou
cc2e70fd6d Updated RESERVED_IPS 2007-11-30 19:22:36 +00:00
ktsaou
85f5419b82 Changed all service definitions which can use client ports bellow 1024 to
allow client connections from any possible port, because when natted, these
services will me remapped to client ports bellow 1024 without any
restriction on the port range.
2007-10-25 12:34:06 +00:00
ktsaou
25d704e21c 'less' is no more required. Now FireHOL can use 'less', 'more' or 'cat'
in that order, for a pager.

FireHOL will now correctly use 'zcat', 'gzcat' or 'gzip' for uncompressing
/proc/config.gz, and it will ignore /proc/config.gz if it cannot
find any of these commands (with a warning).

There was a case, where an attacker could use firehol to execute a custom
script, if it was saved at a location where the kernel config file is
expected by firehol, and /proc/config, /proc/config.gz did not exist.
FireHOL now greps the kernel config file for the information it needs, so
this threat has been eliminated.

Updated the line number management of the configuration file, using the
latest user commands offered by firehol.
2007-10-15 00:43:17 +00:00
ktsaou
db6b4c9389 Replace gzcat with zcat. 2007-10-14 23:02:39 +00:00
ktsaou
da53e6f183 Updated RESERVED_IPS to latest IANA reservations. 2007-10-14 23:00:41 +00:00
ktsaou
d1398995da Made the helpme wizard correctly recognize services listening on the IPv6
equivalent of 0.0.0.0 (::).
2007-08-20 02:03:28 +00:00
ktsaou
71a2691dd0 Changed the protections to activate the 'invalid' match last, after all
other protections.
2007-08-20 00:53:22 +00:00
ktsaou
fa15b8b8eb Various updates in 'helpme' mode.
There is still one issue unsolved: When there are routes to specific nets
befind a gateway, FireHOL checks if the IP of the host or the gateway are
inside the networks routed through the gateway. This is wrong. In several
cases, the network behind a gateway will not include the IP of the gateway
or the IP of the interface the firehol host routes this traffic via.

However, there seems to be no easy solution to this. For PPP interfaces the
IP of the PPP concentrator is included in the IPs that are reported by
'ip route show dev ppp0' as the networks behind this device.

May be the 'scope' paramater of the routing table should be used to exclude
'scope link' routes. If 'scope link' routes are ommitted, the resulting set
could be used to identify the routes behind a router.
2007-07-30 22:52:48 +00:00
ktsaou
9fcb57f84f Updated RESERVED_IPS. 2007-07-26 21:39:50 +00:00
ktsaou
b61383ba7b Service multicast has been changed to match dst 224.0.0.0/4 proto IGMP and
UDP.
2007-07-20 21:28:13 +00:00
ktsaou
40f4dc00e2 Various minor fixed.
firehol 'save' now saves also the required kernel modules to restore the
firewall at /var/spool/firehol/last_save_modules.sh.
This is executable already and can be called from boot scripts to load
the kernel modules required when restoring the firewall with:

iptables-restore
2007-07-20 21:16:59 +00:00
ktsaou
1d24f68a46 Added helper action:
action [chain <name> <action>]
The action helper creates an iptables chain which can be used to control the
action of other firewall rules during runtime.

For example, you can setup the custom action ACT1, which by default is ACCEPT,
but under certain cases it can be changed to DROP, REJECT or RETURN without
restarting the firewall.

The first argument must always be the word 'chain', for the moment.

        name    can be any chain name accepted by iptables.
                It is suggested to keep it between 5 to 10 letters.

        action  can be any action supported by FireHOL, although ony ACCEPT,
                REJECT, DROP, RETURN may have any meaning under this use.

Example 1:
At the top of firehol.conf, create the action ACT1:

action chain ACT1 accept

later, in interfaces and routers, create rules that use the ACT1 action:

server smtp ACT1
client imap ACT1

Please note that actions created this way are case sensitive.
At some point, and while the firewall is running, the action ACT1 can be
changed to DROP, with this linux command (this is not FireHOL specific):

iptables -t filter -I ACT1 -j DROP

The above command inserts (-I) the new action DROP above the default
action ACCEPT, and therefore all the traffic matching the FireHOL rules that
have the action ACT1 will now be dropped.
To return to the default action (ACCEPT), run the following linux command:

iptables -t filter -D ACT1 -j DROP

This command deletes (-D) the DROP action that was inserted above the
default action. If you delete all actions in the chain ACT1, the default
action will be RETURN, in which case all rules with action ACT1 will be
nutralized (it will be the same as they were not specified at all in
firehol.conf).

Example 2:

action chain "ACT1 ACT2 ACT3" accept chain "ACT4 ACT5 ACT6" drop

will create 6 actions, ACT1, ACT2, ACT3 with ACCEPT, and
ACT4, ACT5, ACT6 with DROP.
2007-07-20 19:58:38 +00:00
ktsaou
9ee2483eaa Updated IANA RESERVED_IPS. 2007-05-22 22:52:53 +00:00
ktsaou
cf8af3cc22 Made firehol correctly identify newer kernel options regarding iptables
modules (applies to kernels 2.6.20+).
2007-05-06 14:42:43 +00:00
ktsaou
4324ef77da Added support for external definitions of:
RESERVED_IPS
PRIVATE_IPS
MULTICAST_IPS
UNROUTABLE_IPS

in files under the same name in /etc/firehol/.
Only RESERVED_IPS is mandatory (firehol will complain if it is not there,
but it will still work without it), and is also the only file that firehol
checks how old is it. If it is 90+ days old, firehol will complain again.

Changed the supplied get-iana.sh script to generate the RESERVED_IPS file.
FireHOL also instructs the user to use this script if the file is missing
or is too old.
2007-05-05 23:38:31 +00:00
ktsaou
3e03710f54 Updated RESERVED_IPS 2007-04-29 18:38:41 +00:00