What is the IP address of my CAS server?

If you use the GB Cloud CAS, you may quickly identify the current IP by opening a DOS/terminal window and using this command:

ping cloud.generalbytes.com -c 1

Your hosted server will have one (or more) IP addresses assigned to it.  CAS setup & usage requires knowledge of your PUBLIC IP. This guide will help you quickly find it.

The simplest way:

1 wget -qO - icanhazip.com

Option 2: For Ubuntu (and other Debian derivatives), type on the command line:

1 hostname -I
  • This will list ALL configured IP's for that server. 

  • With most hosting services, the first IP will be the "public" IP.

Based on the aforementioned premise, THIS will list the public IP (only):

1 hostname -I | awk '{ print $1 }'
  • Copy & paste the command ( usually Shift-Ctrl-C & Shift-Ctrl-V ) to avoid mistakes.

  • Assumes the first listed IP is the "public" IP.

Option 3: Lastly, this method is yet another (more cumbersome) way to list all your server's IP addresses:

1 ifconfig | grep "inet addr:" | sed /:127/d | cut -f2 -d':' | cut -f1 -d' ' | head -n1

This file is required for email notifications (amongst other purposes):

1 /batm/config/hostname

and should contain your public IP (by itself). This can be quickly created with:

1 hostname -I | awk '{ print $1 }' > /batm/config/hostname
  • execute as sudo (root)!

This file is required for the admin service to function:

1 /batm/config/network

and should contain your public IP. This can be quickly created with:

1 echo "public_ip="$( wget -qO - icanhazip.com ) > /batm/config/network
  • execute as sudo (root)!

NOTE: Digital Ocean (as of this writing) has problems with the pipe symbol ("|") when using the WEB CONSOLE.

The pipe "|" will be mistakenly converted to a ">" and the command will FAIL.

They are aware of this glitch and are working to resolve it with their vendors. In the meantime, they recommend that you use a regular SSH console to accomplish tasks & scripts involving pipes (as used in this article).