5
0
mirror of git://git.proxmox.com/git/pve-firewall.git synced 2025-02-01 09:47:24 +03:00

830 Commits

Author SHA1 Message Date
Fabian Grünbichler
2361540014 fix #1319: don't fail postinst with masked service
by using "try-reload-or-restart" instead of "reload-or-restart"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-03-08 13:49:04 +01:00
Wolfgang Bumiller
6a241ca745 check multiport limit in port ranges
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-08 12:18:20 +01:00
Wolfgang Bumiller
4299c35fc5 bump version to 3.0-5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-12-07 08:31:53 +01:00
Wolfgang Bumiller
7a5a402b56 honor disabled flag on group rules again
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-12-07 08:30:01 +01:00
Wolfgang Bumiller
a19d4127e8 bump version to 3.0-4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-11-16 11:42:37 +01:00
Dominik Csapak
53bbbf31e7 sort ipsets so that the digest is consistent
otherwise, editing an ipset randomly works (or not) due to
a wrong digest

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-15 13:13:54 +01:00
Tom Weber
bf2fa11471 remove ruleset_generate_match, ruleset_generate_action
ruleset_generate_match and ruleset_generate_action not used anymore

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
61221d8971 remove unused ruleset_generate_rule_insert
Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
2dc0a26e26 cleanup parameters to ruleset_generate_rule
remove $actions and $goto - not used anymore

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
180da76c1e rule_substitude_action, remove ruleset_generate_rule_old
implement rule_substitude_action
eliminate use of ruleset_genereate_rule_old and remove it

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
0e0432e2eb remove unused ruleset_generate_cmdstr
Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
30c390f940 implement ipt_rule_to_cmds, ruleset_add_ipt_cmd
ipt_rule_to_cmds converts a %rule to an array of iptables commands
ruleset_add_ipt_cmd adds such an iptables command to a chain
ruleset_generate_rule uses these now
ruleset_generate_rule_old is an interim workaround

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
a44cb745ec iptables address matching in own subroutine
put generation of iptables source/destination address matching
in own subroutine and use this in ruleset_generate_match

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
e4882cff46 eliminate unused nbdport in pve_std_chains_conf
Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
cfd7cd9caa make $pve_std_chains a copy of $pve_std_chains_conf
create a new $pve_std_chains with $pve_std_chains_conf as template on
every compilation of the rules. This avoids persitant changes to the
$pve_std_chains and makes it easier to read the std_chains configuration
from external config files (later to implement).

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
044409e5b4 convert string based rule definitions to hashes
also extending %rule with log,logmsg,match,target

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
7f7930f8cf integrate logging into ruleset_addrule
Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
1e9c50707a prepare code for more generic firewall logging
making ruleset generation aware of a match and action
part in iptable rules.
code will generate the same iptables as before! (except for
a few additional spaces between match and action).

Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Tom Weber
ce0d17dd7d remove unused $rule_format
Signed-off-by: Tom Weber <pve@junkyard.4t2.com>
2017-10-19 08:00:17 +02:00
Philip Abernethy
02ecc1827e Use run_cli_handler instead of deprecated run_cli 2017-10-18 15:21:26 +02:00
Fabian Grünbichler
dc4b58b5c6 pvefw-logger: fix typo 2017-10-17 14:24:27 +02:00
Fabian Grünbichler
9ec74c4432 build: reformat debian/control
using wrap-and-sort -abt
2017-10-04 11:05:33 +02:00
Wolfgang Bumiller
c0c71b1bf7 bump version to 3.0-3 2017-09-12 14:43:13 +02:00
Wolfgang Bumiller
f15b772b20 buildsys: clean: remove .buildinfo files 2017-09-06 09:35:04 +02:00
Wolfgang Bumiller
2388cab121 Fix #1492: logger: print timestamps only if we have one
There's no guarantee that there's a timestamp in an skb, so
nflog_get_timestamp can fail.
2017-09-04 12:39:27 +02:00
Wolfgang Bumiller
4f7a4bdd9f bump version to 3.0-2 2017-07-17 15:27:44 +02:00
Emmanuel Kasper
79ecedee41 Fix #1446: allow pve-firewall package install twice in a row
On packages removal (!= purge) systemd units are masked.
The postinst script has then to reenable this units at the
beginning of the 'configure' step.

