Commit Graph

63 Commits

Author SHA1 Message Date
ktsaou
8828416786 Added service ping 2003-01-05 20:03:07 +00:00
ktsaou
601eb59a60 Added protocols as services: ICMP, AH, GRE, ESP 2003-01-03 23:34:37 +00:00
ktsaou
c76d1bbc20 Added service: microsoft_ds 2003-01-01 04:32:48 +00:00
ktsaou
31c2bf9d0d FireHOL has been changed to be "smart" when REJECTing packets.
If the packet to be rejected is a TCP packet, it will send back a tcp-reset
message, while for any other protocol it will send icmp-port-unreachable.

This is now the default behavior, without specifing a 'with' parameter.

Also, the multicast service has been changed to additionally match
protocol No 2.
2003-01-01 03:12:17 +00:00
ktsaou
458ec453b1 Extended REJECT control ('with' parameter) to work on 'policy' and on the
default firewall policies.
2002-12-31 09:10:15 +00:00
ktsaou
bbee3dc454 Added optional rule parameter "with" which is only valid just after the
action "REJECT" on all rules. "with" allows finer control over the method
of packet rejection.
2002-12-31 08:55:42 +00:00
ktsaou
b880ce9930 Code cleanup and code comments 2002-12-23 14:39:19 +00:00
ktsaou
3d6ac67cf4 Error handles now shows the command line that generated the error
as-is in the configuration file.
2002-12-23 13:49:09 +00:00
ktsaou
818803d15f Added service APCUPSDNIS. 2002-12-22 14:02:54 +00:00
ktsaou
45243f3ee3 Added variable FIREHOL_AMANDA_PORTS to control which ports amanda has been
compiled with.

Added service CUPS.
2002-12-20 20:31:11 +00:00
ktsaou
a231fb76df Added service AMANDA. 2002-12-19 22:52:15 +00:00
ktsaou
0626ced660 Fixed a bug in command line parsing when there was a configuration file
specified in the command line together with a command.
Now, when a filename is specified only three commands are valid:
debug, try, start

Fixed error handling to detect errors in a few functions that were
ignored.

Updated documentation to reflect the above changes.

Updated interactive mode help and added directive 'in' as a shortcut to
interface eth0 internet
2002-12-18 23:36:07 +00:00
ktsaou
b10699edce Enhanced the error handler to detect errors separately for each protection. 2002-12-18 22:05:37 +00:00
ktsaou
772bf47a76 Fixed a potential security hole where UDP traffic could come in
uncoditionally from source port 53 when there was a:

client dns accept

This means that DNS is back to statefull mode.

Also, removed from ICMP the RELATED state, since it will be matched
at the end of the end of the interface or firewall.
2002-12-18 20:44:08 +00:00
ktsaou
a46c33bf53 Fixed active FTP bug. It was not working. 2002-12-18 20:18:53 +00:00
ktsaou
3f71caf4fd Added help entry for explain. 2002-12-18 00:35:42 +00:00
ktsaou
47ea9c62ea More changes regarding explain.
Added interactive commands 'help', 'show' and 'quit'.
Now the interactive mode automatically generates a configuration file
from all the successfull commands.
Made interactive mode accept variable definitions and loops.
2002-12-18 00:30:28 +00:00
ktsaou
11cf84c7a2 Added command line argument "explain" to run in interactive debugging
mode.

This resulted in discovering bugs in NFS (fixed) and masquerade (fixed).

Also, enriched the error handler to be more descriptive about what
FireHOL is doing.
2002-12-17 20:47:34 +00:00
ktsaou
32df49b09e Added service DHCP Relay.
Made kernel modules loaded during run time.

Saving of old firewall takes now place before processing the configuration
file, in order to make sure it will not be altered by accident due to
some illegal commands in the configuration file.

FireHOL enables kernel routing automatically when there is at least a
router defined in the configuration.

