This article describes how to setup GRE PTP tunnel on RHEL and Ubuntu linux distributives.
General
GRE visualization:
GRE tunnels are IP-over-IP tunnels which can encapsulate IPv4/IPv6 and unicast/multicast traffic. To create a GRE tunnel on Linux, you need ip_gre kernel module, which is GRE over IPv4 tunneling driverю
For GRE configuration 2 pairs of addresses are needed - external address of each peer and internal address used inside tunnel on each peer.
First check kernel modules:
lsmod | grep gre
modprobe ip_gre
modinfo ip_gre
Interface configuration on RHEL:
DEVICE=tun0
BOOTPROTO=none
auto tun0
iface tun0 inet static
address 172.17.254.1
netmask 255.255.255.0
broadcast 172.17.254.255
up ifconfig tun0 multicast
pre-up iptunnel add tun0 mode gre local 95.167.35.26 remote 178.45.248.69 dev ens3 ttl 255
pointopoint 172.17.254.2
post-down iptunnel del tun0