Sign in to follow this  
Followers 0
Swerve

Ubuntu as a server question

19 posts in this topic

I'd like to install Ubuntu to work as a server on my machine, allowing me to connect via SSH from work, and also host some sites with Apache/PHP/MySQL.

Have two empty partitions left, just XP installed now.

My question is should I install one copy of Ubuntu 7.10 to use as my 'normal' GUI operating system AND Ubuntu server edition to run the server I want to create, OR can I just install one copy of 7.10, and have that provide the server/SSH features I seek? I'd like to leave the machine running when I'm out and be able to SSH into it to avoid filters etc, and also view some sites I could then host on my box.

Thanks!

0

Share this post


Link to post
Share on other sites

Ubuntu "server edition" isn't anything special. Just install Ubuntu, then install the servers you need.

0

Share this post


Link to post
Share on other sites

Thanks Ohm, knowledgeable as always :)

I'll be trying this tomorrow.

Does lead me to another question though, as I'll still have another spare partition, I'm going to install Windows Server '03 on it.

Should I install the MS server before the Ubuntu, so that GRUB will take over the boot process, this is what I'd like to happen.

0

Share this post


Link to post
Share on other sites
Should I install the MS server before the Ubuntu, so that GRUB will take over the boot process, this is what I'd like to happen.

Yep, since Windows has the bad habit of overwriting the MBR by default.

So first thing to do is install WIndows 2003 Server and then Ubuntu with grub or LILO.

0

Share this post


Link to post
Share on other sites

Yeah, I always install Windows first. There's the MBR issue, but there's also issues with the Windows installer partitioner and partitions it doesn't recognize. It once wiped out my Linux partition for no apparent reason (can't say user error wasn't to blame, but I don't think so at least) and it often won't create partitions if there are Linux partitions before or after it. It's just a pain, install Windows first.

0

Share this post


Link to post
Share on other sites

Ubuntu Server does use a different kernel with certain optimizations, but the advantages of it over Ubuntu Desktop are no where worth bothering with having two Ubuntu installations.

0

Share this post


Link to post
Share on other sites

Thanks everyone, I've now installed the OS's and have XP, MS Server '03 Enterprise and Ubuntu desktop 7.10 triple booted.

My aim now is to create the server setup for Ubuntu and have found this guide which I like as it lists all the commands I need to enter.

My only question before I start is in relation the the following two paragraphs:-

You need to buy a dedicated server or a VPS package if you want to setup your own server. If you want to experiment with the server and installation it is recommended to buy a vps package from various hosts. I prefer vpslink because of their pricing. Believe it or not it is so easy to install and configure your server yourself eventhough you are new are to linux and dedicated/vps hosting.

First download PuTTy if you are accessing your server through SSH. Just enter the IP of your server with root login to access your host. As you probably know, Webmin is a freely available server control panel and we will setup this once we have completed the LAMP server and Mail Server. Webmin makes more easier for us to fine tune our linux box.

Am I correct in assuming this isn't at all needed, but that I should follow the rest of the instructions?

Thanks for any advice, thought it best to ask as having to re-install all this again would be a major 'ball ache'.

Once again, my doing this to to allow the hosting of some sites, and to be able to SSH into the server allowing the avoidance of filtering programs, from where ever I may be in the world. Finally an extra bonus would be the ability to run a mail server, running at the same time as the other features.

Thanks!

0

Share this post


Link to post
Share on other sites

If it's not for huge volume usage, then a home server is fine.

Your ISP might not like it though. Look in their TOS.

I've known people who've had servers at home which violate the ISP's terms of service, but they've never had a problem. Others seemingly get a warning notice in a few hours.

One low-to-medium bandwidth site, shouldn't be a huge problem unless your ISP is very picky about these things, and regularly scans for this sort of 'abuse'.

For the mail server, port 25 is probably blocked. This is so you can't run your own smtp server and send email from billgates@microsoft.com. They'll force you to use their own smtp server, so running your own POP3 server as well, won't really be a huge benefit.

Take my words at a grain of salt though. Wait for a senior member to concur, or slap my wrist. :lol::P

0

Share this post


Link to post
Share on other sites
My only question before I start is in relation the the following two paragraphs:-
You need to buy a dedicated server or a VPS package if you want to setup your own server. If you want to experiment with the server and installation it is recommended to buy a vps package from various hosts. I prefer vpslink because of their pricing. Believe it or not it is so easy to install and configure your server yourself eventhough you are new are to linux and dedicated/vps hosting.

First download PuTTy if you are accessing your server through SSH. Just enter the IP of your server with root login to access your host. As you probably know, Webmin is a freely available server control panel and we will setup this once we have completed the LAMP server and Mail Server. Webmin makes more easier for us to fine tune our linux box.

Am I correct in assuming this isn't at all needed, but that I should follow the rest of the instructions?

Thanks for any advice, thought it best to ask as having to re-install all this again would be a major 'ball ache'.

Once again, my doing this to to allow the hosting of some sites, and to be able to SSH into the server allowing the avoidance of filtering programs, from where ever I may be in the world. Finally an extra bonus would be the ability to run a mail server, running at the same time as the other features.

Thanks!

The VPS they mention in the article is a 'virtual private server'. This is a VM-Wared (or the like) machine that you might have access to should you 'rent' one at an hosting company. In your system I believe that you will be using your own (real) machine on a home connection. You can ignore this paragraph.