Now the configuration accepts command line arguments given to FireHOL.
To send a set of arguments to the script, either just append them to
FireHOL command line or (in case it is not clear if the argument is going
to be used by FireHOL or the configuration) precede the configuration
arguments by -- (two dashes).
2002-12-16 20:41:39 +00:00
ktsaou
30b6a02678 Restored gawk stuff to previous methodology, using <<"EOF" since escaping
produced warnings in debian systems.
2002-12-16 18:57:30 +00:00
ktsaou
05eaeb818e Further optimizations in the error handler. 2002-12-13 21:52:19 +00:00
ktsaou
d7e3fe3940 Made tons of optimizations for better FireHOL speed. 2002-12-13 19:56:11 +00:00
ktsaou
236df29489 Added services: APTPROXY, APCUPSD, ISAKMP
Removed Service: TFTP
2002-12-12 20:07:47 +00:00
ktsaou
747834cc02 Changed service submission to be presented by number instead of name
because debian does not have this service in /etc/services.
2002-12-11 20:51:38 +00:00
ktsaou
d10ebe55a6 Made default protections burst 50. 2002-12-10 23:31:32 +00:00
ktsaou
2eaf694827 Added FIREHOL_LOG_FREQUENCY and FIREHOL_LOG_BURST to allow control on
the frequency of the loglimit rule parameter.
2002-12-10 23:08:07 +00:00
ktsaou
25b52348db Fixed a bug in netbios_ns 2002-12-10 18:10:38 +00:00
ktsaou
0f47cce5a4 Fixed a typo in protections, that made them unusable in the previous
version.
2002-12-09 21:13:35 +00:00
ktsaou
3dd671e057 The command line argument stop was not working. Fixed. 2002-12-08 22:05:40 +00:00
ktsaou
16d8d8c0ec Now protections can be applied on both directions of a router.
When running firehol with a configuration file as the first argument, now
you can specify an action (start, debug, try, etc) as the second argument.
2002-12-07 18:12:43 +00:00
ktsaou
e783b0cd99 Re-organized parameters parsing to prevent processing a possible file
in the current directory with filename the name of the FireHOL command.

Now FireHOL locks the subsys firehol, in addition to iptables.
2002-12-07 00:47:30 +00:00
ktsaou
33f8b4677b Added many new services. 2002-12-05 09:23:36 +00:00
ktsaou
b60fb76003 The problem with line numbers on debian systems found to be an awk
alternative those systems use. Now FireHOL uses gawk instead of awk.

Added service SUBMISSION (SMTP or SSL/TLS).
2002-12-05 09:03:37 +00:00
ktsaou
e18ab0bc1b Fixed a problem where empty parameters to src, dst, etc where not giving
an error and where not producing any iptables statements.
This was happening because FireHOL relies on nested BASH loops, and bash
does not loop with empty iterations...
2002-12-04 23:12:10 +00:00
ktsaou
da23c58ba6 Re-wrote the negative expressions handling to archieve near hand-made
(i.e. optimum) quality of iptables firewall.
Now, instead of the linked-list that was created for negative expressions,
we match all positive expressions before the negatives and all the
negatives are together in one chain.
This also fixed possible performance problems due to the large number
of chains and rules that the packets had to traverse in order to get
matched (or not matched).

The fact that now positive rules are matched before negatives has also the
benefit that not all traffic has to be matched against the negatives. Now,
first we select what might be good for a rule, and then we check if this
breaks the negative expressions.

Last, this made the iptables firewall much more clear and human readable.
2002-12-04 22:41:13 +00:00
ktsaou
9f7913876c Fixed a bug that FireHOL was incorrectly choosing LOCAL_CLIENT_PORTS on
router configurations. This bug appeared when the router configurations
were made to accept normal server/client statements.
2002-12-04 21:32:26 +00:00
ktsaou
bad0283559 Error handler now works on protections too. 2002-12-04 07:20:19 +00:00
ktsaou
c42b18f329 Changed the banner to be much more descriptive. It now also shows the
services FireHOL supports (removed the services parameter).
2002-12-03 22:49:16 +00:00
ktsaou
71394e25f6 Fixed the usage banner to show the "services" parameter. 2002-12-03 22:07:09 +00:00
ktsaou
6a29d1963c Another work around to fix the problem of LINENO not working in debian
systems.

