Localhost/IP Issue (in Off-topic)
February 16 2009 8:35 PM EST
I'm trying to host a site on my computer. Now both http://127.0.0.1/
work. Now my public (dynamic) modem IP doesn't go to localhost. Neither does my router IP.
If anyone could help me, just reply. Thanks.
February 16 2009 9:26 PM EST
I believe you need to first enable port forwarding on your router.
If your site is currently running, obtain what your IP address is to the outside world. You could visit a site such as: www.whatismyip.com
That's all I did for Apache and Apache Tomcat. Works for me. I just don't have a domain name assigned to the IP.
February 16 2009 9:36 PM EST
I use Xampp, which I use for MySQL/Apache both of which use 3306 and 80 as ports. What port do I portforward one, both, or another?
just port 80... the SQL port will only be accessed by your machine
February 16 2009 10:05 PM EST
Okay I tried this, but it still won't connect. It may be because my Public IP is my modem IP, my router (D-Link) are different IP(s).
You'd need to configure the modem to point to the router and the router to point to your computer. Seems like a pain.
February 16 2009 10:38 PM EST
If your modem has an IP address, then why is it called a modem?
Could you perhaps explain in a little more detail your network setup?
February 16 2009 11:30 PM EST
Modem is for our ISP. Router was just for wireless, since we got 3 computers.
February 16 2009 11:57 PM EST
Well, please call your modem a router, because that's what it most likely is.
On any router between you and the public Internet, you'll need to enable port forwarding for port 80/TCP if that router does NAT (I bet they both do). For your router (the thing you call modem) you need to set up port forwarding towards your wireless router (the thing you call router). On your wireless router, you need to setup port forwarding towards your PC.
Your setup is more complex than it would have needed to be. Instead of a wireless router, a wireless access point could be used. Then you only have to deal with 1 router.
February 18 2009 10:00 PM EST
Anyone know if I can add an IP, that's not actually mine? Maybe add it to mySQL. IDK.
February 18 2009 11:59 PM EST
What do you mean?
February 19 2009 8:00 AM EST
Maybe a program or something to give me an IP that'll allow everyone to access my localhost as a site.
February 19 2009 8:05 AM EST
See the thing is I've been using Hamachi, for my game server.
The program gives me an IP and yes that IP directs to my localhost. So anyone can see my site. Problem is they NEED that program and join my network to see the site. Which won't help at all.
February 19 2009 8:21 AM EST
In order for any outside machine to access your machine, all the other equipment between your machine and the ISP need to know to route all requests to your machine.
IT DOES NOT WORK ANY OTHER WAY.
In other words, you need to get the configuration book, leaflet or help files for your modem/router, and dig through those to see how you need to configure it to route all INBOUND traffic to port 80 (and maybe some other ports too, if you need them) to your machine directly.
Then, everybody from outside will see your "modem's" IP, but actually talk to your machine instead transparently, as if the modem/router didn't exist.
February 19 2009 8:27 AM EST
In case you were wondering, Hamachi works slightly differently, it simply creates a Virtual Private Network between all people that are in the "network".
To do that, it needs a centralised database (the servers you connect to), then it handles all "handshakes" between both sides as if each machine was only "calling outwards" (most routers are configured to allow all outbound connections to be as they are), and allows you to use a virtual IP from the virtual Hamachi adapter.
All of the complex channel opening mechanisms are masked for you, the end user, and it LOOKS AS IF you simply have just some local network (even if the underlying communication mechanism is much more complicated).
February 19 2009 8:24 PM EST
Modem is plug n' play. So we got no manual for it. The router we got a manual, but it's the modem IP I'm working with.
Btw I enabled IP routing for localhost, but still nothing.
February 19 2009 8:50 PM EST
Alright just found out my router has a Dynamic DNS page, it has me signup for a site and got everything going. Only problem is the site gave me a subdomain, but I need to pay to use my own domain.
This thread is closed to new posts.
However, you are welcome to reference it
from a new thread; link this with the html
<a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=002fSM">Localhost/IP Issue</a>