Commit Graph

253 Commits

Author SHA1 Message Date
ktsaou
3e03710f54 Updated RESERVED_IPS 2007-04-29 18:38:41 +00:00
ktsaou
ade37fd2ce BASH 3.2 support.
The problem is in array variables.
For some reason, an empty array member in BASH 3.1 produces no iptables
arguments, but in BASH 3.2 an empty array member produces an empty iptables
argument which breaks iptables.
2007-04-29 18:34:55 +00:00
ktsaou
21b99b9151 Updated RESERVED_IPS. 2007-02-04 23:28:41 +00:00
ktsaou
abfac1a91e Updated latest IANA RESERVED_IPS. 2006-11-21 23:41:23 +00:00
ktsaou
fccd0a90f8 Applied patch of bug: 1498292, "nfs" service missing ports for "rpc.statd" 2006-06-05 17:47:48 +00:00
ktsaou
a014af195b Added support for TARPIT.
Made 'policy' work for routers too.
2006-06-05 17:25:33 +00:00
ktsaou
e3827f9a90 Added protection 'bad-packets'. 2006-04-22 17:26:18 +00:00
ktsaou
0b2c7b0616 Fixed bug 1455569:
When FireHOL has created the
$FIREHOL_SPOOL_DIR, it then runs chown and chmod on
the $FIREHOL_CONFIG_DIR. This looks like a
cut-n-paste error, since it at that point makes more
sense to chown/chmod $FIREHOL_SPOOL_DIR.
2006-03-23 18:50:16 +00:00
ktsaou
25ed9a5e0a Updated RESERVED_IPS for latest IANA assignements. 2006-03-12 12:54:55 +00:00
ktsaou
31f51a1f99 Added service OSPF.
Make the wizard to ommit /32 from IPs since iptables now seems to complain
about it. Check bug: 1435098
2006-03-11 12:24:34 +00:00
ktsaou
4bfb9986de Updated RESERVED_IPS. 2006-01-18 21:24:22 +00:00
ktsaou
51c5aa6fd6 Fixed the SIP service to allow port 5060 for the client (had only 'default'). 2006-01-18 21:20:28 +00:00
ktsaou
c15226d5f6 Added tcp/8333 to vmwareweb 2005-11-19 09:38:25 +00:00
ktsaou
d225a9b468 Added option 'recent' to action 'ACCEPT':
Example:

server smtp accept with recent NAME SECONDS HITS

where

NAME is a name for this RECENT match
SECONDS is a number, or empty ("")
HITS is a number, or empty ("")

Check:

iptables -m recent --help

for more information.
2005-11-11 21:49:03 +00:00
ktsaou
e00ee3d196 created a copy of "microsoft_ds" service as "ms_ds" to overcome the issue
of long chain names.
2005-10-27 23:46:01 +00:00
ktsaou
226697530e Added variable FIREHOL_DROP_ORPHAN_TCP_ACK_FIN which once set to 1 in the
config file, it makes FireHOL drop all packets that appear as NEW
connections to the connection tracker but they are TCP and have ACK and FIN
set.

This should eliminate the logs that appear in a few busy environments where
the iptables connection tracker removes entries from its table when it
sees the FIN and therefore the ACK,FIN is considered a NEW connection.

See also https://sourceforge.net/tracker/?func=detail&atid=487693&aid=1326811&group_id=58425
2005-10-16 08:55:53 +00:00
ktsaou
f093be9f78 Made it dynamically detect /var/lock/subsys and switch back to /var/lock
if the first does not exist.
2005-09-21 21:32:58 +00:00
ktsaou
6b01d3326b fixed a bug in negative 'mac' expressions where a faulty rule was generated
for matching mac-source 'any'.
2005-06-02 16:20:35 +00:00
ktsaou
d48d627a63 Allowed 127.0.0.1 to be in RESERVED_IPS 2005-06-02 15:48:52 +00:00
ktsaou
42e3bd81bf Updated RESERVED_IPS to current IANA reservations. 2005-05-08 23:27:22 +00:00
ktsaou
bd9770b569 Added 'addrtype' matches, in the form of 'srctype' and 'dsttype' optional
rule parameters.
2005-04-18 22:38:23 +00:00
ktsaou
f0ddf4c6af Added FIREHOL_LOG_PREFIX. 2005-04-18 21:00:22 +00:00
ktsaou
c87ebf05e3 Added experimental protection all-floods. 2005-04-03 21:48:04 +00:00
ktsaou
52275b89e9 Made FireHOL trap SIGHUP and cleanup properly on it. 2005-03-01 19:52:56 +00:00
ktsaou
3a0cdc5bca Made a set of external commands optional in wizard mode, so that FireHOL
will work if these are absent, but will refuse to enter wizard mode.
2005-02-17 23:45:02 +00:00
ktsaou
86287ca4f0 Added support for /proc/config.gz for kernel configuration.
This is silently ignored if the command 'gzcat' cannot be found in the
system path.
2005-02-09 22:36:24 +00:00
ktsaou
c71cddd566 Made wget and curl optional. Now they are required only when they are
really needed.

