or Connect
AppleInsider › Forums › General › Genius Bar › Personal Web Sharing doesnt work
New Posts  All Forums:Forum Nav:

Personal Web Sharing doesnt work

post #1 of 21
Thread Starter 
Hello all.

im trying to get "Personal Web Sharing" to work on my mini but it wont. my set up is as follows:

cable modem plugged into a wireless router, mini picks up the web through airport.





I went into system preferences and clicked on the sharing tab. next i selected "Personal Web Sharing" and click "Start". it gave me an http address that others will use to gain access to my site but it wont work outside of the house.

people outside my network cant access the url but inside my house i can access the url with my laptop. it seems that theres an issue with the wireless network and how it handles access. any suggestions?
post #2 of 21
You need to configure your router so that the HTTP port (port 80) is forwarded through the router to the Mac you're running the web server on.

Then you need to find out what your WAN IP address is, the IP the world sees on the service-provider side of your router. That's where you'd tell people to go to see your web site.

That's the short explanation. It could take pages and pages of typing to make this all crystal clear if you're not very familiar with networking concepts.
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
post #3 of 21
Thread Starter 
thank you i think i can figure it out with that info.
post #4 of 21
Keep in mind, however, that a lot of ISP's block incoming requests on port 80, which would mean that people on the "outside" still can't access your self-hosted site.

Cox communications for example, does this, which is why I have to use port 8080.
The secret of life: Proteins fold up and bind things.
Reply
The secret of life: Proteins fold up and bind things.
Reply
post #5 of 21
Which means to avoid having to tell people different and strange IP addresses all the time, go to dynDNS.org and read up on getting a free domain name that you can hand out - and there are several free client daemons that you run on your machine that check the current WAN IP address and keep your dynDNS.org domain name pointing to the correct one.
--Johnny
Reply
--Johnny
Reply
post #6 of 21
Thread Starter 
huh? hehe sorry lundy, im still trying to figure out where to configure the router...i cant find a setting that says HTTP port. still looking. thanks though.
post #7 of 21
Thread Starter 
i found the page where it allows"external (Internet) calls for services such as a web server"

can someone make sense of this?


"Inbound port" looks like the software is asking for a range of numbers

"Type" (choices are TCP or UDP) my guess is TCP

"Private IP address" Would this be the IP address of the computer thats hosting?

"Private port" looks like the software is asking for another range of numbers
post #8 of 21
Thread Starter 
i did it with "a little help from my friends" here at appleinsider especially Shetline.

For anyone with the same problem:

I found settings on my Belkin router setup page called "Virtual Server". Your router might call it something else but basically your looking for a page that will allow you to specify a "port" which will allow access to your computer. My Belkin setup page had the settings under "Firewall">"Virtual Servers".

Here are the settings:


