Question

How to only allow Internet access to my Floating IP and block Internet access to the other droplet IP's

Posted May 1, 2021 165 views
NetworkingClusteringUbuntu 18.04

I am using a Floating IP to access one droplet in a group of droplets. Now I need to block public Internet access to the other droplets in the group and only allow access to the droplet assigned the Floating IP. I am running Ubuntu 18.04 LTS. How can I achieve this with UFW?

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.

×
Submit an Answer
1 answer

Hi there,

With UFW I believe that you could deny the traffic for a specific interface.

To do so, you would need to first find out the interface for your static IP, you can do that with the ip a or the ifconfig commands.

After that to deny the inbound traffic you could use the following:

ufw deny in on eth0123

Note that you would need to change the eth0123 part with the interface that you want to deny access to.

Hope that this helps.
Regards,
Bobby