I have just moved from one hosting environment to another, and my networking has changed somewhat.
Previously, requests from a server to its own external IP address were routed to localhost and the ping times were indistinguishable from pinging localhost:
wg@akl2:~$ ping akl2.wb.gs
PING akl2.wb.gs (112.109.67.244) 56(84) bytes of data.
64 bytes from akl2.wb.gs (112.109.67.244): icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from akl2.wb.gs (112.109.67.244): icmp_seq=2 ttl=64 time=0.031 ms
[...]
wg@akl2:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.057 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.033 ms
Now I'm in an OpenStack environment, and the ping times are very different:
ubuntu@legacy1:~$ ping legacy1.webgenius.co.nz
PING legacy1.webgenius.co.nz (103.250.241.12) 56(84) bytes of data.
64 bytes from 103-250-241-12.rev.nz-hlz-1.catalystcloud.nz (103.250.241.12): icmp_seq=1 ttl=63 time=0.912 ms
64 bytes from 103-250-241-12.rev.nz-hlz-1.catalystcloud.nz (103.250.241.12): icmp_seq=2 ttl=63 time=0.643 ms
[...]
ubuntu@legacy1:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.033 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.051 ms
The above two requests should be completely local, as in they should not leave the machine.
How can I route those requests to the local interface?