I successfully created VTI over IPSec Site-to-Site tunnel between my home router (UBNT Edgerouter) and dedicated server (Ubuntu 16.04) at OVH. I can route internal private networks of each sides via VTI device and access it on the other site (I can access site B private range devices from NATed devices (for ex. from computer behind router) at Site A, and that's great), but I have a problem with routing a public network over it.
Site A: Home Router:
Public Main IP: 89.x.x.81
Private IPs (NATed home devices): 10.100.10.1/24
VTI: 10.255.12.1/30
~# ip r
default via 89.x.x.1 dev eth0 proto zebra
10.100.10.0/24 dev eth1 proto kernel scope link src 10.100.10.1
10.255.12.0/30 dev vti0 proto kernel scope link src 10.255.12.1
89.x.x.0/22 dev eth0 proto kernel scope link src 89.x.x.81
172.16.0.0/12 dev vti0 proto zebra
~# ip tunnel
vti0: ip/ip remote 51.x.x.136 local 89.x.x.81 ttl inherit nopmtudisc ikey 0 okey 1234
ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0
Site B: Server at OVH:
Public IP: 51.x.x.136
Public IPs block assigned/routed to server: 51.x.x.128/28 (only .136 configured on server)
Private IPs (OVH vRack): 172.16.0.1/12
VTI : 10.255.12.2/30
~# ip r
10.100.10.0/24 dev vti0 scope link
10.255.12.0/30 dev vti0 proto kernel scope link src 10.255.12.2
51.x.x.142 dev eth0 scope link
172.16.0.0/12 via 172.16.0.1 dev eth0 scope link
172.16.0.0/12 dev eth0 proto kernel scope link src 172.16.0.1
~# ip tunnel
ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0
vti0: ip/ip remote 89.x.x.81 local 51.x.x.136 ttl inherit nopmtudisc key 1234
Goal:
Configure one or multiple Public IP(s) from OVH server block (51.x.x.128/28) via VTI device on home router (then I will make 1:1 NAT there for assigning the IP to server behind router) or directly on device behind home router if possible.
It is possible on VTI or should I consider a change from VTI to GRE and then follow this: https://serverfault.com/a/557949 ?