cloudgoat icon indicating copy to clipboard operation
cloudgoat copied to clipboard

IPv6 Address Returned for Whitelist.txt

Open thetestlabs opened this issue 2 years ago • 0 comments

When running ./cloudgoat.py config whitelist --auto I get the following error:

[cloudgoat] Unknown error: Did not receive a valid IP address. Received this instead:
2a00:23c8:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/32

This is due to Cloudgoat expecting an IPv4 address, but receiving and IPv6 address from ifconfig.co.

Looking at the git history, it seems that curl is no longer used to retrieve the IP address. and that the default address returned from ifconfig.co is the IPv6 address. Running curl -4 ifconfig.co/json returns the IPv4 address that Cloudgoat is expecting to populate the whitelist.txt file.

I'm presuming that a workaround is to add the IPv4 addresses in the following format to whitelist.txt:

xx.xx.xx.xx/32 xx.xx.xx.xx/32 etc.

thetestlabs avatar Jun 11 '22 15:06 thetestlabs