LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux As Server (https://www.linuxquestions.org/questions/linux-newbie-8/linux-as-server-280214/)

Riki Rezinunts 01-20-2005 02:43 PM

Linux As Server
 
Hey people! I just set up a Linux box which I will be using as a server when I get my static ip address sometime in February.

If there are any Linux addicts out there who could help me along with setting up my Linux box as a server I would greatly appreciate it!

First off let me give you some specs on my Linux box:
Hardware - 800mhz PIII, 128MB SDRAM, 3Com Cyclone Ethernet Card
(Going to be upgrading the memory to at least 256MB shortly.)
OS - Slackware 8.1 Distrobution of Linux w/ KDE Desktop Enviroment
(Going to be upgrading to Slackware 10 when I get it.)

Here is some specifics on the help I am looking for:

1. My Linux box will be connected to the internet through a Linksys router which two other computers will be connected to as well. How do I mount the drives on my two other w2k PC's so that I can share files accross the network? (I have samba and cpanel installed on my system and Linux see's my ethernet card fine.)

2. Once I get my static-ip what is it that I have to do in order to make my Linux server live so that I can start running my websites from it? This is pretty much my aim with setting up this Linux box. I am buying a domain and using my Linux box as the server so that I can set my own permissions without limitations and be able to physicly maintain it myself. Once I get the server up and running I will probably not even touch it too often.

3. Security...I know it's not that big of an issue since no one is really out to get Linux unlike MS but I do want to keep my system and files safe from any possible intruders. How do I go about setting up my security for my server? Any recommended packages for this?

4. This isn't really a major issue and isn't necessary to run my server but if anyone knows of any helpful tips/hints or packages for putting together scripts for web-based database, logging, polling, and interactive web applications that would be appreciated. I am hoping to be doing a lot of back-end stuff in the future.

If anyone can help me out then I would be willing to give them free server space. I doubt though that you would need it if you can answer these questions....hehehe....

twantrd 01-20-2005 02:53 PM

To answer your questions:

#1. You say you have samba. Great, that's what you need! You need to edit smb.conf and place in the appropriate entries in there for the other windows machines to be able to mount it. Lots of examples of smb.conf is on the net.

#2. To run websites, I recommend using apache. It's the best, really. You need to port forward port 80 on your router to the IP on your linux box. Again, lots of examples of httpd.conf on the net.

#3. You are very WRONG in this assumption. Just because not many virus's and trojans exist on linux as opposed to windows doesn't mean you should let your guard down. People can break in still and exploit old packages that you have. I would recommend shorewall (front end to iptables) to allow/reject connections based on your rulesets. Also tripwire or AIDE to make sure your system files/binaries hasn't been tampered with. Only run the services you need as well. Etc..

#4. Most people will help you correct your scripts but not hand them out for free. Otherwise, you aren't learning :). Read and learn bash scripting and perl. Once you get the hang of them, you can write your own and debug your own scripts. Much better than someone just giving them to you.

-twantrd

csfalcon 01-20-2005 02:55 PM

Quote:

2. Once I get my static-ip what is it that I have to do in order to make my Linux server live so that I can start running my websites from it? This is pretty much my aim with setting up this Linux box. I am buying a domain and using my Linux box as the server so that I can set my own permissions without limitations and be able to physicly maintain it myself. Once I get the server up and running I will probably not even touch it too often.
1. go into your router's setup page and forward port 80 to your Linux machine.

2. allow incoming requests on port 80 on your Linux firewall.

3. Set up Apache HTTP Server if it is not setup already.

4. Have your domain point to your static IP.

bdrake 01-20-2005 03:01 PM

Howdy! I can help you with a few things.
First, you don't need a static if you use someone like dyndns.org as your registrar. I use them for my domain and a few others I host (all on Slackware, running Apache), and it works great.

1. Add a port forwarding entry on your Linksys router that forwards port 80 to the internal IP address of your Linux box. Share the desired directories from your W2k PCs. Use smbfs entries in your /etc/fstab file on your Linux box to mount those shares. You can mount them as shares within /var/www/htdocs, or you can mount them elsewhere and put symbolic links in /var/www/htdocs.

2. Your port forwarding entry (in the Linksys Router, go to Advanced -> Forwarding) and either the static IP or a dyndns.org will take care of this. Make sure your ISP does not block port 80, or you will have to set up an external port forwarder; dyndns provides this as well (I'm not affiliated with them, other than as a very satisfied customer).

3. www.ora.com: Building Secure Servers With Linux (but it's cheaper at bookpool.com). Keep your patches up to date; that's pretty easy. Don't run any other services on that server; a single purpose (and single port exposed) server is a tougher nut to crack. Read, read, read. CERT advisories and Bugtraq are good resources.

4. Depends on what you want. Pick up "Learning the bash shell" and "Learning Perl" (probably "Learning the vi editor" as well) at the same sources.

You're right, I don't need the space. :) But thank you for the offer.

--Barry

Riki Rezinunts 01-21-2005 10:11 AM

Well thanks a lot guys! That helped out immensely.....I do believe I will have my server operational now once I get my broadband connection thanks to your speedy and informative replies. If any of you need any space for hosting anything in the future just let me know cause I have 140 gigs of space I can share with you!

Hangdog42 01-21-2005 11:42 AM

Quote:

Originally posted by Riki Rezinunts
I have 140 gigs of space I can share with you!
Just be sure to follow twantrd's advice on securing and monitoring your box or you'll be sharing that 140 gigs with a whole lot more people that you planned on.

Riki Rezinunts 01-21-2005 11:59 AM

Quote:

Just be sure to follow twantrd's advice on securing and monitoring your box or you'll be sharing that 140 gigs with a whole lot more people that you planned on.
Oh I deffinately will. I have been looking into and researching the security side of my server since posting this thread. I actually have a question about monitoring from another PC(s). Is there some sort of remote-ware that I can use on my 2 windows pc's or have on another computer like say a laptop on the road and dial into the Linux box through tcp/ip using a node for the Linux box in the remote-ware so I can monitor the linux box from other location? I've been trying to find something like this but havn't been having much luck.

Thanks again guys!

bdrake 01-21-2005 01:45 PM

Putty, http://www.chiark.greenend.org.uk/~s.../download.html, is a secure shell client that is also available for Windows. That's what I use from my XP box to administer my "headless" Linux machines (I keep 6 up in the attic, no mouse, keyboard, or monitor). Get putty-0.56-installer.exe from that page.

--Barry

Hangdog42 01-21-2005 02:55 PM

Personally I use ACID in combination with Snort . Acid gives you a nice interface you can access from any web browser and lets you see what Snort has detected. Bdrakes suggestion about putty is spot on as well. I use that to log into the machine and have a look at the logs. You could also install logwatch which I believe is capable of emailing reports about the logs. If you have a web-accessible account, that would mean you could use a computer that didn't have putty installed.


All times are GMT -5. The time now is 02:03 PM.