Here’s a simple solution in order to forward
GRE tunnels to a server, or here a virtual machine, which is located behind a GNU/Linux gateway:
# iptables -t nat -A PREROUTING -i eth0 -p gre -j DNAT --to-destination 192.168.0.1
No need for complex
FORWARD combinations as I could read here and there.
In my case, the virtual machine is a NetBSD domU where I created the following
# cat /etc/ifconfig.gre0
188.8.131.52 being the remote public IP address
192.168.0.1 is the
domU private IP address
2 are the tunnel endpoints.