Tech Blog

IT Administration

How To WhiteList URL in Linux?

By Namra Ramani3 min read
← Back to blog

Hi Folks! In this blog, we will learn how to whitelist URL in Linux.

What is a URL? - Tech Monitor
Why do we need a whitelist url?
  • The Velocity server allows administrators to regulate the accessibility of web addresses for devices that use the browser by utilizing a white list. By creating a white list, you’re constructing a set of addresses. Users may utilize this addresses to carry out their everyday tasks.
  • Whitelisting is useful for systems that aren’t open to the public. Imagine, you have an application that only a few of your company’s employees require access to, you might whitelist their computers’ IP addresses while blocking all other IP addresses from accessing the app.
  • Whitelisting is also beneficial when you wish to limit the activities that an application or service may do and prevent it from doing anything else. You may do this by adding specific types of behaviour on a whitelist. You may, for example, have a computer that you solely use for one specific activity. For example, in a hotel lobby, you may have a computer where guests can log in. You may add the hotel’s website to a whitelist, making it the only one that guests can view on the device. Another example is a policy that enables a microservice to use a given amount of resources or operate on a certain server while shutting it down if it tries to consume more resources or run on a different host.
  • Because the number of conceivable behaviours that you don’t want your programme to execute is too large, blacklisting would not be practicable. You can’t foresee everything the programme will do, but if you only want it to perform a few things, you can describe what you want it to accomplish.
How to Whitelist urls?
  • Install dnsmasq and For installing that run command

sudo apt-get install dnsmasq.

  • Need to stop systemd-resolved service using the following command.

sudo systemctl stop systemd-resolved 

sudo systemctl disable systemd-resolved 

sudo systemctl mask systemd-resolved

  • Add the following line in /etc/dnsmasq.conf for whitelisting urls.

address=/#/127.0.0.1

server=/customurl.com/8.8.8.8

  • Reload the daemon using following command

sudo systemctl daemon-reload

  • Restart the dnsmasq service 

sudo service dnsmasq restart

Now you can check in the browser that the url is whitelisted.

How to remove Whitelist urls?
  • Stop dnsmasq service

sudo service dnsmasq stop

  • stop systemd-resolved service

sudo systemctl unmask systemd-resolved

sudo systemctl enable systemd-resolved 

sudo systemctl start systemd-resolved

  • Reload the daemon using following command

sudo systemctl daemon-reload

Keep reading

You may be interested in

Browse all articles →
Using SCEP Certificates with Okta and SureMDM for Zero Trust Security
August 5, 20257 min read

Using SCEP Certificates with Okta and SureMDM for Zero Trust Security

For businesses embracing zero-trust principles, secure certificate-based authentication isn’t just nice to have—it’s a necessity. With Okta as your Identity Provider (IdP) and SureMDM as your unified endpoint management solution, you can now seamlessly distribute and manage device certificates using Simple Certificate Enrollment Protocol (SCEP). This blog will guide you through: Why Use SCEP with […]

By Sunny KumarRead More →
Setup minio storage in Ubuntu with Nginx
May 12, 20235 min read

Setup minio storage in Ubuntu with Nginx

Minio Storage : Minio is an open source object storage server that stores unstructured data such as photos, videos, log files, backups, and container/VM images. It is a lightweight, reliable, and secure alternative to hosting large amounts of data on distributed network drives or in the cloud. Minio is a cloud storage service that offers […]

By Malkeet SinghRead More →
Enable remote and set authentication to MongoDB
May 12, 20232 min read

Enable remote and set authentication to MongoDB

Remote access to MongoDB: MongoDB’s remote capabilities are extremely helpful for businesses and organizations that have multiple locations. With remote access, users can access their databases from anywhere in the world and manage data without having to be physically present in the same location. This can be especially helpful for businesses that need to access […]

By Malkeet SinghRead More →