5
0
mirror of git://git.proxmox.com/git/pve-firewall.git synced 2025-01-09 01:18:04 +03:00
Commit Graph

614 Commits

Author SHA1 Message Date
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
Dietmar Maurer
e50429af2c add missing parameter descriptions 2016-09-05 10:22:51 +02:00
Wolfgang Bumiller
fd090f9be2 build-depends: add dh-systemd 2016-06-28 15:02:01 +02:00
Dietmar Maurer
b65d13d9c1 bump version to 2.0-29 2016-06-03 16:46:55 +02:00
Dominik Csapak
5da1a22976 prevent overwriting ipsets/sec. groups by renaming
we did not check if the target name of the group/ipset
already existed, so we overwrote them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-03 16:44:59 +02:00
Dominik Csapak
5c53cde452 fix allowed group name length
the allowed length for an iptable chain is 28 chars

we had a max set of 20 but a format of
GROUP-<name>-IN and
GROUP-<name>-OUT

where <name> is the group name

but GROUP--OUT are 10 chars so we just allow 18 chars max

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-03 15:57:16 +02:00
Dominik Csapak
f76f3caefb make group digest stable
if we had mulitple security groups and wanted to
edit one, we did not have a stable digest,
because perl hashes are not sorted

this patch sorts the keys before hashing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-03 15:56:01 +02:00
Dietmar Maurer
d0f3bb08a7 bump version to 2.0-28 2016-06-03 11:02:06 +02:00
Wolfgang Bumiller
2e1ae6b96a use pve-common's ipv4_mask_hash_localnet 2016-06-03 10:59:46 +02:00
Dietmar Maurer
76a57e1a1c bump version to 2.0-27 2016-05-17 08:00:12 +02:00
Fabian Grünbichler
0a0ba19ea7 fix #972: make PVEFW-FWBR-* rule order stable
by sorting the VM/CT IDs and the VM/CT config keys before
iterating over them.
2016-05-17 07:41:59 +02:00
Dietmar Maurer
1764217270 bump version to 2.0-26 2016-05-09 10:02:07 +02:00
Dietmar Maurer
0b14268af9 install sysctl file set set rp_filter=2
To avoid that packet gets accepted to early in fwbr. We had the
same setting in package vzctl (Proxmox VE 3.X).
2016-05-09 09:58:15 +02:00
Dietmar Maurer
6e29af1230 bump version to 2.0-25 2016-04-21 09:59:01 +02:00
Fabian Grünbichler
37ef1ce1bc fix #945: add uninitialized check in lxc ipset compilation 2016-04-21 09:58:08 +02:00
Dietmar Maurer
edb4aff5d6 use pve-doc-generator, bump version to 2.0-24 2016-04-06 10:55:08 +02:00
Dietmar Maurer
e313afe046 move option definition to PVE::Firewall
So that we can auto-generate docs.
2016-04-01 12:30:59 +02:00