"Inbound port" – 80 (if asked for a range type 80-80

"Type" – TCP

"Private IP address" – IP address of computer hosting the files (look in the network preferences of OSX)

"Private port"
– same as Inbound port
post #9 of 21
Quote:
Originally Posted by the Beatles

...IP address of computer hosting the files (look in the network preferences of OSX)

An important caveat here, just in case you get your set up working now, and then one day it stops working and you're wondering why...

Most people have their home networks set up using DHCP, a protocol which automatically assigns IP addresses to the individual computers on a network. When you check your network preferences, what you most likely will be doing is finding out what IP address your computer has been assigned.

Now, once your computer has been assigned an IP address, it will probably keep that same address for a good long time. However, that address can change! If you lose power to your router, for instance, it's not too terribly unlikely that when the router powers back up, you'll have a new IP address.

If this happens, your port forwarding for port 80 will end up going to the wrong IP address, and you'll have to fix it manually.

The best way around this problem is to assign the computer you're using as a web server a fixed IP address. In my house, we have five computers -- two desktop Macs, one desktop PC, and two Mac laptops. I've given the desktops all fixed IP addresses. I keep the laptops on DHCP because that makes it easier to hook up to wireless networks other than our home network without having to change network settings.
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
post #10 of 21
Thread Starter 
thats funny you mentioned it cause my IP was just reassigned. ok so how do i make it static? can i just make up any address? or in the wireless router settings i can have the router keep my computer IPs static and the only one that will be updated is the router?
post #11 of 21
Quote:
Originally Posted by the Beatles

thats funny you mentioned it cause my IP was just reassigned. ok so how do i make it static? can i just make up any address? or in the wireless router settings i can have the router keep my computer IPs static and the only one that will be updated is the router?

As lundy pointed out, use a service like DynDNS.org. You'll sign up for a URL like mywebsite.dyndns.org, which will redirect to your server.
You'll need to download a program like this that will periodically tell the DynDNS servers what your latest IP address is.

I can personally vouch for DynDNS.org, as they're what I use. Free and no hassle.
The secret of life: Proteins fold up and bind things.
Reply
The secret of life: Proteins fold up and bind things.
Reply
post #12 of 21
Thread Starter 
thanks benzene, i was wondering what "lundy" was talking about. now i know.
post #13 of 21
Quote:
Originally Posted by the Beatles

thats funny you mentioned it cause my IP was just reassigned. ok so how do i make it static? can i just make up any address? or in the wireless router settings i can have the router keep my computer IPs static and the only one that will be updated is the router?

Just to be more clear, there are two relevant IP addresses here. All that stuff about DynDNS.org is about your "WAN" IP address -- the address that the ISP-facing side of your router has that the rest of the world can reach you by.

Some ISPs will give you, or sell you, a fixed WAN IP address, and if they will, you don't need DynDNS.org. All you have to do is, once you've been assigned that IP address, is either give people that raw numerical IP address, or get yourself a domain name which is set up to point to that address.

Since many ISPs won't give you a fixed IP address, or they charge quite a bit for it by classifying you as a business customer rather than a residential customer, DynDNS.org is great for setting up a domain name which automatically tracks to your home WAN address, even when it changes. I use DynDNS.org myself, and they charge $25/year for the service.

My router supports DynDNS directly, so I don't have to install any special software on any of my computers to keep the service up and running. If your router doesn't support DynDNS, you end up having to install special software on one of your computer which "phones home" periodically to keep your WAN IP address and your domain name in sync.

The other IP address, and this is what I was talking about before, is your LAN IP address, the one you'd have for a particular computer on your home network as a member of that network. First thing you have to do is look at how your router is set up, and use this as the basis for setting up manual IP settings for your computer. Typical settings often look something like this:

Your router's own IP address: 192.168.0.1 (192.168.1.1 is also common).

The net mask that goes with this address: 255.255.255.0.

Then if you have DHCP turned on, there's a number you set for the lowest address which DHCP will assign. I'm not sure what's typical, but I have mine set at 20. This means that addresses from 192.168.0.2 through 192.168.0.19 are available to use as fixed IP addresses. You can pretty much pick them arbitrarily, so long as you don't assign two computers on the same network the same address.

Here's what Mac OS network settings look like for one of my computers:

We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
post #14 of 21
Actually, Benzene & Lundy are talking about a different, but very similar problem.

There are two IP addresses involved here: one "WAN" IP address; this is the address that your ISP assigns to your modem, and one "LAN" IP address; this is the IP address that your router assigns to your Mac. The "WAN" address is the one that other people on the internet can "see", all computers connected to your home network will appear to have the same IP address from the outside world, due to the magic of NAT.

To aid in explanation, let's say that your WAN IP address (given to your modem by your ISP) is 64.324.67.89 and your LAN IP address (given to your Mac by your router) is 192.168.0.2.

When you set up port forwarding on your belkin (in the firewall -> virtual server area), you instructed any requests on port 80 of the 64.324.67.89 IP address to be forwarded to the 192.168.0.2 IP address of your Mac. However, under default settings, routers use DHCP to assign LAN IP addresses).

This means that if your Mac loses its network connection to the router, when it regains a connection, it may well be given an address other than 192.168.0.2. e.g. 192.168.0.5. However, the port forwarding is setup to forward port 80 requests to 192.168.0.2, so the forwarding will cease to work. DynDNS.org cannot solve this problem for you.