Added command line argument "services" which shows all the service
definitions firehol knows about.
2002-12-03 22:03:00 +00:00
ktsaou
568ad90697 Fixed a bug where some versions of BASH do not handle correctly cat >>"EOF".
They treat it as cat >>EOF and thus they do variable substitution on the
text.
Now, FireHOL uses cat >>EOF but the text has been escaped in order to avoid
variable substitution.

The problem has been reported by Florian Thiel <thiel@ksan.de>.
2002-12-02 17:48:41 +00:00
ktsaou
6636ba4d20 Fixed parameter 'custom' processing. It is not an array now, but it is
treated specially to support BASH special characters such as !
Quoting things in parameters 'custom' needs tweaking still.
2002-12-02 00:01:24 +00:00
ktsaou
dbfcdab4fb More quoting issues fixed. Changed the core to work with BASH arrays in
order to handle quoted arguments accurately.

Fixed a bug in postprocessing error handler that did not present the
command line that produced the error.
2002-12-01 04:34:00 +00:00
ktsaou
3c8e2e5792 Fixed various problems related to quoted arguments.
Fixed iptables generation to support quoted arguments.
Made chain names shorter.

Every single element in the firehol config now gets its own chain.
Previously, the same services (e.g. smtp servers) were implemented using
only one pair of chains.

Enhanced the error handler of logical and syntactical error. Now it says
were and why an error has occured.
2002-11-30 22:53:55 +00:00
ktsaou
e3d2e9d43c As suggested by Florian Thiel <thiel@ksan.de>:
a. Fixed service IRC to work on TCP instead of UDP.
b. Added services: UUCP, VNC, WEBCACHE, IMAPS, IKE.

Also fixed the home-router.conf example (it was outdated).
2002-11-30 14:33:33 +00:00
ktsaou
bfa1b9a25f Minor aesthetic changes. 2002-11-03 13:17:39 +00:00
ktsaou
aa3d6e2ba6 Added service: any
Any allows the administrator to define any stateful rule to match services
that cannot have source and destination ports, such as unusual protocols,
etc.

Syntax: type any name action [optional rule parameters]

type: server/client/route
name: the name for the service (used for the chain)
action: accept, reject, etc.


Added service: multicast
Multicast allows the administrator to match packets with destination
224.0.0.0/8 in both directions (input/output).
2002-11-01 19:37:20 +00:00
ktsaou
ab76f3e91a Added command line parameter 'try' (in addition to 'start', 'stop', etc)
that when used it activates the firewall and waits 30 seconds for the
administrator to type 'commit' in order to keep the firewall active.
If the administrator does not write 'commit' or the timeout passes, FireHOL
restores the previous firewall.

Also, if you break (Ctrl-C) FireHOL while activating the new firewall,
FireHOL will restore the old firewall.
2002-10-31 15:31:52 +00:00
ktsaou
176b5e1313 Rearranged default RELATED rules to match after normal processing and
protections.
Made the core of FireHOL operate on multiple tables (not assuming the
rules refer to the 'filter' table). This will allow FireHOL to support
all kinds of NAT chains in the future.
2002-10-30 23:25:07 +00:00
ktsaou
3fb4f4015e Client and server keywords now work on routers too.
(The old 'route' subcommand is an alias for the 'server' subcommand -
within a router).
Protection can be reversed on routers to match outface instead of inface.
Masquerade can be used in interfaces, routers (matches outface - but can
be reverse(ed) to match inface) or as a primary command with all the
interfaces to be masqueraded in an argument.
2002-10-29 22:20:41 +00:00