Skip to content

How to enable IP filter for Ant Media Servers behind load balancer in AWS?

Murat Ugur Eminoglu edited this page May 17, 2022 · 6 revisions

Attention: We have migrated our documentation to our new platform, Ant Media Resources. Please follow this link for the latest and up-to-date documentation.


NOTE: This doc is added in FAQ section.


How to enable IP filter for Ant Media Servers behind load balancer in AWS?

  1. Edit the following file with a text editor.

vim /usr/local/antmedia/conf/jee-container.xml

  1. Find the line as follow.

<bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve">

And add the following line before it.

<bean id="valve.access" class="org.apache.catalina.valves.RemoteIpValve" />

  1. Find another line as follow.

<property name="rotatable" value="true" />

and add the following line before it.

<property name="requestAttributesEnabled" value="true" />

  1. After adding these lines, restart Ant Media Server with the following terminal command.

systemctl restart antmedia

The last edited version of the file will look like the following.

    <bean id="valve.access" class="org.apache.catalina.valves.RemoteIpValve" />
    <bean id="valve.access" class="org.apache.catalina.valves.AccessLogValve">
            <property name="directory" value="log" />
            <property name="prefix" value="${http.host}_access" />
            <property name="suffix" value=".log" />
            <property name="pattern" value="common" />
            <property name="rotatable" value="true" />
            <property name="requestAttributesEnabled" value="true" />

Now, You can use the IP filter.

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally