ComTech: IT Support Stirling | Page 2
TwitterFacebookGoogle

How to set up a basic Web Server on Ubuntu 12.04


This tutorial will show you how to set up a basic web server. For this tutorial I have used Ubuntu 12.04 LTS but the steps work the same on any Linux distribution.

Ok first thing to do is give your server a static ip address.  This tutorial will show you how.  Once done it is time to download the software you will need so open up a terminal and install the following packages:

apache2 php5-mysql libapache2-mod-php5 mysql-server

During the install process MySQL will ask you for a root password.  Make this something complex but do not forget it!!!

Once installed open up a web browser and type http://your-server-address (e.g http://192.168.1.3) and you will see the message IT WORKS! This means that you have a working web server.

Now it is time to add some content to your server.  All apache servers store their web data at /var/www but as default you can not write to this folder.  Open up a terminal and type:

sudo nautilus

Enter your password when prompted.  Navigate to /var and right click on www.  Then go to properties.  Add yourself as either the owner or group and give yourself “create and delete files folder access“.

Next thing to do is to download some ftp software.  Personally I recommend Filezilla. Open up a terminal and type:

sudo apt-get install filezilla

Once installed connect to your existing web server and transfer your files into /var/www.

Congratulations!! Your website is now hosted on your new server but it will not yet be visible from the internet.  Most networks sit behind a router which acts as a firewall, so to make your website visible you will need to forward http packets from your router to your server by opening up port 80 and redirecting it to your servers new ip address. Portforward.com is a good starting point to understand port forwarding.

You will also need to speak to your ISP about getting a static ip address for your router. Without this you will not be able to access your site everytime your ip address changes.

And that is it!! You now have a basic web server from which to host your own website.

About the Author

Hi I am Chris Wakefield the owner of ComTech IT Support. I provide Windows and Linux based IT Support, laptop repairs and computer repairs to both business and personal clients in and around Stirling.

For a list of what I can offer you why not visit my website www.comtech247.net where you will find a list of my services, testimonials, blog and much more.

Tutorial – How to Subnet


Today I will show you a technique I learnt for my Cisco exams on how to subnet and choosing subnet masks.

The best way to explain subnetting is by showing some examples.

Question 1:

If a subnet mask of 255.255.0.0 were used with a Class A network how many subnets and hosts per subnet could exist?

Answer:

The best way to answer this question is to break it down into individual sections.  The sections are:

1. No of Network bits

2. No of Host bits,

3. No of Subnet bits,

4. No of Subnets

5. Hosts per Subnet.

Lets take them one at a time.

No of Network bits = 8 (This is defined by Class A = 8, Class B = 16 and Class C = 24)

No of Host bits = 16 (This is defined by the number of zeros in the subnet mask)

No of Subnet bits = 8 (This is defined by 32 – No of network bits – No of Host bits)

No of Subnets =  256 (This is defined by  2ˆ No of subnet bits)

Hosts per Subnet = 65534 (This is defined by 2ˆNo of Host bits – 2)

So to answer the question  No of subnets = 256 with 65534 hosts per subnet.

Question 2:

Which of the following are valid subnet numbers in network 180.1.0.0 when using mask 255.255.248.0?

a) 180.1.8.0

b) 180.1.4.0

c) 180.1.40.0

Again the best approach is to break the question down into sections.  This time the sections are:

1. Find the Subnet Number

2. Calculate the First address in the range

3. Calculate the Broadcast address

4. Calculate the last address in the range

Lets take them one at a time.

Subnet Number = 180.1.0.0 (This is defined by 256 – 248 = 8 (Subnet Magic Number). 8 *0 = 0 (Interesting Octet) which is the closest multiple <=0 which is the 3rd octet in 180.1.0.0)

First number in the address range = 180.1.0.1 (This is defined by adding 1 to the subnet’s last octet)

