I'm using a GRE tunnel on a few Ubuntu servers to join multiple AWS regions in separate VPCs into one internal network to reduce the number of IPs I need, as well as network complexity.
Right now, my configuration for this looks as such:
# Tunnel 1: N. California -> N. Virginia auto tun1 iface tun1 inet manual up ip tunnel add tun1 mode gre local 10.10.7.58 remote a.b.c.d post-up ip link set tun1 up mtu 1400 post-up ip addr add 192.168.10.1 dev tun1 post-up ip route add 192.168.10.0/30 dev tun1 post-up ip route add 10.10.8.0/21 dev tun1 down ip tunnel del tun1 post-down ip route del 10.10.8.0/21 post-down ip route del 192.168.10.0/30
As you can see, the idea is pretty simple, the tunnel just acts as a gateway for traffic that's going between the regions and I use an elastic IP on the other region for a.b.c.d. This part works without issue.
The problem is, a lot of the traffic that will be moving between the networks will need to be encrypted, since it's actually going over the open internet. I've been able to find a lot of information on how to add IPsec encryption to this on a Cisco router, but I can't find any on how to do this on Ubuntu.
Any help is greatly appreciated. :-)