3 Replies Latest reply on Oct 8, 2015 1:42 PM by jaysensharma

    Filtering Clients by Source

    pstamatakos

           On jBoss 6.2 EAP, I deploy 2 applications / war files. I would like one of them to be accessible only from a specific IP address. I found for an earlier jBoss release I could configure application.war\WEB-INF\Context.xml like:

      <Context>

        <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="199.999.*.*" />

      </Context>

       

      I tried but it did not work. Any suggestions?

        • 1. Re: Filtering Clients by Source
          pstamatakos

          Another solution would be to run the specific application on a different port than the other app and using firewall settings to apply the same restriction. Again I found instructions for an earlier jBoss release.

          • 2. Re: Filtering Clients by Source
            ctomc

            you can add your valve configuration to your WEB-INF/jboss-web.xml which would than behave pretty much same as what you had in server.xml

             

            also in EAP6.2+ you can use valve configuration in web subsystem.

            • 3. Re: Filtering Clients by Source
              jaysensharma

              One such example of jboss-web.xml can be found here: http://middlewaremagic.com/jboss/?p=494

               

               

              <jboss-web>

              <valve>

                 <class-name>org.apache.catalina.valves.RemoteAddrValve</class-name>

                   <param>

                      <param-name>allow</param-name>

                      <param-value>*</param-value>

                   </param>

                   <param>

                      <param-name>deny</param-name>

                      <param-value>122.168.186.162</param-value>

                   </param>

                 </valve>

              </jboss-web>