At some point, you're going to want to disable IPv6 as it might be conflicting with the services you run on that server. Doing this is fairly easy in Ubuntu.
First of all, run this command to verify if IPv6 is currently available on your server:
If you see an IPv6 address there, then IPv6 is enabled for your server. We'll continue on how to disable this.
You can either disable it for the time the server is booted or permanently. We'll start with the temporary one first.
SSH into your server and run the following commands:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
Next, run again:
The IP address from the previous screenshot should be gone now.
If you want to permanently disable IPv6, edit the /etc/sysctl.conf file (as root, or use sudo). Scroll all the way down, and paste these lines:
net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
To make the changes come through, run the following command:
sudo sysctl -p
Now, IPv6 will always be disabled, even when you restart the server.