sourabhgkr
sourabhgkr

Reputation: 89

how to access local web application on glassfish server from internet?

I have created a web application in glassfish and I can access it on my LAN.

How can I access the web application from a remote location over internet? I do not have static IP.

Please reply. Thanks.

Upvotes: 2

Views: 5875

Answers (3)

Devendra  Singraul
Devendra Singraul

Reputation: 951

Steps :

  1. Creating virtual DNS(Domain name server) Server on your machine.

  2. Port Forwarding.

    Reference https://cookbook.fortinet.com/port-forwarding-60/

  3. Remote Desktop Connection enabling.

  4. Creating Inbound Rules. Reference :

https://www.howtogeek.com/112564/how-to-create-advanced-firewall-rules-in-the-windows-firewall/

  1. Creating account on www.noip.com and create custom host and download DUC (Dynamic Update Client) Software.

Some more steps may have it depends on your LAN Router and firewall configuration.Use http://ifconfig.me/ to get your public ip.

Upvotes: 1

Peter
Peter

Reputation: 366

I did this recently, first you need to use port forwarding on your router, access it by typing your default gateway path, mine was 192.168.0.1 then go to "advanced settings -> Port forwarding". Simply enter the details that are asked for, I set mine to HTTP using port 8080, yours might be different. Protocol is TCP. The IP address it asks for is your local address.

For quick testing you can disable the firewall on your machine and then you can search on google for your Public IP address by typing "what is my IP". Then type your ip into the browser and the port number "ipAddress:portNumber" You should see the glassfish welcome screen if it is successful.

After that you might want to enable your firewall again but then you have to add an inbound rules to allow the port to be used: Setting Windows inbound rules

Then you still have one last step to perform, allowing glassfish to access the resources on your machine: Adding glassfish to allowed programs Follow the instructions on adding java.exe only.

Upvotes: 0

Innot Kauker
Innot Kauker

Reputation: 1373

Access from outside your machine should be configured by default. You may check if it is so in admin console, at Configurations->server-config->Network config->Listenters. There should be one listening on the desired port (like 8080) and be bound to 0.0.0.0 address.

To easily access something behind a dynamic ip you need something like http://www.noip.com/ or http://www.dnsomatic.com/ (I took these from my router's control panel)

Upvotes: 0

Related Questions