Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phpcodertop/c8ea943524e837aab1c8686369f8f749 to your computer and use it in GitHub Desktop.
Save phpcodertop/c8ea943524e837aab1c8686369f8f749 to your computer and use it in GitHub Desktop.
To isolate the layer in which the issue is occurring, information concerning kernel, firewall and network interface states will help in resolving the issue at hand.
You should be able to leverage the Web Console for the droplet to evaluate the details of the following commands.
First, we would recommend reviewing the contents of your interface configuration file.
From here you can ensure that there is an entry for your public interface and that it contains correct information including your public IPv4 address, gateway, netmask, etc.
If needed, you can reference the information made available to you on the 'Networking' page of your Droplet or under your web console screen to ensure this information is correct.
cat /etc/netplan/50-cloud-init.yaml
Next, you will need to ensure that your network managing service is able to pick up on these details and bring up your public interface.
To see network interfaces currently in use, you can use the following command.
ip addr
To ensure that routing to your gateway is working properly, you can run the following:
ip route
You will also want to ensure that you are not attempting to boot the Droplet using a kernel that is not
properly installed as this will also cause problems with networking on your Droplet.
You can do this by first confirming the kernel your Droplet is configured to use and compare this to the contents of
your installed kernel libraries. This can be done by running the following commands:
uname -a
ls -l /lib/modules
Next, we would recommend reviewing your existing software firewall rules to see if there are any rules that
would be preventing connectivity over the protocols you are attempting to use or would be blocking traffic entirely.
iptables -nvL --line-numbers
Lastly, we would recommend checking for existing persistent rules.
When a Droplet is resized, migrated, created from a Snapshot, etc,
it can result in an incorrect physical mac address being listed as related to your public interface even though
this would have changed due to one of these types of events.
Your actual physical address will likely be listed in your interface configuration file to compare to.
If it is not clear if the correct address is specified here,
we would recommend simply renaming or removing the file as it will be created again and repopulated with the correct information
next time you reboot your Droplet.
cat /etc/udev/rules.d/70-persistent-net.rules
We hope this is helpful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment