This blog aims to detail the day to day changes to my infrastructure. That one is composed of 2 rented servers and 1 PC Engines APU2 for OpenBSD firewall at home. The aim is to have redundant services (if possible) while testing new technologies. The 2 rented servers come with Debian Jessie preinstalled.
Today I configured ipsec + gre tunnels between the 3 boxes and created some routed LAN for kvm on the rented server.
I also hardened the server with iptables and added fail2ban.
Fail2ban
Install fail2ban package
In /etc/fail2ban/jail.conf modify the line ignoreip and increase ban time
Restart service
KVM
Install packages and enable packet forwarding on the box
Create a routed network for VM
Note: Do not create the network in /etc/network/interfaces. Libvirtd is taking care of creating the interface virbr1 and affecting the IP address.
Create a file named vmnetwork.xml with the following content:
Enable the new network
Create the outgoing rule
Make the iptables changes persistent by first, creating a file named /etc/network/if-pre-up.d/iptables
IPSEC and GRE
Install packages
Create the /etc/ipsec.conf file
Add your passphrase to /etc/ipsec.secrets
Create the GRE tunnel interface by adding the file /etc/network/interfaces.d/gre1