I manage a 4 nodes Proxmox cluster.
Nodes are located in two different datacenters and connected through public network.
Till SDN there was no L2 shared between nodes private (aka host only) network.
Using SDN (eg. vxlan zones) it's possible to distribute interconnected bridges allowing a bunch of really nice features.
The problem is that vxlan does not currently implement any type of encryption.
Obviously using public network connections without encryption is not viable.
Spirit said that MACsec is on the way (probably later this year) but at the moment I think the simplest way is to use ipsec for vxlan connections.
Configuration is really simple, let's say you have a 3 nodes cluster,
first of all you need to install strongswan on each Proxmox box:
even if it is not necessary I suggest to insert nodes address in hosts file.
Obviously this is only an example:
Then you have to configure your ipsec tunnels.
Edit /etc/ipsec.conf (this is the fast way, using /etc/ipsec.d/ files could be better):
add preshared keys editing /etc/ipsec.secrets:
obviously you have to properly edit ipsec.conf and ipsec.secrets on each node.
Finally you can start strongswan on each node:
and check if everything is running fine:
to start encryption at boot time:
Just my two cents.
Cheers.
Massimo
Nodes are located in two different datacenters and connected through public network.
Till SDN there was no L2 shared between nodes private (aka host only) network.
Using SDN (eg. vxlan zones) it's possible to distribute interconnected bridges allowing a bunch of really nice features.
The problem is that vxlan does not currently implement any type of encryption.
Obviously using public network connections without encryption is not viable.
Spirit said that MACsec is on the way (probably later this year) but at the moment I think the simplest way is to use ipsec for vxlan connections.
Configuration is really simple, let's say you have a 3 nodes cluster,
first of all you need to install strongswan on each Proxmox box:
Code:
root@node1 /etc # apt install strongswan
even if it is not necessary I suggest to insert nodes address in hosts file.
Obviously this is only an example:
Code:
root@node1 / # cat /etc/hosts
127.0.0.1 locahost.localdomain localhost
173.x.y.z node1
167.x.y.z node2
80.x.y.z node3
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Then you have to configure your ipsec tunnels.
Edit /etc/ipsec.conf (this is the fast way, using /etc/ipsec.d/ files could be better):
Code:
root@node1 / # cat /etc/ipsec.conf
conn common
authby=secret
auto=start
ike=aes256-sha1-modp1024! # in my tests these seem to be the fastest (but reasonably secure)ciphers on reasonably modern hardware
esp=aes256-sha1!
leftfirewall=yes # this is necessary when using Proxmox firewall rules
left=node1
leftsubnet=node1[udp/4789] # encrypt only vxlan traffic
conn node1-to-node2 # the idea is to full mesh your nodes
also=common
right=node2
rightsubnet=node2[udp/4789]
conn node1-to-node3
also=common
right=node3
rightsubnet=node3[udp/4789]
add preshared keys editing /etc/ipsec.secrets:
Code:
root@node1 / # cat /etc/ipsec.secrets
node1 node2 : PSK "superstrongpassword"
node1 node3 : PSK "superstrongpassword"
obviously you have to properly edit ipsec.conf and ipsec.secrets on each node.
Finally you can start strongswan on each node:
Code:
root@node1 / # ipsec restart
and check if everything is running fine:
Code:
root@node1 / # ipsec statusall
to start encryption at boot time:
Code:
root@node1 / # systemctl enable ipsec
Just my two cents.
Cheers.
Massimo
Last edited: