Jump to content

Recommended Posts

how do i find what my ip address is for people to access my website from outside of my home network. someone told me to do a command prompt with \'netstat -an\' but the ip address that show up there when typed into IE is google.com. should i run apache and then load http://localhost and try to find the IP address? sometimes with \'netstat -an\' i get a *:* for the foreign address, does this mean i cant view it for privacy/security/encryption reasons or something?

Link to comment
https://forums.phpfreaks.com/topic/663-easy-ip-address-question-to-answer/
Share on other sites

Well the problem with doing that... is if you\'re using localhost... I think the remote address will come up and say 127.0.0.1 which isn\'t what you want.

 

On windows:

open a command window and type ipconfig and then depending on how your network is setup you\'ll get something like this:

Windows IP Configuration



Ethernet adapter Local Area Connection:



       Connection-specific DNS Suffix  . :

       IP Address. . . . . . . . . . . . : 192.168.255.4

       Subnet Mask . . . . . . . . . . . : 255.255.255.0

       Default Gateway . . . . . . . . . : 192.168.255.1

In my case since I\'m using a LAN I have a private ip address.

 

On Unix(BSD/Linux):

use the command: ifconfig

you\'ll get something like this:

$ ifconfig

dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

       inet 192.168.255.5 netmask 0xffffff00 broadcast 192.168.255.255

       inet6 fe80::204:5aff:fe5f:e0cc%dc0 prefixlen 64 scopeid 0x1

       ether 00:04:5a:5f:e0:cc

       media: Ethernet autoselect (100baseTX <full-duplex>)

       status: active

you\'re looking for the part that says inet 192.168.255.5

If you need any help, feel free to ask

  • 9 months later...
  • 1 year later...

Go here. This will give you your External IP or WAN IP if you prefer.

 

If you cannot see your webpage make sure that your webserver is not only listening on the localhost (127.0.0.1).

 

Then if you are using a router/firewall you need to set fowarding rules/ firewall rules to let the request reach the computer.

 

If all this fail, you should contact your Internet Service Provider and ask them if they block port 80. If so change the port inside you webserver configuration.

 

To make it easier for everyone to reach your webserver you should create a dynamic dns from one of the several possible solution like dyndns, noip, etc...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.