Putty is a good tool to access ssh servers from Windows machines.

Webmin is a web based configuration tool, it can make setting up/administering a server a bit easier. Webmin was briefly mentioned in Linux Reality #275 (see http://www.linuxreality.com/podcast/episod...ener-feedback/).

On suggestion I have it to use that spare partition for a data/home partion, that way you can re-install Linux without trashing all your data.

Munge.

0

Share this post


Link to post
Share on other sites

Wow, that was a ball ache. Initial setup is now completed though,

Managed to create the LAMP setup, install an email server, SSH ability, DNS server and finally a print server to (don't really know why I'll need the last two, but thought I might as well, perhaps the DNS server could be used to pass filters also by sending all the packets through it, this was on a Binrev episode a while back I think, perhaps the Tunneling episode).

Thanks for the webmin reccomendation mungewell, only had time to have a brief look through the control panel, but it seems to cover everything, and then some!

Really wishing I had another box to be able to connect to this one and test things out, chances are when I get 'off site' there will be some problems with how I'm configuring everything, but thats life, there does seem a hell of a lot to figure out.

/ramble

Anyways, I was wondering if anyone had some cool uses for the setup. Hacking related especially, or otherwise, I'd like to get the most out of it as is possible, right now all I can think of is the tunneling, having access to some files when out and about, and having a backup of my USB flash drive incase it gets corrupted. I'm sure there must be some more interesting things than these.

0

Share this post


Link to post
Share on other sites

Having some problems getting webmin configured. Only some of the Modules are working (apache, mysql etc are fine), but when I try to view the PHP.ini file, amongst other things it keeps telling me that they aren't installed, I think webmin doesn't know where to locate them as there in a place it wasn't expecting, but for the edition of Ubuntu they should be the default values. My problem is that I don't understand/know the linux file system correctly.

Anyone had a similar experience, or anything?

0

Share this post


Link to post
Share on other sites

My cable co. sucks for this. They port scan constantly for web servers, ftp, mail, and that's to name a few. Every service I've ever tried to run only ran for a hour then blocked. Then you are 24hr watch because even if you change your ports they still block you, within like 5min. I've been warned so many times they always say it's to control spam. Now I use dsl for all those needs the co. i use is really awesome and I kept my cable for speed. Kinda nice to have more than one connection.

0

Share this post


Link to post
Share on other sites

Interesting.

Well the servers all setup now, after several attempts (in a basic manner) I'm hoping, webmin an all. I tested that the ports I wanted open are, and the rest are closed. Created an account at DynDNS but as I only got one machine haven't managed to test it off-site. This really is a whole new world.

I'm going to install Putty and try things from a friends house soon. My ISP are pretty nit-picky on things, so may fall foul of the situation you mention rockinbeeats *fingers crossed*. Also run Nessus on it, see what it has to say.

SSH port is open, but 443 SHTTP is not, I'm assuming that Putty will use the port I set for SSH, hopefully.

This so far has taken a lot of trial and error, but if one good thing has come out of it, I prefer to use the CLI now over a GUI (where possible), kinda reminds you of the MS DOS days, lol. The bad thing is that I've fried my USB flash drive by leaving it plugged it, meh.

One of the next things I'm going to try to do is install a webcam in my house, so that I could view it from where ever I may be.

Edited by Swerve
0

Share this post


Link to post
Share on other sites

OK, so I tried Putty from my friends machine ( which is a straight cable connection, no router/switch, XP OS) and instantly got the following :-

"server unexpectedly closed network connection"

Like I mentioned, I am sure the ports are open on my router, any ideas what the issue could be?

I tried connecting via SSH and Telnet, but both 'no go'.

0

Share this post


Link to post
Share on other sites

You mentioned open ports in your router, so I'm assuming you're using some kind of NAT router (Linksys, something the cable co gave you, etc). Did you forward the open ports in your router to the server? Also, is the IP of the server-machine static? It may be changing via DHCP every time you reboot. It would probably be best to test first if SSH, HTML, etc is working by plugging a friend's laptop/desktop into the LAN side of your router and trying it from there. If it works from the LAN, then the issue is probably port forwarding on your router. You can look up the directions for port forwarding in your router's manual/documentation -- I've had them call it everything from just "Port Forwarding" to wrongly labeling it as "DMZ Config" or "UPnP Config."

EDIT: Nevermind, apparently someone /had/ mentioned DynDNS!

You may not want to use the default SSH/web/etc port, to keep both your ISP and would-be attackers from seeing standard services running on your machine. I've had attempted brute force/dictionary attacks done against my SSH server, to no end of course, but it still hogs up bandwidth. You can just use your router's port forwarding to alter the ports, rather than actually changing the ports SSH/Apache are running on for the Linux box.

Edited by systems_glitch
0

Share this post


Link to post
Share on other sites
OK, so I tried Putty from my friends machine ( which is a straight cable connection, no router/switch, XP OS) and instantly got the following :-

"server unexpectedly closed network connection"

Like I mentioned, I am sure the ports are open on my router, any ideas what the issue could be?

I tried connecting via SSH and Telnet, but both 'no go'.

Could perhaps be your sshd config? Are you allowing external connections? You seem to be running an awful lot of services too. Every one of those is a security hole just waiting to be exploited. You do NOT want to be running telnet. Best to tunnel EVERYTHING through ssh if you can and only forward port 22.

0

Share this post


Link to post
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
Sign in to follow this  
Followers 0