6 Replies Latest reply on Sep 1, 2015 5:12 AM by Ayyoub EL Merzougui

    set Jboss 7.1 access via internet

    Ayyoub EL Merzougui Newbie

      I'am working on a jee project using JBOSS as web server, during development we shared application on LAN (intranet) for testing, now we try to share the application via the internet, so how can i set jboss 7.1 to be accessible from the internet, we have server with JDK and we have a public IP address.

      so i need help, can someone tell me how can i configure my standalone.xml to be accessible via internet.


        • 1. Re: set Jboss 7.1 access via internet
          Wolf-Dieter Fink Master

          That is not only a JBoss issue.

          First you need to setup your JBoss to listen on public IP addresses.

          Now it depends wheter your machine is accesible public or not.

          Let assume you have an internal address like 192.168.1.2 and the machine is not reachable from the internet.

          The JBoss is started and listen to this IP, there should be a router to connec to the internet. In this case you need to have a public address - this can be static together with a domain (like jboss.org) or dynamic (i.e. all private cinnections).

          Now you need to configure the router to forward requests to your JBoss.

          Lets assume http traffic you need to add a forward from external port lets say 80 (or different) to 192.168.1.2:8080, in this case you cann acccess JBoss by <your external IP>:80

           

          For ejb's or JNDI it is more complicated

          • 2. Re: set Jboss 7.1 access via internet
            Ayyoub EL Merzougui Newbie

            Hi wolf,

            yes you are right, in my situation i have a public ip adresse and i set my stand alone to listen on @IP:8080.

            but it still doesn't work.

            our server is an unix os, i think that we have to authorize access to port :8080 in server side.

            • 3. Re: set Jboss 7.1 access via internet
              Wolfgang Mayer Master

              Which error messages do you get?

              Did you verify that port 8080 is not blocked by the firewall?

              • 4. Re: set Jboss 7.1 access via internet
                Ayyoub EL Merzougui Newbie

                so, I authorise :8080 port from cpanel and still doesn't work. When i execute "iptable -l" i didn't see that :8080 is accepted.

                • 5. Re: set Jboss 7.1 access via internet
                  Wolfgang Mayer Master

                  The ports should be listed when using the --list-rules option instead, like:

                  iptables --list-rules

                  Which error messages do you get?

                  Did you check the traffic via a network protocol analyzer (like Wireshark)?

                  • 6. Re: set Jboss 7.1 access via internet
                    Ayyoub EL Merzougui Newbie

                    To host a jboss web application in internet you have to :

                     

                        -    set the public @ip of the server, or 0.0.0.0 (this mean listen to all interfaces) in                    /stanalone/configuration/standalone.xml.


                                <interface name="public">

                                    <inet-address value="${jboss.bind.address:0.0.0.0}"/>

                                </interface>

                     

                        -    set port of http access. In my casa i want to allow access to my jboss web application from :8080


                                <socket-binding name="http" port="8080"/>

                     

                    Now the jboss configuration is setup. Before launching the request @ip:8080/Project check if the firewall allow access to your port, if not, authorize access to the port, restart your firewall service, start your Jboss server.

                    now you can use your Jboss web application from the internet.