How to make my IP publicly accessible to make my local Tomcat server public?
Solution 1:
Yes, it is possible. It is called "Port Forwarding".
119.56.1.78 - is your public IP address.
192.168.1.1 - is your private IP address on the LAN.
To see how port forwarding is done read this very good and short tutorial with lots of nice pictures:
How to Forward Ports on Your Router
Solution 2:
You need to do forward your 8080 port
through your router.
If your IP
changes (you have a dynamic IP
or a static IP
, this is determined by your ISP
) you can get a host name from dyndns and set up your router to update dyndns
with your new IP
when it changes. this will allow you to access your application like so:
hostname.dynsns.org/your_app
Alternatively, you can rent a hosted server and a domain name.
Solution 3:
If it is for short term, you can use localtunnel
(same like ngrok
).
Just follow these steps (require: NodeJS):
-
Install
localtunnel
by runningnpm install -g localtunnel
-
Assumes, your app is running on
http://localhost:8080/
, then runlt --port 8080
It will create a public url domain with a random name like this.
Note: You can create custom url as well (eg: lt --port 4200 -s "sangeeth"
, -s
means subdomain).
Ta-da! It's done!