@m1keil pointed out a faster way to get the external ip.