Skip to main content

Securing the REST API

This guide explains how to control REST API security on Ant Media Server. You could secure your REST services with the IP Filter feature.

IP Filter for the 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 panel.

If is deleted, requests on the server (localhost) are 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 the REST Filter in AMS, you should delete the below codes in /usr/local/antmedia/webapps/Application-Name/WEB-INF/web.xml



If you delete the AuthenticationFilter code block in the application, everyone can access the REST API.

IP Filter for the Web Panel

  • Open /usr/local/antmedia/conf/ file.

  • The 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 a demo of how to configure the IP filter

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