Ever thought sites like ifconfig.me and similar are too slow from the command line? Here I'll show you how easy it is to setup something similar to those services - except it is extremely fast because of Varnish.

The receiver part:

sub vcl_recv {
  if (req.http.host == "ipv4.is") {

The synthetic part:

sub vcl_synth {
  if (resp.status == 800) {
    set resp.status = 200;
    return (deliver);

Go to http://ipv4.is or test it out from the terminal:

curl ipv4.is