To solve this problem, you have to consult your router intructions and find out how to assign static LAN IP addresses. This may involve turning off the DHCP server altogether (which would then require you to set the IP address of any machines connecting to your network manually), or setting the DHCP server a restricted range of IP address (e.g. set the DHCP server to assign addresses in the range 192.168.0.10 to 192.168.0.255, reserving 192.168.0.2 to 192.168.0.9 for manually assigned IP address.

Once the router is configured, you then need to go to system preferences on your Mac and change the "configure IPv4" option under TCP/IP tab of the "network settings" pane to "manually", then enter the desired fixed IP address. You then use this IP address to forward port 80 requests to.

On to the second problem:

The second problem is that your WAN IP (e.g. 64.324.67.89) will almost certainly not always be the same. If your modem drops its connection, your modem will probably get a new IP address from the ISP. So if you told your friends they can get you on http://64.324.67.89, now they would not be able to do so. Even worse, someone else may have been assigned the address you used to have, and if they're running a web server too, people will see entirely the wrong site, rather than just nothing.

This is where dynDNS.org can help. You register something like www.mylovelywebsite.com, and when someone enters that into a webbrowser, a DNS server translates the words into an IP address. Using the dynDNS.org service, you can ensure that this IP address is always the one that has been assigned to you by your ISP.

Good luck!
it's = it is / it has, its = belonging to it.
Reply
it's = it is / it has, its = belonging to it.
Reply
post #15 of 21
Shetline beat me to it! With pictures and everything.
it's = it is / it has, its = belonging to it.
Reply
it's = it is / it has, its = belonging to it.
Reply
post #16 of 21
Thread Starter 
OH i got it, not only will my WAN IP change but my LAN IP can change too. So if i set my TCP settings manually i can control my LAN IP from changing. However i have no control over the WAN IP from changing since the ISP changes that without my control. I could purchase a static WAN IP but they cost much.

i think i got it. however, if the WAN IP address can change without my control then why would i worry about the LAN IP and configure it manually? what is the benefit of configuring the LAN IP so that it doesnt change if the WAN IP is still going to change?


Thanks Shetline and thanks Mr. H.
post #17 of 21
Quote:
Originally Posted by the Beatles

what is the benefit of configuring the LAN IP so that it doesnt change if the WAN IP is still going to change?

I suppose it all depends what you're running the web server for. Although your WAN IP probably can and will change, with many ISPs your WAN IP can be stable for weeks or months at a time. Perhaps that's "good enough" for what you have in mind, if you and the people who would access your site can cope with the occasional loss of connectivity until you look up what your new IP address has become.

If you're willing to spend a little money on DynDNS service, it won't matter that your WAN IP changes. Just have your users go to www.yourhomedomain.com, and DynDNS will take care of the rest -- so long as you've got the LAN part of the equation nailed down, of course.

Before I had DynDNS, I set up a cron job on my Mac to access a web site of mine (one hosted outside of my home) every two hours, where I had a little script set up to record the incoming IP address. I was then able to check a special page on my web site and find out (with perhaps a lag of up to two hours) what my latest home IP address had been.
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
post #18 of 21
dynDNS charges money now? Bummer.

As far as getting your WAN (public) IP, just do a curl command on ippages.com and parse out the result:
Code:


publicIP=`curl -s -r 0-15 -m 10 www.ippages.com/simple/ | tr -C -d "0-9."`



Anyone can also go to whatismyip.com.
--Johnny
Reply
--Johnny
Reply
post #19 of 21
Quote:
Originally Posted by lundy

Anyone can also go to whatismyip.com.

Just to make it clear, the point of that cron job I talked about wasn't to check my home computer's WAN IP when I was at home (many easy ways to do that), but to have an easy way to find out my home WAP IP when I was away from home.
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
We were once so close to heaven
Peter came out and gave us medals
Declaring us the nicest of the damned -- They Might Be Giants          See the stars at skyviewcafe.com
Reply
post #20 of 21
My WAN IP address is handed out via DHCP from my cable provider and it has been the same for over six months now. I am sure that it will randomly change one day when I really need to get in, but it is almost like getting a legal static address!
post #21 of 21
It will change if the cable modem sees a new MAC address.
--Johnny
Reply
--Johnny
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Genius Bar
AppleInsider › Forums › General › Genius Bar › Personal Web Sharing doesnt work