Broadcast Address = 180.1.7.255 (This is defined by the Subnet Magic Number (8) + Interesting Octet (0) minus 1

Last address in the range = 180.1.7.254 (This is defined by the broadcast address -1)

So to answer the question the subnet numbers begin with 180.1.0.0 (zero subnet) and then 180.1.8.0, 180.1.16.0 and so on therefore a and c are the correct answers.

I hope that the steps outlined above help when it comes to subnetting your own networks.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

How to set up Skype


Today we are going to have a look at Skype.  Skype is a fantastic piece of software that allows you to make video calls with someone anywhere in the world for free. To use Skype you will need a webcam (most laptops have these built in), speakers and a microphone.  So lets take a look at how you set this up.  This tutorial uses Windows XP but the steps work on all Windows based operating systems.

First thing to do is to download Skype.  If this is your first time using Skype you will be asked to create an account.  Make your username unique and your password memorable. Once your account is set up double click your download to start the installation.

On the first page pick your language and then click next.  On the following page you are asked about Skype Click to call.  Unless you have signed up for this uncheck the box and click continue.  Your installation will now start.

Once installed you will be taken to the sign in screen.  Enter your details that you created earlier and make sure you tick the “Sign me in when Skype starts box”.

Next Skype will get you to test your speakers and microphone.  Click “Test sound” under your speakers  and you should hear a test sound.  If not check your speakers are turned on and plugged in.  Next click ‘Video’.  You should see yourself on the screen.  If not again check the connection and power.  Adjust the microphone setting to the the sound level you require.

On the next page you will be asked if you want to add a profile picture.  Your choice if you want to or not.  And that is it.  Skype has been successfully installed.

Now we have to find people to talk to!! The best way to do this is to use the search function on the top left of the screen.  Type in a name and Skype will display the people with that name.  You just pick your friends and add them as a contact.  To call a friend right click them in your contact list and then choose call.

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

File sharing on Linux


The following tutorial will show you how to set up samba on a Linux system allowing you to share files and folders with a either a Linux or a Windows client.  All the following steps work on Linux Mint 11 but should also work on any other distribution using gnome.  For kde the only thing which differs is defining shares (usually through the kde control center).

On the Samba Server

First thing is to check samba is installed.  Open up a terminal and type:

sudo apt-get install samba

Type your root password when prompted.  Then install smbfs by typing:

sudo apt-get install smbfs

and then type your root password again.

Now open up your smb.conf file by typing:

gksu gedit /etc/samba/smb.conf

Locate the line WORKROUP = WORKGROUP and change it to the name of your network.  So for instance mine would be changed to WORKGROUP = MINT_HOME.  Save the file and exit.

Now we have to add users to the smbpasswd file which is located at /etc/samba/smbpasswd.  Only users specified in the smbpasswd file will be able to access your samba shares.  Open a terminal as root and type:

smbpasswd -a user (where user is the name of the person allowed to access the shares).  When prompted enter their new password twice.

Next we have to define the samba shares.  Type:

sudo shares-admin

With the GUI open add your samba shares, save and exit.

Note, everytime you update the smb.conf file you must restart the samba service so type:

sudo service smbd restart

Now we have to check the configuration so far.  Type:

testparm

If there are errors in the xorg.conf file testparm will tell you.  If everything is Ok then type:

smbclient -L 192.168.1.10 (where 192.168.1.10 is the ip address of your samba server).  This will show you the list of all your available samba shares.  At this point if you have no errors your server is configured correctly.

Linux Clients

Install smbclient and smbfs either using the package manager or apt-get install.  Now we have to mount the available shares.  First decide where you are going to mount them.  I will mount them in /media/dev/share but first I will have to make the directory dev so:

cd /media

sudo mkdir dev

and then ls which should show us the new dev directory in media.  Now time to mount the shares.

sudo mount -t smbfs //192.168.1.10/(share name) /media/dev/share where 192.168.1.10 is the ip address of your samba server.  This will mount the share but only as long as you are logged in.  To make the link persistent you need to enter the following line into /etc/fstab.

//192.168.1.10/(share)   /media/dev/share      cifs       username=user,password=pass,user,rw,noatime     0              0

Windows Clients

We have to change the workgroup to MINT_HOME and then add the ip address of the samba server to the hosts file (must open as administrator).

Once this is complete map the shares to your computer.

Word of warning here about firewalls.  Either turn them off or add exception rules for traffic on ports 137-139 and 445.

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

Setting up a windows 7 vpn server

Today we are going to set up a Windows 7 vpn server which will allow you to securely access your PC from anywhere using the internet.

Click on Start – Control Panel – Network and Sharing Centre – Change adapter settings.

Once you see the connections press the ALT key which will bring up a line of menus at the top of the screen.  Go to File – New Incoming Connection.

The first thing we need to do is chose who can access your computer.  Chose the required user (or users) and tick the box next to them.  Then click next.


Next we need to chose how users will connect to your computer.  Tick the box next to Through the Internet and then click next.

On the next page leave the defaults and click Allow Access.

On the final screen you will see the name of your computer.  Write this down as you will need this later.

Now we need to allow vpn traffic through your router and any firewalls.  On your router you will need to port forward vpn traffic to your computers ip address on port 1723.  On any firewalls check that port 1723 is open.

Now we just need to check if the connection is active.  Go to Control Panel -Network Connections – Change Adapter Settings.  You should see an icon stating Incoming Connections with no clients connected.  This means that your vpn server is now active and waiting for connections.

Next time I will show you how to connect to your vpn server.

About the Author

Hi I am Chris Wakefield the owner of ComTech IT Support. I provide Windows and Linux based IT Support, laptop repairs and computer repairs to both business and personal clients in and around Stirling.

For a list of what I can offer you why not visit my website www.comtech247.net where you will find a list of my services, testimonials, blog and much more.

SSH on Windows


We have looked in the past at using SSH on Linux but today we shall use SSH on Windows, primarily Windows 7.  For this tutorial I will be using a Linux Server (ip address 192.168.1.2) and a windows client.

First thing we need is an SSH client for the windows machine.  The best one I have come across is PuTTY.  PuTTY is an open source telnet /ssh client and and can be downloadedhere.

Once downloaded and installed you should get the following PuTTY configuration screen;

Internal Network

Make sure that the SSH box is ticked and insert the ip address or hostname of the server you wish to connect to and then click on open.  You will be asked for the username and password of an account on the server.

Over the Internet

You will need to open port 22 on your router and forward any ssh traffic to the server you want to access (in this case 192.168.1.2).  So this time the ip address will be the router’s ip address and not the servers ip address.

In both cases, internal or over the internet, you will need to open port 22 on any firewalls that are active.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

 

 

How to set a static ip address in Windows


Today I will show you how to add a static ip address to a Windows installation.  For this tutorial I am using Windows 7 but the steps are the same for either Vista, 8 or any server variant.

First thing we need to do is find out what the subnet mask, dns servers and default gateway are for your network.  Open up a command prompt and type:

ipconfig /all

This will bring up a lot of information about your network.  Locate the lines for DNS servers, subnet mask and default gateway and write down the information.  We will need this later.

Next open up Control Panel and go to Network and Sharing Sharing Centre.  Click on Change Adapter Settings and then right click on the connection you want to configure and go to properties.  The Local Area Connection Properties box should appear.  Locate and click on Internet Protocol Version 4 (TCP/IPv4) and then click on properties.

On the following page click Use the following IP address and enter the details you jotted down earlier.  Remember to set the ip address to the static one you require.  Do the same for the DNS server addresses.  Close down the pages and reboot.  Your computer should now have the static ip address you configured but remember to check by using ipconfig in the command prompt.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

 

 

 

 

 

 

How to set up a Linux Web Server


This tutorial will show you how to set up a basic web server. For this tutorial I have used Linux Mint 9 but the steps work the same on any Linux distribution

Ok first thing to do is give your server a static ip address (refer to earlier blog here for details).  Once done it is time to download the software you will need.  Open up a terminal and install the following packages:

apache2 php5-mysql libapache2-mod-php5 mysql-server

During the install process MySQL will ask you for a root password.  Make this something complex but do not forget it!!!

Once installed open up a web browser and type http://your-server-address (e.g http://192.168.1.3) and you will see the message IT WORKS! This means that you have a working web server.

Now it is time to add some content to your server.  All apache servers store their web data at /var/www but as default you can not write to this folder.  Open up a terminal and type:

sudo nautilus

Enter your password when prompted.  Navigate to /var and right click on www.  Then go to properties.  Add yourself as either the owner or group and give yourself “create and delete files folder access”.

Next thing to do is to download some ftp software.  Personally I recommend Filezilla. Open up a terminal and type:

sudo apt-get install filezilla

Once installed connect to your existing web server and transfer your files into /var/www.

Congratulations!! Your website is now hosted on your new server but it will not yet be visible from the internet.  Most networks sit behind a router which acts as a firewall, so to make your website visible you will need to forward http packets from your router to your server by opening up port 80 and redirecting it to your servers new ip address.Portforward.com is a good starting point to understand port forwarding.

You will also need to speak to your ISP about getting a static ip address for your router. Without this you will not be able to access your site everytime your ip address changes.

And that is it!! You now have a basic web server from which to host your own website.

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

 

 

 

How to set up a Linux DNS server


Today we will have a look at setting up a DNS server on Linux.  This tutorial was configured using Linux Mint 9 but the steps are the same for any Linux distribution.

First thing to do is to install the software we need. Open up a terminal and type:

sudo apt-get install bind9

Once installed it is time for some configuring.  The first file we need to configure is named.conf.local.  So in the terminal type:

sudo nano /etc/bind/named.conf.local

I have used nano to open up the file but use whichever text editor you are happy with.  Insert the following code into the file:

# This is the zone definition. replace example.com with your domain name
zone “comtech.com” {
type master;
file “/etc/bind/zones/comtech.com.db”;
};

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation – e.g my network address is 192.168.0
zone “1.168.192.in-addr.arpa” {
type master;
file “/etc/bind/zones/rev.0.168.192.in-addr.arpa”;
};

Replace comtech.com with the name of your DNS domain (this is not the same as an active directory domain but rather a name for your DNS zone).

Next up is the options file.  In the terminal type:

sudo nano /etc/bind/named.conf.options

Within this file we need to modify the forwarder with the address of your ISP’s DNS servers.  So modify the file adding the following:

forwarders {

194.72.0.114;
194.74.65.69;
};

Replace the addresses above with the addresses of your ISP’s DNS servers.

Now we need to add the zones file:

sudo mkdir /etc/bind/zones

And then configure it:

sudo nano /etc/bind/zones/comtech.com.db (replace comtech.com with your DNS domain).

Add the following code to the file:

// replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
comtech.com.      IN      SOA     chris-server.comtech.com. 
// Do not modify the following lines!
2006081401
28800
3600
604800
38400
)

// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
comtech.com.      IN      NS              chris-server.comtech.com.
comtech.com.      IN      MX     10       mta.example.com.

// Replace the IP address with the right IP addresses.
www              IN      A       192.168.1.4
mta              IN      A       192.168.0.3
chris-server              IN      A       192.168.1.4

In the above code replace the following:

comtech.com with your DNS domain name,

192.168.1.4 with your static DNS server address,

chris-server.comtech.com with your computers hostname.dns-domain,

mta is your mail server (if you have one).  If you do modify the IP address to show this.

Next we have to create the reverse DNS zone file:

sudo nano /etc/bind/zones/rev.1.168.192.in-addr.arpa

Add the following code:

//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server
@ IN SOA chris-server.comtech.com admin.comtech.com. (
2006081401;
28800;
604800;
604800;
86400
)

IN    NS     chris-server.comtech.com.
1                    IN    PTR    comtech.com

All that is left to do is restart bind:

sudo service bind9 restart (using upstart) or sudo /etc/init.d/bind9 restart (init scripts)

Don’t forget to test the new configuration:

dig comtech.com

About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

 

 

 

 

Mounting your hard drive in fstab

This tutorial will show you how to mount your hard drives in the fstab file used on all Linux systems.  The following commands were run on Linux Mint 11 but should still work on other systems.

