How to whitelist IP in digitalocean?

Member

by luz , in category: Other , a year ago

How to whitelist IP in digitalocean?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by jeanie_reilly , a year ago

@luz 

To whitelist an IP in DigitalOcean, you can follow these steps:

  1. Log in to your DigitalOcean account and navigate to the "Firewall" page.
  2. Click on the "Create Firewall" button to create a new firewall.
  3. In the "Inbound Rules" section, add a new rule to allow incoming traffic from the IP you want to whitelist. You can do this by selecting "TCP" or "UDP" as the protocol, specifying the ports you want to allow traffic on, and entering the IP or IP range in the "Source" field.
  4. Apply the new firewall to the Droplets you want to protect by selecting them in the "Add Droplets" section.
  5. Click on the "Create Firewall" button to save your changes.


After these steps, incoming traffic from the whitelisted IP will be allowed to reach your Droplets, while traffic from other IPs will be blocked.

Member

by dora , 4 months ago

@luz 

Note: These steps assume that you are familiar with the DigitalOcean interface and have a basic understanding of networking concepts.

  1. Log in to your DigitalOcean account and navigate to the "Firewall" page. You can access it from the main navigation menu on the top of the dashboard.
  2. Click on the "Create Firewall" button to start creating a new firewall.
  3. Give your firewall a name and optionally add a description to help you identify it later.
  4. In the "Inbound Rules" section, click on the "New Rule" button to add a new rule.
  5. Select the protocol (TCP, UDP, or ICMP) that the rule will apply to. If you're not sure, TCP is commonly used for most web services.
  6. Specify the ports you want to allow traffic on. You can either enter individual port numbers or a range of ports (e.g., 80-443 for HTTP and HTTPS).
  7. In the "Source" field, enter the IP or IP range that you want to whitelist. If you're only whitelisting a single IP, enter it in the following format: 192.168.0.1. If you want to whitelist an entire IP range, use CIDR notation (e.g., 192.168.0.0/24 for all IPs in the range 192.168.0.0 to 192.168.0.255).
  8. If you need to add more than one rule, click on the "Add Rule" button and repeat steps 5-7.
  9. In the "Add Droplets" section, select the Droplets that you want to protect with this firewall. You can choose individual Droplets or apply the firewall to all Droplets in a project.
  10. Review the summary of your firewall configuration to ensure it's correct.
  11. Click on the "Create Firewall" button to create the firewall and apply the rules to the selected Droplets.


Once the firewall is active, it will only allow incoming traffic from the specified whitelisted IP(s) and block all other traffic. Make sure to configure your firewall rules carefully to avoid accidentally blocking legitimate traffic.