Securing the REST API
  • 30 Mar 2022
  • 1 Minute to read
  • Dark

Securing the REST API

  • Dark

This guide explains how to Control REST API Security on Ant Media Server. You could secure your REST Services with IP Filter feature.

IP Filter in REST API

If you want only some IP addresses to be able to access REST APIs, you should add IP’s or IP Ranges in Dashboard > {Application} > Settings > IP Filtering Settings in panel.


If is deleted, requests in the server(localhost) is disabled. Devices in the same network can access but other devices that are not cannot access the REST API when is on the list.

If you want to remove REST Filter in AMS, you should delete below codes in SERVER_FOLDER/webapp/Application(LiveApp or etc.)/WEB-INF/web.xml



 If you delete AuthenticationFilter code block in Application, every one can access your REST API.

Changing IP filter from configurations file

  • Open /usr/local/antmedia/conf/ file.
  • Find the following line. Default configuration lets all IPs access the web panel.
  • Change the configuration according to your CIDR notation. You can add comma-separated CIDR notations as well.

Save the file and restart the server.

Now only the IPs that are in the CIDR block can access the web panel.

Here is the IP Filter Demo:

For more details, you can check this link -> IP Filter Gif

Was this article helpful?