Open up a terminal and type su.  When prompted enter your root password.

Next type gedit /etc/fstab.  This will open up the fstab file which is located in /etc using the text editor gedit.  You should get something which looks like the following:

# /etc/fstab: static file system information.
#
# Use ‘blkid -o value -s UUID’ to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type>  <options><dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid       0            0
# / was on /dev/sda1 during installation

/dev/fd0   /media/floppy0 auto rw,user,noauto,exec,utf8 00      0
/dev/sdb1       /media/dev/sdb       auto       defaults           0             2
/dev/sdc1       /media/dev/sdc        auto       defaults           0             2


Now the entries that interest us are the final two for sdc1 and sdb1.  These are two internal hard drives that have been added to the system.

Before adding any entries you must first know what the hard drive is called.  Chances are if you are adding a second drive then it will be called sdb1 but to check type fdisk -l (as root).  Once you know you will then need to decide where to mount it.  Linux usually uses the /media directory to mount file systems but the choice is yours.

Once you have the required information copy the entry above for either sdb1 or sdc1 and replace /media/dev with your mount point and sdc1 / sdb1 with the name of your hard disk.  That’s it.  Reboot and your hard drive should now be recognised and mounted at boot.

About the Author

P1020114

Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.

Follow @Comtech247 on Twitter

 

 

CyberChimps
Follow

Get every new post delivered to your Inbox

Join other followers

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera
WP Like Button Plugin by Free WordPress Templates