I have Tomcat 6 installed on a server with multiple network interfaces; one is public-facing, and the other is on our internal network. Is there a way to configure Tomcat such that internal users are allowed to (attempt to) log in to the manager tool but users from the public internet receive an HTTP 403 or similar? I'm completely new to Tomcat and have been attempting to understand the documentation, but have had limited success.


You can restrict by source in tomcat manager configuration: ${tomcat_home}/conf/Catalina/localhost/manager.xml


<Context antiResourceLocking="false" privileged="true">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.0\.0\.1,8\.8\.4\..*"/>
</Context> and 8.8.4.* are allowed, everything else gets a 403. Value of allow is a comma separated regular expression.


If you have more than one interface and you want to restrict it, setup a separate connector for that app to run on with the address= directive in the connector.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.