How to make my IP address a public web address?

8,774

The address 10.0.2.15 is a private address and can't be reached from outside your network.

To make your server public to the internet you have to follow these steps:

  1. Find your public IP. For example visit from the network this website www.whatismyip.com

  2. In the router that connects your network to the internet you have to open the port 80 and redirect it to the IP address of your server (10.0.2.15).

This generic guide to open ports in a home router can help you.

keep in mind that your public IP couldn't be permanent. it depends on the ISP policies for management of their Public IP pool.

Share:
8,774

Related videos on Youtube

Ali Mosallaei
Author by

Ali Mosallaei

Updated on September 18, 2022

Comments

  • Ali Mosallaei
    Ali Mosallaei over 1 year

    I am using Ubuntu to host Apache2, MySQL and my website, and when I use my private IP address (10.0.2.15), I see my website! I want to know how I can “share” this address with others, so that they can get to my website, either using an IP address or a way to use a link to access it.

    I tried changing my networking settings, but I do not know what to change it to!

    Thanks, Ali

    P.S. This is a virtual machine I am using, running Linux.

  • Ali Mosallaei
    Ali Mosallaei about 6 years
    Ok, so the internet router is my personal router that I use with my other devices? Of course, my VM does not have its own router.
  • LPChip
    LPChip about 6 years
    Your VM may also have a build-in router. Usually its called NAT. But given that you can use the private address to access it, that should rule it out, unless you check it from inside the VM. If so, make sure you can also access it from outside the VM, on your own pc.
  • jcbermu
    jcbermu about 6 years
    @AliMosallaei Yes. the router where you have to open the port is the device that is connecting your whole network to internet.
  • Ali Mosallaei
    Ali Mosallaei about 6 years
    Thank you all! So basically, I just have to find my public IP address, then port forward port 80 to that address.
  • Ali Mosallaei
    Ali Mosallaei about 6 years
    Also, If imdo this, will anybody on any computer be able to access my website hosted on that IP? And is there a way to have a link forward to that IP address?
  • jcbermu
    jcbermu about 6 years
    @Ali. Yes. Anybody could. Use a service as noip.com and you can have a domain name for the IP address.
  • CDove
    CDove about 6 years
    @Ramhound, most decent routers have a NAT, and yes, you really can. All you have to do is have access to the router's admin features. Some ISPs will put in one of those awful gateway-style router-modem combos and try to lock you out of these features, but buying your own modem fixes that.
  • Kinnectus
    Kinnectus about 6 years
    @jcbermu - You could complement your answer by including a short aside as to what one would need to do to then point a "domain name" to their new self-hosted website - i.e. register domain name with a registrar -> amend the DNS to point to their home public IP -> test that they can see their website by going to the name (once successfully forwarding the port to the right server IP.