LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-09-2012, 02:14 PM   #1
nobuntu
Member
 
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143

Rep: Reputation: 24
A few basic questions regarding a Debian server.


Hello,

A few weeks ago, I was on my morning walk when I noticed a desktop computer and monitor in a trash pile along the side of the road. I can't bear to see computers go to waste, so I found the owner of the trash pile and asked him what was wrong with the computer. He looked to be in his late 70s, so when he said that it "went kaput" with a blank look on his face, I had a feeling I should be able to fix it. He was more than happy to let me have it, and after a little bit of tinkering, I discovered the problem was only Windows XP-related (The SYSTEM32 folder had been deleted), and the computer itself was fine. My first thought was that it would be interesting to turn it into a dedicated server and host my websites on it; I have been building sites for a few years now, but never actually attempted to create my own server - I've always used shared web hosting.

I can't find much information on the machine, but I am fairly sure it is this. I am not particularly good with hardware, but it seems to me that the specifications of the machine are more than sufficient for my needs (Mostly lightweight WordPress sites) - please, correct me if I'm wrong.

Before I embark on getting the server up and running, a project I am undertaking with a good friend of mine who is also very interested in Linux, I have a few questions.

1. Security. What extra precautions must I take to ensure that the server (Apache) can not be hijacked? Is it possible to somehow attack other computers on the network through the server, using the server as a portal to the other systems on the network? There is only one computer on the network which is really impportant, but its contents are confidential and it is critical that it not be compromised.

2. Interface. I had read somewhere that it was not a good idea to install a graphical desktop environment on a server. Why is that? I am not very skilled with Terminal/Bash yet, despite having used Linux since late 2010 (I have basic knowledge of things like sudo/mkdir/cd/ls), and while I would like to learn its mysterious ways, it would be quite intimidating to dive into administering a server using 100% CLI.

3. Remote Access. As I mentioned earlier, this is a project I will be working on with a friend. He needs to be able to get into the server and administer it (upload/remove/edit files, create directories, and other common administration functions) from his home (Windows 7 + Linux VM's) computer, although the server is/will be at my house and we are a few miles apart.

4. Email. How simple is it to set up a mail server in addition to the http server? (To be able to create email addresses @ the http domain and send/receive messages from those addresses)

5. DNS. The addresses I will be hosting are a mix of subdomains from freedns.afraid.org (which can be pointed to nameservers or A records, among other things) and domain names registered with Domain.com (which seem to require pointing to nameservers, although I am not sure. There is a mysterious option to "register nameserver" which looks similar to freedns' A record pointing. Is registering a nameserver the same as allocating an A record?) Would pointing the nameservers to a service like Point let me use a domain with the server? I was under the impression that one needed to learn port forwarding to use I do not quite understand port forwarding yet - I have been into my Linksys router and tinkered a bit, but I can't say I know enough to be able to competently forward port 80 to the right place.

Any help with these questions would be greatly appreciated. Thank you for your time.

Lawrence

Last edited by nobuntu; 06-09-2012 at 02:24 PM.
 
Old 06-09-2012, 08:06 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
A few observations:

The server should have a static ip so you can set up the port forwarding for port 80. As for remote connection, forward the ssh port on your router to the server ip address (the standard port is 22, but you can use a non-standard one it you are extremely concerned with security) and connections by ssh/scp will be possible.

I don't think there's anything wrong with having a GUI on a server, especially a home hobbyist server being used for self-learning. It sure made my life easier when I was learning Linux by self-hosting. Hosting companies don't do it, because their servers are by and large headless, often administered remotely by persons far from the data centers themselves, and often serving up hundreds of sites.

You can configure Debian to boot into the command line in runlevel three. It takes more than just changing the runlevel in /etc/inittab. I accomplished this by installing sysv-rc-conf to make the appropriate adjustments to the boot process (mostly turning off GDM for runlevel 3 as it recall--sysv-rc-conf in the repos). Then you can start the GUI when and if you need it.

I used no-ip.com for dynamic DNS and had a thorougly satisfactory experience for the four years or so I did. I was able to register my own domain through them and use it with no extra charge than the registration fee when I decided I had grown enough to want my own domain name. (Eventually, my MySQL database outgrew self-hosting when the database got to about 150 MB.)

I have never set up an email server, but most dynamic DNS providers will provide email forwarding.

Be sure to check your ISP's terms of service. Some of them are actively hostile to self-hosting unless you spring for a "business" account. Some don't care, as long as you aren't providing hosting services for third parties. Some are apathetic unless you cause them inconvenience.

Last edited by frankbell; 06-09-2012 at 08:07 PM.
 
Old 06-09-2012, 09:11 PM   #3
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
1) Yes, if you intend on doing things properly (and there are many professional admins, getting paid, who don't), A linux based webserver is usally called a LAMP (Linux Apache MySQL PHP), to get you started, i would suggest google for setting up a LAMP on your chosen distro, and securing it, but also search for more detailed information on securing all the different parts (apache, mysql, php, etc etc). A firewall will be another issue, which could be complicated somewhat through the modem/router that you connect to the internet through.

2) GUI's increase the resource overhead the system uses, which allows less resources for the services themselves. Whilst there is nothing wrong with using a GUI, i honestly believe the CLI is much more powerful and efficient. Using any GUI you are comfortable with, imagine how long it would take to go through every file in a directory, and replace every instance of word1 with word2. This can be done in one line and 51 keystrokes, with
Code:
for i in * ; do sed -i "s/word1/word2/g" $i; done
That being said, there is nothing wrong with using a GUI itself, especially when starting out.

3) Remote access is easy, there are tools such as SSH for a remote shell (CLI) connection, or there is also VNC, which gives remote access to a GUI interface. Once again, security applies to these protocols as well.

4) Personally i have always struggled the most with, I find myself spending more time googling than anything else ive set up. Security is a big thing, you dont want your SMTP server getting compromised and used for spam and consequently get blacklisted. There are a few different ways to go about mail servers, it would probably be worth creating a new thread when you get to that stage.

5) I'm not particularly familiar with free/dynamic DNS, i have only ever registered *.tld domains and pointed them to my own name servers. I found it fairly easy, but then again, have very simple requirements.

One thing to consider with hosting websites from home is your connection, 1) uplink speed and 2) bandwidth. When you are hosting services to the internet, your uplink speed becomes the important factor. In a lot of cases (at least in my area) getting a connection that will sustain the traffic fast enough, for a reasonable price, is virtually impossible.

A better/cheaper option, may be to hire a VPS service, where you get full access to a remotely hosted virtual machine. Usually with uplink speeds 50 times the speeds you can get at home. They can be rented for anywhere from $5 a month, depending on specs. It is definitely an option worth investigating..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Twp basic Debian questions killy9999 Debian 3 06-30-2007 09:52 AM
A few basic DNS Server Questions Ciralia Fedora 3 06-08-2007 02:38 PM
Basic questions about mail / web server mazzo Ubuntu 2 12-27-2006 10:16 PM
nOOb, switching from slackware to debian (some basic questions) drawhla Debian 5 08-30-2004 06:32 PM
Ntop with 2 nic's on Debian + basic questions! bazagee Debian 2 02-19-2004 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration