How to disable external IP address

I am trying to figure out how you disable access by external IP address, primarily for security purposes. Also it is really a waste of an IP addressas I dont need it. I want to access my Ubuntu droplets/servers via a publicly facing VPN server droplet, then access the subsequent droplet/servers via the local VPC i.e. on VPN server droplet to a service running on… my client via VPN can see all of thesejust fine. However, if I apply a firewall to the servers, the configuartion applies itself to both external and VPC connectivity. It gets hard to define rules for this… unless maybe I say you can only accept connectivity from the range??? Ideally, rather than create firewall rules on the droplet, I am after a way to do this through DO web UI. However, when I try to disable eth0 on one of the droplets, it isnt present in the /etc/network/interfaces file… It appears I need to run network manager which is a UI based program. Obviooulsy this is not possible over SSH. All very confusing. Surely others must require something similar for DB hosting were they dont want any aspect of it externally reachable, but reachanble on internal private network.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Kind of got an answer to this myself. So documenting it here for future use as it wasnt apparent. In the firewall config, you can limit the rules to specific IPs and IP ranges. When I created my rule, rather than let all ip4 and ip6, I deleted those rules, and entered the name of my VPN server. This gave me the option to restrict all inbound traffic and only allow it from the VPN server thus effectively shutting off the external IP. I do think however, there should be an easier option in the general DO UI to just turn off the external IP.