Jump to content

Buying A Website Name


james24

Recommended Posts

Sorry, it got later than expected... I started writing this morning.... Part one raw text is here... Part two will come later.

Kitchen server Part one - Router settings

Server install will come later...

You need at least one internet connection preferably with a decent router. The bandwidth can be a limiting factor if you have many users. the upload speed is the important thing. I have 12/1Mbps so 1Mbps is what the visitors are limited to.

A server that can be a cheap or old computer as the workload is not heavy.

It helps if you also have some cats, dogs and children messing things up. You will learn how to stay out of trouble...

First you need to set up your router. Usually http://192.168.1.1 or http://192.168.0.1 from a browser will give you the admin page. It will ask for user/passwd.

If your router have any means of saving the router settings to a file as a backup, do it now... just in case you screw up...

First we will have to make sure no other computer can get the same IP address as the server.

DHCP server in the router is usually enabled and should still be. This function will give computers on your LAN IP addresses upon request. This is working well normally and the IP addresses used for this in within a certain range. This means that you don't know what IP address a computer will have. You will have to know the IP address of your server . Therefore you should give the server a known IP address. I will tell later how to do that.

Take a look what IP range the DHCP is using.

Example 192.168.0.1 mask 255.255.255.0 is the router IP.

The total range of IP addresses is from 192.168.0.0 to 192.168.0.255 but we should not use the first one 192.168.0.0 because it is the IP of the network itself, and we should not use the one that is assigned to the router itself.

So we are left with 192.168.0.2 to 192.168.0.255. We will not allow the DHCP server to give all these addresses to any computer that is connected to the network. We limit this to a range say... 192.168.0.2 to 192.168.0.100

Enter this range into the DHCP range settings in your router.

Later we will set up the server to have the IP address outside this range for example 192.168.0.200

It will look like this:

router 192.168.0.1

server 192.168.0.200

other computers 192.168.0.2 to 192.168.0.100

No other computer can get the same IP address as the server.

Next we will make incoming messages reach the server. Web servers are listening to port 80 by default.

This means we have to ask the router to route the messages that comes in to port 80 from the internet side (WAN) to port 80 of our server that in the example has the IP 192.168.0.200.

Look for port forwarding in the router. My Belkin from 2006 for some reason call this function "Firewall -> Virtual servers" and other brands are using other names...

If you need to reach the server via SSH (command line) from the Internet you should also open the SSH port (22) the same way:

WAN port 80 -> 192.168.0.200 port 80

WAN port 22 -> 192.168.0.200 port 22

There is a problem though. Most routers is also listening to port 80. That is why you can administrate is using a web browser. This function need to be there. But we need to find a way to stop the router from listening to port 80 on the WAN side. We should keep it listening to port 80 only on the LAN side. otherwise we cannot reach the admin pages...

To some routers do this automatically when we enable the port forwarding the way we described it above. But some of the routers have some settings called remote admin from WAN or something like that. You need to find that setting on your router and disable the remote admin from the WAN side.

On my old Belkin it is under "system settings" scroll down to "Remote Management".

Uncheck the box "Any IP address can remotely manage the router." and fill in 0.0.0.0 in the field "Only this IP address can remotely manage the router"

Port number should not be 80, I set it to 8080

So now you should save the settings of your router and reboot it.

I will write how to install a web server later tonight... wife wants to go shopping...

Please comment on this... and if you have the procedures for other brands, please post it here. Maybe we can make a full manual out of this...

Martin

Edited by siamect
Link to comment
Share on other sites

would appreciate a step by step instructions including what's required to run a server from the kitchen

Chapter 2 The Dynamic DNS

So now you probably have a router that is opened up for people to get access to your web server. But you still don't have any server.

When you sit on your own LAN, the same LAN that the server is located on, you may refer to the server by the IP address 192.168.0.200. But you don't want to do that. You can fix this by opening up the file /etc/hosts or c:\windowss\system32\drivers\etc\hosts with a text editor on your computer, and add the line.

192.168.0.200 www.soandso.com

If you have permission problems on a windows machine, start notepad as admin and then open the file...

If you are on a linux machine

sudo nano /etc/host

or

sudo vi /etc/host

will do the job.

This will tell your computer and your particular computer only, the local IP of the server. It important to do this on the computers on the LAN, because most routers are not able to handle requests addressing its WAN ip from inside the LAN. Some routers support it...

You have a domain name... soandso.com. For people to reach the server using the domain name you need a DNS server and a DNS record, basically saying: www.soandso.com has IP xx.xx.xx.xx.

So... what IP address does it have? From the Internet your server will be reached throught the router. the router has two IP adresses. As you probably noticed, the router have the address 192.168.0.1 or 192.168.1.1 that you can use from inside your LAN, but from the outside you need to address the router via the WAN IP address. This IP address is given to the router when the router connects to the Internet. We don't know What the WAN IP is. But we will prepare a Dynamic DNS server for it. We will tell the DDNS server what the IP of our router is by sending a message to it.

This example is using a Dynamic DNS server called http://freedns.afraid.org where you can create gratis (Basic) accounts if you have a smaller about of domains. They also provide paid premium services.

Create an account there and enter your domain name to the list:

Go go to the dynamic DNS and add the names you need:

soandso.com 0.0.0.0

www.soandso.com 0.0.0.0

home.soandso.com 0.0.0.0

You fill in only www and home in the empty field and leave the A record and everything else unchanged.

We give the IP 0.0.0.0 for now... it is obviously wrong but... It will change later on when we start the server scripts.

post-98093-036187700 1286105075_thumb.pn

If you now look at the list of the Dynamic DNS it will say direct URL. If you click on this one the browser will send a request to the arfraid.org and because the request has a code it will know what domain it is. It will look at the message and assume that the message comes from the same IP as the server. This information will update the nameservers.

There is also a link to a "wget script". Download the "wget script" and save it. You will need it later when we automate the updates of the DNS records.

post-98093-079992600 1286105086_thumb.pn

Then we have to go to the our Registrar. For ex the whois.com. Log in to your account. What we need to look for is Primary DNS servers or something like that.

Important! We are not going to let whois.com manage the DNS records, but we will just tell whois.com what DNS server that will.

As I don't use Whois.com it is not possible for me to give an exact description but this is from the knowledge base.

Login to your Control Panel. 1

Search for the domain name and proceed to the Order Details view.

Click the Name Servers link. Feed in the Name Servers you want (up to 13 Name Servers) and click Submit.

In this case:

ns1.afraid.org

ns2.afraid.org

ns3.afraid.org

ns4.afraid.org

So now or soon the worlds DNS server will know where you have your IP addresses... The first time it may take hours...

When the IP changes it usually takes 20 minutes...

You can test this:

first line will give you what your closest DNS server have and the second one will show the record from the server the at afraid.org.

nslookup soandso.com

nslookup soandso.com ns1.afraid.org

The last one will have the correct IP just a minute or two after the update...

The first one can take some time... flush you dns cache if you use one...

Next chapter about the server itself... That's the fun part...

Martin

Edited by siamect
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.





×
×
  • Create New...