Skip navigation.

Posts tagged with "remote"

SERVER : Dynamic DNS

, , , ...

If you're using a connection that gives dynamic IPs (like for example if you connect to the net over PPPoe) you'll need a way to have a static name for your server even if it has to reconnect to the net and change its IP.

There are a lot of free DNS services, I've chosen No-IP but you can use any other service (like : DynDNS, ZoneEdit).
I've chosen No-IP because a friend showed me how to use it.

For a greater list of Free Dynamic DNS providers look at :
http://www.thefreecountry.com/webmaster/freedns.shtml
or Goole Director -> Dynamic DNS Services

Anyways, back to No-IP.

First thing is you'll have to create a new account with them (it's free so don't worry about it).
Go to their site and press Sign-Up Now and enter in all the information.

Make shore you use a correct email address as that's going to be your username used to modify your settings.
After you've registered and confirmed your registration, you'll have to log into your account and add a new Host/Redirect, for that, go to Hosts/Redirects and Add, and fill in your information
In Hostname enter the name you want to use for your computer, and from the combobox choose the domain you want to use, for example if you enter myhost and select no-ip.biz your address will be http://myhost.no-ip.biz.
In the Host Type you have to select the option you want to use, generally you should use DNS Host(A), for more information about what each type is, click on the question mark, it will open a popup with the information.
You shouldn't worry too much about the IP as we're going to install the program that will auto update that IP for us.
Now press Create Host

Now we have to download the client and install it on our server. For that, go to Downloads and click on the nice penguin (for Linux) and download the file to your server (or download it somewhere else and then transfer it to the server).

Now go to the folder where you've copied or downloaded the file, and execute this :
tar -xzvf noip-duc-linux.tar.gz
you should get a nice output similar to this :
noip-2.1.3/
noip-2.1.3/binaries/
noip-2.1.3/binaries/noip2-Linux
noip-2.1.3/COPYING
noip-2.1.3/debian.noip2.sh
noip-2.1.3/gentoo.noip2.sh
noip-2.1.3/LEEME.PRIMERO
noip-2.1.3/LISEZMOI.ENPREMIER
noip-2.1.3/mac.osx.startup
noip-2.1.3/Makefile
noip-2.1.3/noip2.c
noip-2.1.3/README.FIRST
noip-2.1.3/README.FIRST-SWE
noip-2.1.3/README.FIRST.FRANCAIS
noip-2.1.3/README.FIRST.ITALIANO
noip-2.1.3/README.FIRST.JAPANESE
noip-2.1.3/README.FIRST.pt_BR
noip-2.1.3/redhat.noip.sh
noip-2.1.3/suse.noip2.sh

To copy the no-ip program, execute this :
sudo cp noip-2.1.3/binaries/noip2-Linux /usr/local/bin/noip2
, of course the folder name might be different if you're using a different version of the client. The command will copy the noip executable and name it noip2. Now we need to create the config for NoIp2. It uses a nonstandard folder for the config file (at least the folder doesn't exist by default on Ubuntu), so first we need to create that folder, so execute this :
sudo mkdir /usr/local/etc
.
Now execute
noip2 -C
and follow the onscreen instructions, for me it was like this:
Auto configuration for Linux client of no-ip.com.

Multiple network devices have been detected.

Please select the Internet interface from this list.

By typing the number associated with it.
0       eth0
1       eth1
2       ppp0
press 2 (I use PPPoe for Internet connection), then
Please enter the login/email string for no-ip.com
here you have to enter the email address you've used to register at noip, and enter the password
Please enter the password for user '**********@*******'

If you registered multiple hosts, it will ask you
2 hosts are registered to this account.
Do you wish to have them all updated?[N] (y/N)
of course you should press y to update all of them. If you registered just 1 host, it will skip this question.
Now it will ask
Do you wish to run something at successful update?[N] (y/N)
you should press n unless you really want to execute something after update.
If everything went well, you'll get this answer :
New configuration file '/usr/local/etc/no-ip2.conf' created.


Now we only need to execute
noip2
and in a few seconds our selected domains will be forwarded to our own server.

Now there's just one little catch, if you restart the server, the noip2 program won't run automatically, so we need to ad it to /etc/rc.local which is executed each time the computer boots. Just run this command :
sudo editor /etc/rc.local
and modify the file to look like this :
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# start No-Ip si that our server is accessible with myname.no_ip_domain
noip2

# don't remove the next line, or the server fill give some errors
exit 0

SERVER : Install Webmin

, , , ...

After a while it's not that much fun to modify files and settings on the server using and SSH console. After all, you've seen all those "fancy" routers that have a web page administration didn't you ? Well, you can get something similar on your server, here's how I did it.

You need to download the latest version of WebMin, you can get it from Here. You need to choose the "Debian package suitable for Debian, Ubuntu or other derived Linux". Download it and copy it to your server (generally i use the home directory of my user, so that i don't fill the HDD with garbage).

The latest version as of when I'm writing this post is 1.310.
The only little problem is that the package is about 10Mb in size, so it might take a while to download it (took about 4 minutes on my machine).

So, after you've copied it to the server, go to that folder and execute this command :
sudo dpkg -i webmin_1.310_all.deb

Here's my output :
Selecting previously deselected package webmin.
(Reading database ... 16998 files and directories currently installed.)
Unpacking webmin (from webmin_1.310_all.deb) ...
Setting up webmin (1.310) ...
Webmin install complete. You can now login to https://merlin:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

This means that now we can configure our system by going to the above mentioned address (well it's better if we go to https://ip_to_server:10000).

The first time you access the site, you'll get a similar error (I'm using Opera so it might look a little bit different in other browsers):

Just press Accept, after all, you know the site, it's yours p:

After that, you'll get to the login screen, it should look like this :


If you created the root user use that to log in, otherwise you'll need to use the user you've created when you installed the server.
First thing we want to change is the default port, so that not everybody can access our webmin interface.
If everything is ok, you should see something like this :


Now select Webmin->Webmin Configuration and from there Ports and Addresses you should see this :
After that you'll end up here :
Now change the 2 values and put a number you want, just make shore you remember it Homer: Doh!
Best is if you put a number from this range 10000-30000 for example 12345(you must make shore this port is not used by anything else).
After that press SAVE and then press Logout and reload the webpage, but remember now you have to load https://ip_to_server:12345.
November 2009
S M T W T F S
October 2009December 2009
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30