]>
git.proxmox.com Git - pve-firewall.git/log
Dietmar Maurer [Tue, 18 Mar 2014 09:36:46 +0000 (10:36 +0100)]
improve security group API
Dietmar Maurer [Tue, 18 Mar 2014 07:03:26 +0000 (08:03 +0100)]
start API
Dietmar Maurer [Tue, 18 Mar 2014 06:05:06 +0000 (07:05 +0100)]
new method load_security_groups()
Dietmar Maurer [Mon, 17 Mar 2014 09:56:17 +0000 (10:56 +0100)]
remove obsolete comment
Dietmar Maurer [Mon, 17 Mar 2014 09:55:22 +0000 (10:55 +0100)]
avoid dependency problems
Dietmar Maurer [Mon, 17 Mar 2014 07:16:02 +0000 (08:16 +0100)]
use signalfd instead of g_unix_signal_add
Because g_unix_signal_add() creates an additional thread!
Dietmar Maurer [Mon, 17 Mar 2014 06:37:04 +0000 (07:37 +0100)]
add option parser and print usage information
We can now start in debug mode with 'pvefw-logger -d'. This runs
in foreground and print messages to stdout (additionally).
Dietmar Maurer [Sat, 15 Mar 2014 09:24:02 +0000 (10:24 +0100)]
add compile time test for log struct size
The STATIC_ASSERT macro declares an external function (which is never used).
The declaratin fails if the expression evaluates to false, because that
would result in a negative array bound.
Dietmar Maurer [Fri, 14 Mar 2014 17:53:28 +0000 (18:53 +0100)]
use gnu11 instead of gnu99 (newer)
Dietmar Maurer [Fri, 14 Mar 2014 13:22:30 +0000 (14:22 +0100)]
improve Makefile clean target
Dietmar Maurer [Fri, 14 Mar 2014 13:19:08 +0000 (14:19 +0100)]
add missing init.d file for pvefw-logger
Dietmar Maurer [Fri, 14 Mar 2014 13:05:55 +0000 (14:05 +0100)]
really stop daemon on write error
And a bunch of white-space cleanups.
Dietmar Maurer [Fri, 14 Mar 2014 12:59:22 +0000 (13:59 +0100)]
additionally log status messages to syslog
Dietmar Maurer [Fri, 14 Mar 2014 12:33:01 +0000 (13:33 +0100)]
use phydev numbers if name lookup fails
Dietmar Maurer [Fri, 14 Mar 2014 12:15:03 +0000 (13:15 +0100)]
improve log format
Dietmar Maurer [Thu, 13 Mar 2014 12:08:47 +0000 (13:08 +0100)]
add simple nflog daemon
Alexandre Derumier [Tue, 11 Mar 2014 08:58:46 +0000 (09:58 +0100)]
fix 110.fw example
we can't parse [OPTIONS] if a comment is on the same line
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Dietmar Maurer [Mon, 10 Mar 2014 11:49:02 +0000 (12:49 +0100)]
add ifupdown helper to setup MASQUERADE on veth device
Dietmar Maurer [Mon, 10 Mar 2014 09:29:25 +0000 (10:29 +0100)]
avoid use of --physdev-is-bridged whenever possible
Option physdev-is-bridged only match when both ports are bridged.
But we also want to check IN/OUT rules if only one port is bridged.
Dietmar Maurer [Mon, 10 Mar 2014 09:15:09 +0000 (10:15 +0100)]
use correct mac for veth containers
Dietmar Maurer [Mon, 10 Mar 2014 09:13:10 +0000 (10:13 +0100)]
add reminder that we should use ULOG
Dietmar Maurer [Mon, 10 Mar 2014 09:12:03 +0000 (10:12 +0100)]
add documentation for masqueraded setup
Dietmar Maurer [Fri, 7 Mar 2014 06:38:44 +0000 (07:38 +0100)]
do not use multiport for single port range
Dietmar Maurer [Thu, 6 Mar 2014 17:00:53 +0000 (18:00 +0100)]
ifupdown.sh: correctly use ifup instead of ifconfig
Dietmar Maurer [Thu, 6 Mar 2014 15:54:27 +0000 (16:54 +0100)]
ifupdown.sh: improve error handling
Dietmar Maurer [Thu, 6 Mar 2014 12:15:07 +0000 (13:15 +0100)]
add ifupdown helper to create veth devices plugged into bridges
Dietmar Maurer [Thu, 6 Mar 2014 10:31:12 +0000 (11:31 +0100)]
update documentation
Dietmar Maurer [Thu, 6 Mar 2014 08:46:12 +0000 (09:46 +0100)]
implement allow_bridge_route feature
Dietmar Maurer [Thu, 6 Mar 2014 07:22:00 +0000 (08:22 +0100)]
use perl taint mode
Dietmar Maurer [Thu, 6 Mar 2014 07:21:05 +0000 (08:21 +0100)]
do not use perl -w
Dietmar Maurer [Thu, 6 Mar 2014 07:18:59 +0000 (08:18 +0100)]
use RETURN instead of ACCEPT to allow further processing
Dietmar Maurer [Thu, 6 Mar 2014 07:02:45 +0000 (08:02 +0100)]
only update nf_conntrack_max if firewall is started
Dietmar Maurer [Wed, 5 Mar 2014 12:28:34 +0000 (13:28 +0100)]
plug venet0 chains into PVEFW-INPUT and PVEFW-OUTPUT
Container firewall should be fully functional now.
Dietmar Maurer [Wed, 5 Mar 2014 11:49:57 +0000 (12:49 +0100)]
plug venet0 chains into PVEFW-FORWARD
We can now partly filter container traffic. Still need to add checks
in PVEFW-INPUT and PVEFW-OUTPUT chains.
Dietmar Maurer [Wed, 5 Mar 2014 10:49:52 +0000 (11:49 +0100)]
add optimization as last step
Dietmar Maurer [Wed, 5 Mar 2014 10:43:35 +0000 (11:43 +0100)]
use parse_address_list to validate IP list
Dietmar Maurer [Wed, 5 Mar 2014 10:33:23 +0000 (11:33 +0100)]
generate chains for openvz venet
This is not fully functional, because we need to connect with uper level chains.
Dietmar Maurer [Wed, 5 Mar 2014 09:49:16 +0000 (10:49 +0100)]
add veth chain to is_pvefw_chain()
Dietmar Maurer [Wed, 5 Mar 2014 09:43:32 +0000 (10:43 +0100)]
start openvz support
Seems we can reuse generate_tap_rules_direction for bridged devices.
Dietmar Maurer [Wed, 5 Mar 2014 08:01:44 +0000 (09:01 +0100)]
use underscore instead of hyphen for fw options
Dietmar Maurer [Wed, 5 Mar 2014 07:50:04 +0000 (08:50 +0100)]
add nf_conntrack_max to example config
Dietmar Maurer [Wed, 5 Mar 2014 07:08:51 +0000 (08:08 +0100)]
implement nf_conntrack_max option
Dietmar Maurer [Wed, 5 Mar 2014 06:36:25 +0000 (07:36 +0100)]
cleanup - avoid warning about undefined value
Dietmar Maurer [Wed, 5 Mar 2014 06:30:11 +0000 (07:30 +0100)]
cleanups - use better names
Dietmar Maurer [Tue, 4 Mar 2014 11:54:52 +0000 (12:54 +0100)]
improve logging
Also log dropped inter-bridge traffic.
Dietmar Maurer [Tue, 4 Mar 2014 11:23:19 +0000 (12:23 +0100)]
correctly init PVEFW-FORWARD chain
We generate that chain by default, so the old code never triggered.
Dietmar Maurer [Tue, 4 Mar 2014 10:48:22 +0000 (11:48 +0100)]
add $bridge-OUT chain to PVEFW-INPUT
Dietmar Maurer [Tue, 4 Mar 2014 10:46:24 +0000 (11:46 +0100)]
clear mark when entering tapXZY-OUT chain
Dietmar Maurer [Tue, 4 Mar 2014 10:00:35 +0000 (11:00 +0100)]
correctly implement policy for host firewall
Dietmar Maurer [Tue, 4 Mar 2014 09:45:27 +0000 (10:45 +0100)]
factor out code to produce policy rules
Dietmar Maurer [Tue, 4 Mar 2014 09:23:07 +0000 (10:23 +0100)]
fix comment
Dietmar Maurer [Tue, 4 Mar 2014 09:19:02 +0000 (10:19 +0100)]
remove unnecessary rule
Dietmar Maurer [Tue, 4 Mar 2014 09:09:59 +0000 (10:09 +0100)]
s/enablehostfw/enable_host_firewall/
Dietmar Maurer [Tue, 4 Mar 2014 08:56:34 +0000 (09:56 +0100)]
make sure syncookies are enabled
Dietmar Maurer [Tue, 4 Mar 2014 08:27:26 +0000 (09:27 +0100)]
use PVE::ProcFSTools::write_proc_entry instead of system("echo ...")
Dietmar Maurer [Tue, 4 Mar 2014 08:19:08 +0000 (09:19 +0100)]
cleanup ruleset_generate_rule()
Dietmar Maurer [Tue, 4 Mar 2014 08:07:23 +0000 (09:07 +0100)]
improve clean target
delete emacs tmp files in all subdirs
Dietmar Maurer [Tue, 4 Mar 2014 08:04:37 +0000 (09:04 +0100)]
remove stale file
Dietmar Maurer [Mon, 3 Mar 2014 14:19:38 +0000 (15:19 +0100)]
merge IN/OUT section into RULES section
Dietmar Maurer [Mon, 3 Mar 2014 08:40:04 +0000 (09:40 +0100)]
assemble debian package
Dietmar Maurer [Fri, 28 Feb 2014 11:47:34 +0000 (12:47 +0100)]
implement log_level_in and log_level_out options
Dietmar Maurer [Fri, 28 Feb 2014 11:25:18 +0000 (12:25 +0100)]
implement log level options
Dietmar Maurer [Fri, 28 Feb 2014 09:50:44 +0000 (10:50 +0100)]
use a file to store firewall status persistently.
Start/stop saves state into a file. So the firewall remembers that status
even if the host is rebooted.
Also added helpers to update firewall rules and get current status.
Dietmar Maurer [Fri, 28 Feb 2014 09:36:28 +0000 (10:36 +0100)]
ignoreZ source/destination port if no protocol specified
Dietmar Maurer [Thu, 27 Feb 2014 11:54:11 +0000 (12:54 +0100)]
use defined() to check fot undefined value
Dietmar Maurer [Thu, 27 Feb 2014 11:52:05 +0000 (12:52 +0100)]
improve multiport rule generator
It is not allowed to use --sports and --dports together!
Dietmar Maurer [Thu, 27 Feb 2014 11:40:37 +0000 (12:40 +0100)]
fix Ping macro
Dietmar Maurer [Thu, 27 Feb 2014 11:12:45 +0000 (12:12 +0100)]
improve example
Dietmar Maurer [Thu, 27 Feb 2014 10:15:09 +0000 (11:15 +0100)]
allow to disable single rules, and add ability to add comments
Dietmar Maurer [Thu, 27 Feb 2014 08:40:23 +0000 (09:40 +0100)]
add 'dhcp' option (enabled by default)
Dietmar Maurer [Thu, 27 Feb 2014 08:37:17 +0000 (09:37 +0100)]
use PVEFW-reject instead of REJECT
Dietmar Maurer [Thu, 27 Feb 2014 07:54:11 +0000 (08:54 +0100)]
accept traffic to unmanaged bridge ports
Dietmar Maurer [Thu, 27 Feb 2014 06:23:42 +0000 (07:23 +0100)]
correctly apply macros
Allow to set additional parameters if they do not conflict with macros settings.
Dietmar Maurer [Wed, 26 Feb 2014 13:29:53 +0000 (14:29 +0100)]
implement nosmurfs options (enabled by default)
Dietmar Maurer [Wed, 26 Feb 2014 12:59:25 +0000 (13:59 +0100)]
implement option 'tcpflags' to log illegal combinations of TCP flags
Dietmar Maurer [Wed, 26 Feb 2014 12:42:48 +0000 (13:42 +0100)]
make mac address filtering optional (default enabled)
Dietmar Maurer [Wed, 26 Feb 2014 12:00:43 +0000 (13:00 +0100)]
use chains from previous commit to reduce logging
Dietmar Maurer [Wed, 26 Feb 2014 11:43:04 +0000 (12:43 +0100)]
add some useful chains
Those chains implement basically the same rules as related shorewall action.
Dietmar Maurer [Wed, 26 Feb 2014 11:40:53 +0000 (12:40 +0100)]
add a way to define some default chains
Dietmar Maurer [Wed, 26 Feb 2014 11:35:05 +0000 (12:35 +0100)]
fix multiport rules and add icmp type names
Multiport module needs --dports/--sports (instead of --dport/--sport).
Also, a single port Range does not require --multiport.
Also added the ability to use icmp type name as 'dport' when proto is icmp.
Dietmar Maurer [Wed, 26 Feb 2014 09:02:39 +0000 (10:02 +0100)]
cleanups
Dietmar Maurer [Wed, 26 Feb 2014 06:22:02 +0000 (07:22 +0100)]
always use PVEFW-SET-ACCEPT-MARK for OUT chain
That way we can re-use chains for the host firewall.
Alexandre Derumier [Tue, 25 Feb 2014 12:47:52 +0000 (13:47 +0100)]
bridge rules : -j ACCEPT for physical interfaces
We need to accept traffic at the end of bridge rules for outgoing packets from tap->ethX,
as we don't do ACCEPT in tap-out rules.
IN=vmbr0 OUT=vmbr0 PHYSIN=tap110i0 PHYSOUT=eth0
-A PVEFW-FORWARD -o vmbr0 -m physdev --physdev-is-bridged -j vmbr0-FW
-A PVEFW-FORWARD -i vmbr0 -m physdev --physdev-is-bridged -j vmbr0-FW
-A vmbr0-FW -m physdev --physdev-is-in --physdev-is-bridged -j vmbr0-OUT
-A vmbr0-FW -m physdev --physdev-is-out --physdev-is-bridged -j vmbr0-IN
-A vmbr0-FW -j ACCEPT
-A PVEFW-FORWARD -o vmbr0 -j DROP
-A PVEFW-FORWARD -i vmbr0 -j DROP
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Alexandre Derumier [Tue, 25 Feb 2014 12:24:06 +0000 (13:24 +0100)]
use RETURN instead ACCEPT for tap-out rules
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Dietmar Maurer [Tue, 25 Feb 2014 11:16:33 +0000 (12:16 +0100)]
implement VM policy option
Dietmar Maurer [Tue, 25 Feb 2014 10:54:38 +0000 (11:54 +0100)]
implement 'enable' option
And pass whole VM firewall config to generate_tap_rules_direction. That way we
have acces to {options} section.
Dietmar Maurer [Tue, 25 Feb 2014 10:42:32 +0000 (11:42 +0100)]
compile: use verbose output when started from CLI
Dietmar Maurer [Tue, 25 Feb 2014 10:29:22 +0000 (11:29 +0100)]
rename chain $bridge to $bridge-FW
and fix the activation bug.
Alexandre Derumier [Tue, 25 Feb 2014 08:44:54 +0000 (09:44 +0100)]
optimize bridge chains
fixme : I have this error "unable to update chain vmbrX".
But if I remove this check, the rules applying fine.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Alexandre Derumier [Tue, 25 Feb 2014 08:44:53 +0000 (09:44 +0100)]
parse_port_name_number_or_range fix range check
for port range a:b,
we need to check that b > a
this kind of range is invalid
80:22
80:ssh
http:ssh
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Dietmar Maurer [Fri, 21 Feb 2014 10:01:17 +0000 (11:01 +0100)]
do not delete PVEFW-INPUT, PVEFW-OUTPUT and PVEFW-FORWARD chain.
Dietmar Maurer [Fri, 21 Feb 2014 09:39:13 +0000 (10:39 +0100)]
implement simple option parser
Dietmar Maurer [Thu, 20 Feb 2014 12:14:58 +0000 (13:14 +0100)]
use conntrack instead of state
-m state --state is deprecated
Dietmar Maurer [Thu, 20 Feb 2014 11:39:38 +0000 (12:39 +0100)]
allow traffic from lo (PVEFW-INPUT)
Dietmar Maurer [Thu, 20 Feb 2014 10:35:51 +0000 (11:35 +0100)]
define more macros (converted most shorewall macros)
Dietmar Maurer [Thu, 20 Feb 2014 10:06:55 +0000 (11:06 +0100)]
use $rule->{dest} instead of $rule->{destination}
Dietmar Maurer [Thu, 20 Feb 2014 08:02:17 +0000 (09:02 +0100)]
implement macros
Dietmar Maurer [Wed, 19 Feb 2014 16:01:11 +0000 (17:01 +0100)]
only use --mark for OUT chain
Dietmar Maurer [Wed, 19 Feb 2014 10:24:49 +0000 (11:24 +0100)]
jump to ACCEPT for IN rules
Dietmar Maurer [Wed, 19 Feb 2014 09:59:37 +0000 (10:59 +0100)]
improve parser
Also avoid that we read the group file multiple times.
group file does not need to specify interfaces.