Shadow ([info]mojojojoojo) wrote in [info]macosx,
@ 2003-01-13 18:25:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current mood: tired

Setting Up Web Sharing With A Router
I'm having some trouble setting up web sharing on my Mac.

I've got two computers on my network here. An iMac (running Mac OS X 10.2.3) and a PC (running Windows XP). Both are hooked up by Ethernet cables to a Linksys Router/Switch which is then connected to my DSL modem, which goes out to the 'net.

The router assigned the IP 192.168.1.100 to my Mac and 192.168.1.101 to my PC. And to configure the router, I go to 192.168.1.1

So when I turn on the web sharing from the System Prefs, it tells me that my server can be accessed at http://192.168.1.100/~sergio

This seems to work fine on my Mac and my PC, but, evidently, not for people outside the network.

What I want to know is: How do I fix it?

Thanks in advance, :3




(Post a new comment)


[info]tk7602
2003-01-13 06:34 pm UTC (link)
that makes sense... your router has an internal address and an external address. 192.168.1.x is the internal range.

in order for people outside of your network to get to your web server, you need to tell the router to forward the traffic in. how to do this will vary from router to router, but ultimately you want to make the router forward it's external ip to 192.168.1.100. the port you want to forward is 80. the router will likely call it virtual server, or port forwarding, or something...

(Reply to this)

don't work
[info]condesan
2003-01-13 06:43 pm UTC (link)
Maybe you are in a network and you need a know your ip use your browser

http://www.whatismyip.com/

and found your internet real ip

(Reply to this)

...to recap, in a sense....
[info]mc17
2003-01-13 08:03 pm UTC (link)
[info]tk7602 is right. go to 192.168.1.1, (and from this point on, i'm assuming you're using a linksys, bcause that's what it sounds like:) click on advance (over on the right) then click on forwarding. forward port 80 to .100 (your mac) and then accept. it should work.

...and like [info]condesan says, 192.168.1.100 is the IP WITHIN your network. to the outside world, you (and all computers within your network) are the IP of your router, which you can find at www.whatismyip.com. if you go to www.dyndns.org, you can assign a domain name to that IP, like mc17.dyndns.org points to 68.64.38.113 (or something) so people dont have to type in an IP to see your site. (or you can pay for a real domain)

surfers will still have to add ~/sergio to see your stuff... unless you put your .htm (or .php, or whatever) files in the "apache documents" folder.

hope this makes sense... reply if you still cant get it to work.

(Reply to this) (Thread)

Re: ...to recap, in a sense....
[info]daggerquill
2003-01-13 09:59 pm UTC (link)
One thing to add:

You siad that the router assigned the ips to your computers. I take it this means that you are using DHCP on the router. Using port forwarding or DMZ on linksys harware--and proabably everybody else--requires that you turn DHCP off and configure your network manually. There won't be a warning about this when you log into the router, but it's in the manual.

Also, what ISP do you use? many DSL providers block incoming http traffic on port 80 unless you pay extra for a static IP account. you might want to check with your ISP before you go through the trouble of reconfiguring your network, and possibly setting up dydndns, only to find out that none of it works and never will.

(Reply to this) (Parent)(Thread)

Re: ...to recap, in a sense....
[info]mc17
2003-01-14 01:57 am UTC (link)
you're right, sorta. the only reason to have to set it up manually, is so that you know that your mac always gets .100, and when the DHCP lease is up the new allocated IPs aren't mixed up.

...but you dont have to go through the trouble. if you tell your mac, or the server, to always be .105, for example, then it'll never get confused. (if you only have 5 computers on the network)

i have 9 computers on my network, and my mac always gets .110, so it's never a problem.

the router doesn't actually REQUIRE manual setup for it to work, but it's not a terrible suggestion. it's worth keeping it auto if you have other people comming over and using the connection, so that they dont have to configure their systems. (they can simply turn it to DHCP)

(Reply to this) (Parent)


[info]james968
2003-01-14 07:14 pm UTC (link)
Actually since the router starts giving out DHCP addresses begining at .192.168.1.100+, you could manually set your Mac and Linux box to 192.168.1.2-99. (1 is used by the router and 100 is your first DHCP). This is allows you to keep DHCP and still have fixed IP's.

This is what I do with my Linux box and Mac. I my laptop comes and goes and uses DHCP. Also you could add machine names to /etc/hosts on your linux box or Netinfo on your mac, that would allow you to simply type ssh mac and your there.

Other parts of my setup:
Port forwarding #80 goes to 192.168.1.20 #Mac (If I wanted to, a few clicks and I'd go to a completely different web server (linux box)
#22 goes to 192.168.1.20 #Mac
I also use dyndns.org and a MacOSX client to automatically get its address from the linksys and register it with dyndns. I can then type my dyndns name and ssh into my mac at home. (If my dsl address changes, the client updates it with dyndns)

later,

(Reply to this) (Thread)

how?
(Anonymous)
2003-07-14 06:14 pm UTC (link)
explain more how you do that please

(Reply to this) (Parent)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…