public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] copy conntrack information on migration
Date: Sat, 17 Oct 2020 17:42:29 +0200	[thread overview]
Message-ID: <CAMGxVzBeP3j6CsF8SXnV8crdv15d3AC6_1MNrTQSdnB=82eEDQ@mail.gmail.com> (raw)
In-Reply-To: <20201016132417.5175-3-m.limbeck@proxmox.com>

Hi,
thanks for this patch !

It could be interesting to see if it's working fine with
sysctl -w net/netfilter/nf_conntrack_tcp_loose=0

This is to avoid  ack flood ddos  (where random ack packets can add a
lot of conntrack entries)
https://2014.rmll.info/slides/356/day_1-1400-Jesper_Brouer-DDoS_protection_using_Netfilter_iptables.pdf

Currently we can't enable it because  when we migrate vms, the already
opened connected can't readd conntrack without a new syn.


Also, is it fast when a lof of entries ? (like 100000 entries for example)


Le ven. 16 oct. 2020 à 15:24, Mira Limbeck <m.limbeck@proxmox.com> a écrit :
>
> Requires the pve-conntrack-tool. On migration the conntrack information
> from the source node is dumped and sent to the target node where it is
> then inserted.
> This helps with open connections during migration when the firewall is active.
>
> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
>  PVE/QemuMigrate.pm | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 11fec4b..a4e24f7 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -1065,6 +1065,9 @@ sub phase2 {
>             die "unable to parse migration status '$stat->{status}' - aborting\n";
>         }
>      }
> +
> +    $self->log('info', 'copy conntrack information');
> +    PVE::Tools::run_command([['/usr/bin/pve-conntrack-tool', 'dump'], [@{$self->{rem_ssh}}, '/usr/bin/pve-conntrack-tool', 'insert']]);
>  }
>
>  sub phase2_cleanup {
> --
> 2.20.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>



  reply	other threads:[~2020-10-17 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 13:24 [pve-devel] [PATCH conntrack-tool 1/2] initial commit Mira Limbeck
2020-10-16 13:24 ` [pve-devel] [PATCH conntrack-tool 2/2] add packaging support Mira Limbeck
2020-10-16 13:24 ` [pve-devel] [PATCH qemu-server] copy conntrack information on migration Mira Limbeck
2020-10-17 15:42   ` Alexandre Derumier [this message]
2020-10-19  5:46     ` Thomas Lamprecht
2020-10-19  9:24     ` Mira Limbeck
2020-10-19 10:56       ` Alexandre Derumier
2020-10-18 15:07   ` Alexandre Derumier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMGxVzBeP3j6CsF8SXnV8crdv15d3AC6_1MNrTQSdnB=82eEDQ@mail.gmail.com' \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal