# RE: Re: Re: How to build a server

**URL:** <https://www.ruby-forum.com/t/re-re-re-how-to-build-a-server/61005>\
**Category:** Rails\
**Created:** [May 19, 2006, 6:45am UTC](https://www.ruby-forum.com/t/re-re-re-how-to-build-a-server/61005 "2006-05-19T06:45:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ross\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b19c9b/32.png) [@Ross\_D](https://www.ruby-forum.com/u/Ross_D)\
**Post date:** [May 19, 2006, 6:45am UTC](https://www.ruby-forum.com/t/re-re-re-how-to-build-a-server/61005/1 "2006-05-19T06:45:08Z")

</div>

> So I need to have a static IP. I will talk to my ISP about this. I am  
> almost certain my cable connection is using a dynamic IP. Then I  
> suppose I register this IP with a name server so that my domains point  
> to this IP.
> 
> So I will have my cable modem connected to my router. My router  
> connected to my server and my other desktop computers. When a request  
> comes in from the outside world, how does it know to go to the server  
> to find what it is looking for? Is this something I also have to  
> register with the name server?

Peter,  
You don’t really need a static IP. You can use a dynamic IP with a  
dynamic DN service such as [http://www.dyndns.com/](http://www.dyndns.com/) (google for others).  
This setup works well for demos but you probably want to be hosted with  
a static IP for production.

DNS provides a name lookup mapping to a IP address. The next part of  
the puzzle is to port forward connections from you external IP address  
to server(s) inside your local network.

lets say you have a network like so

aaa.bbb.ccc.ddd – cable modem – router – server (192.168.xxx.yyy)

Your cable modem has an external IP of aaa.bbb.ccc.ddd, you cable modem  
and/or router maps this to you private network (which may have an IP  
address range of 192.168.xxx.yyy or other private networks such as 172.  
or 10.). Connections to various services are run via ports (think lanes  
of traffic). You want to map incomming connections (say port 80 for  
HTTP) to your web server (think connecting a lane of traffic from your  
cable modem to your web server). This action is called port forwarding  
(again google is your friend). So you setup a rule on your router that  
says any connection to aaa.bbb.ccc.ddd port 80 will connection to my  
internal web server 192.168.xxx.yyy port 80.

These kind of setups are exposing your machines on your internal network  
to all and sundry on the net so there are lots of security  
considerations. IT’s best to be well informed (read up lots).

Id’ start by googling the following terms (a read at HowStuffWorks is  
good too)  
DNS  
Network Address Translation  
Port Forwarding

I found the Linux HOWTOs useful for learning the nuts and bolts too.

HTH

Ross

---

<div class="post-metadata">

**Author:** ![Ross\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b19c9b/32.png) [@Ross\_D](https://www.ruby-forum.com/u/Ross_D)\
**Post date:** [May 19, 2006, 6:54am UTC](https://www.ruby-forum.com/t/re-re-re-how-to-build-a-server/61005/2 "2006-05-19T06:54:22Z")

</div>

Ross,

Thanks for the info. The fog is clearing. I will read more on the  
topics you mentioned.

Security is the reason I would probably just do this stuff for  
experiments. I think I’ll leave production up to my web hosting  
company.

Peter