Our other packages are doing this manually, or automatically
when the dh_systemd_enable helpers generated a postinst,
but this was missing here.
2017-07-17 15:23:35 +02:00
Wolfgang Bumiller
eedcb56462 log errors encountered by the daemon to syslog 2017-04-10 14:57:36 +02:00
Wolfgang Bumiller
55b473712e forbid trailing commas in lists
iptables-restore doesn't allow them
2017-04-10 14:57:36 +02:00
Fabian Grünbichler
29a94c796f bump version to 3.0-1 2017-03-09 14:49:35 +01:00
Fabian Grünbichler
97f480250e buildsys: update upload target 2017-03-09 14:49:35 +01:00
Fabian Grünbichler
6e38c2a1cb buildsys: fix deb target dependencies 2017-03-09 14:49:35 +01:00
Fabian Grünbichler
6d93cacf91 buildsys: remove fakeroot from dpkg-buildpackage 2017-03-09 14:03:45 +01:00
Wolfgang Bumiller
43e338257c buildsys: use dpkg-architecture 2017-02-10 13:57:59 +01:00
Wolfgang Bumiller
7f7b489042 logger: drop gthread dependency
g_thread_new is part of glib directly, libgthread only
contains the deprecated g_thread_init() & friends which we
do not use.
This silences a build warning.
2017-02-06 12:07:24 +01:00
Wolfgang Bumiller
09faa4fb0d buildsys: depend on lsb-base 2017-02-06 12:05:01 +01:00
Wolfgang Bumiller
09e11ad44e simulator: make lxc/qemu optional 2017-02-06 11:59:18 +01:00
Wolfgang Bumiller
567c9e2773 buildsys: make job safety 2017-02-06 11:52:54 +01:00
Thomas Lamprecht
0dc6e6387e fix ambiguous if statements
the funciton nflog_bind_pf(...) returns an integer smaller 0 on a
failure, we negated that which results in 1 if no failure and 0 if
there was a failure.
This is ambiguous and as no parenthesis are set the GCC 6 warning
"logical-not-parentheses" gets triggered.

Use a simple
    nflog_bind_pf(...) < 0
check instead.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-12-13 14:32:32 +01:00
Dietmar Maurer
df67a3dc5f bump version to 2.0-33 2016-11-29 12:18:41 +01:00
Wolfgang Bumiller
1b36f6ec1c ipset: don't allow the creation of zero-prefix entries 2016-11-29 12:16:53 +01:00
Wolfgang Bumiller
b14db52fbd ipsets: catch zero-prefix entries
This way the error is visible with pve-firewall compile
without breaking the rest.
2016-11-29 12:16:26 +01:00
Dietmar Maurer
dc643b4d34 bump version to 2.0-32 2016-11-29 06:42:32 +01:00
Wolfgang Bumiller
15c800003e improve search for local-network
Skip zero-prefix routes as they make no sense to be
considered (and ipset doesn't allow ::/0 to be added
anyway).

Support /128 local addresses by also checking for identical
addresses beside b-in-a overlapping.
2016-11-29 06:33:48 +01:00
Dietmar Maurer
45f206fd29 bump version to 2.0-31 2016-10-06 08:34:17 +02:00
Dietmar Maurer
a9e7f1bd7a use new repoman for upload target 2016-10-06 08:33:42 +02:00
Wolfgang Bumiller
48e3963e66 don't try to apply ports to rules which don't support them 2016-10-06 08:30:53 +02:00
Wolfgang Bumiller
95e3594912 remove redundant checks 2016-10-06 08:29:38 +02:00
Dietmar Maurer
2ea28d0c01 bump version to 2.0-30 2016-09-16 08:53:27 +02:00
Emmanuel Kasper
7831e1e329 add multicast DNS to the list of Macros
multicast DNS allows to quickly access hosts without the need to
configure a DNS server
2016-09-06 07:01:13 +02:00