Also, small fixes in ecn_shame helper.
2005-02-07 20:56:09 +00:00
ktsaou
7fb66a46a5 Remove -p from mkdir commands, in order for them to fail if the directory
to be created already exists.
2005-01-25 21:28:19 +00:00
ktsaou
55c347c280 Made sure that no files are created anywhere except the firehol temp dir.
Made the firehol temp dir use the $RANDOM variable to randomize its name.
2005-01-25 21:07:01 +00:00
ktsaou
5ad1dca8af Fixed service pptp to control GRE traffic in a stateless way. 2005-01-24 22:24:47 +00:00
ktsaou
b75543f001 Added security checks to directory creation mechanism. 2005-01-24 21:23:38 +00:00
ktsaou
3036004376 Added service DICT (kdict, gnome-dictionary). 2005-01-21 19:58:09 +00:00
ktsaou
79ebe6c224 Minor fixes for calculating minor firehol version number, added transparent
proxy to line number calculation and fix a typo in the docs.
2004-12-29 22:34:45 +00:00
ktsaou
073e10deef The knock was not allowing established connections, and knockd was
inserting a rule with a -s which matched requests but did not match the
replies.

Now, the default is to allow established connections for knock and only
control NEW connections via knockd.
2004-12-23 18:43:03 +00:00
ktsaou
c8dad4f53a Small internal changes.
Added support for integration with knockd (http://www.zeroflux.org/knock/)
This integration comes as part of the ACCEPT action:

accept [with knock <name>]
The optional parameter 'with knock' allows easy integration with knockd,
a server that allows you to control access to services, by sending certain
packets to "knock" the door, before the door is open for service.

This parameter accepts just a name. This name is used to build a special
chain knock_<name> which will contain no rules, so that the traffic entering
this chain will just return back and continue to match against the other
rules until the end of the firewall.

As an example, lets say that you want to allow https traffic based on a knock.
In FireHOL you write:

   server https accept with knock hidden

and you configure knockd so that it runs:

   iptables -A knock_hidden -s %IP% -j ACCEPT

to enable the https service (notice that there is no need to match anything
else than the IP. FireHOL already matches everything needed for its rules
to work), and:

   iptables -D knock_hidden -s %IP% -j ACCEPT

to disable this service for the given IP.
2004-12-22 23:05:57 +00:00
ktsaou
28464b03c7 Added helper 'transparent_proxy' and modified 'transparent_squid' to call
the new helper for setting up transparent web proxies.
2004-12-21 21:49:11 +00:00
ktsaou
94cccc9410 Added service TIMESTAMP. 2004-12-03 21:29:41 +00:00
ktsaou
3c8263584d Fixed a bug in FIREHOL_OUTPUT_ACTIVATION_POLICY which was incorrectly
setting the INPUT policy.
2004-11-04 19:47:05 +00:00
ktsaou
e2f4dc6c73 Added service ANYSTATELESS 2004-11-02 00:37:15 +00:00
ktsaou
98b39f0604 Implemented minor version check on services in /etc/firehol/services 2004-11-01 00:13:00 +00:00
ktsaou
9edcfb9731 Fixed a type in DSCP optional rule parameter.
Added line numbering to newly added helpers.
2004-10-31 03:17:00 +00:00
ktsaou
60969b571d Added helpers:
tos	- to set the TOS of packets
dscp	- to set the DSCP field of packets (both raw and class)


Added optional rule parameters:

tos	- to match the TOS of packets
mark	- to match the MARK ID of packets
dscp	- to match the DSCP field of packets (both raw and class)


Added the following actions to the rule() function:

dscp

The rule() function already had support for TOS and MARK.
2004-10-31 02:21:02 +00:00
ktsaou
25c21cdebb Created the complex service DHCP and removed the simple one.
The complex DHCP is now stateless to overcome all the problems that
arise due to the initial DHCP broadcast.
2004-10-30 23:03:57 +00:00
ktsaou
83b609230b Service SAMBA now includes MICROSOFT_DS (tcp/445). Also, updated samba
related documentation.
2004-10-30 22:41:21 +00:00
ktsaou
fa2db432cb Some error detection for /etc/firehol/services directory creation. 2004-10-30 21:27:00 +00:00
ktsaou
449040b6bd Added service NIS.
Created by Carlos Rodrigues <crlf@users.sourceforge.net>
Feature Requests item #1050951 <https://sourceforge.net/tracker/?func=detail&atid=487695&aid=1050951&group_id=58425>

These rules work for client access only!

Pushing changes to slave servers won't work if these rules are active
somewhere between the master and its slaves, because it is impossible to
predict the ports where "yppush" will be listening on each push.

Pulling changes directly on the slaves will work, and could be improved
performance-wise if these rules are modified to open "fypxfrd". This wasn't
done because it doesn't make that much sense since pushing changes on the
master server is the most common, and recommended, way to replicate maps.
2004-10-30 21:13:26 +00:00
ktsaou
4ea32196d9 Added support for externally defined services in files under directory:
/etc/firehol/services

This directory may contain files ending with .conf. Example: imap.conf
Each file should *start* with a line like this:

#FHVER: 1

This must be the FIRST line of the file.
The number 1 is the FIREHOL_SERVICES_API version number. If the API within
FireHOL changes, FireHOL will refuse to load all those services files that
their API version number does not match.
2004-10-28 23:03:06 +00:00
ktsaou
f638c00a8c Added service nut. 2004-10-28 22:02:43 +00:00
ktsaou
1bb282dc4c Added helper 'tcpmss'.
Added service 'nntps'.
Converted all simple services' port definitions to numeric.
Updated documentation accordingly.
2004-10-08 22:30:52 +00:00
ktsaou
faaf070f02 Added services:
asterisk, darkstat, distcc, eserver, gift, giftui, h323, iax, iax2, icp,
rtp, sip, stun, upnp.
2004-09-26 00:52:55 +00:00