Welcome, Guest. Please login or register.
Did you miss your activation email?
November 29, 2024, 11:11:51 pm *

Login with username, password and session length
Pages: [1] 2
Print
Author Topic: Hosting FTP/File-Directory Linux Server, Help!  (Read 12122 times)
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« on: February 14, 2012, 06:27:14 pm »

I am looking at using about 200GB from my Linux file server to host all kinds of various files/fixes for EZ Server (P99 fix, MQ2 versions, cleaned spell files [without all the item spam and SK smiling...], etc). I would like to possibly include the option for some of the longer players to upload things they also find useful (custom maps, the drop spreadsheets, whatever).

Basically I am unsure of where to go on setting up the FTP like "directory sites" on a Linux box. I understand that LAMP setup is required (or helpful) but I do not know much else about it. Web development is my absolute weakness.

Any useful links, guides, info, etc would be greatly helpful.


-Hate
Logged

I'm so sorry Hunter, I tried...
Fugitive
Legend
*******
Posts: 1807


TROLL KING


View Profile
« Reply #1 on: February 14, 2012, 08:54:24 pm »

I am looking at using about 200GB from my Linux file server to host all kinds of various files/fixes for EZ Server (P99 fix, MQ2 versions, cleaned spell files [without all the item spam and SK smiling...], etc). I would like to possibly include the option for some of the longer players to upload things they also find useful (custom maps, the drop spreadsheets, whatever).

Basically I am unsure of where to go on setting up the FTP like "directory sites" on a Linux box. I understand that LAMP setup is required (or helpful) but I do not know much else about it. Web development is my absolute weakness.

Any useful links, guides, info, etc would be greatly helpful.


-Hate

++1
Logged


Quoted for the Brotherhood of Warriors
"I want my wizard to cast Fugitives instead of fireballs.
We can't always get what we want. ;-)"
-Hate"
Noel
Newbie
*
Posts: 48


View Profile
« Reply #2 on: February 14, 2012, 10:19:39 pm »

Lets start with what distribution and version you are using: Ubuntu, RedHat, CentOS0, Gentoo, etc...

Second: Do you have public ip or can forward ports from firewall to linux server

Third: do you have root access (sudo?)

One of the easiest and quickest FTP to setup? Probably VSFTPD. However, if you don't do it right - you may open up your server to intruders.

The best place to see examples of config and setup is the documentation for your distribution. At least thats a good place to start.

Logged
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #3 on: February 14, 2012, 11:04:45 pm »

Ok, Noel thank you for quick reply!

First, it was (notice past tense) Ubuntu 11.10 Server x86. Reinstalling it caused hard drive to die (the install drive) and the 500gb I was going to install is SATA, this clunker is EIDE only.

Second, yes. I would be hosting from home with a 30mb up/down connection. I have a dinky home router but am proficient in the Linux 'iptables' setup and have pretty overkill setup going before it died. (backed up config) Locked down connections (for uploading) to SFTP only, only users under the authuser group can log in (and even then, ONLY for sftp, no shell, home directory as root of share [not hdd]), blocked ALL connections outside of the USA, root disabled, only admin account is toting 18 character password.

Third, yes. See above :-D

I actually setup test system at work and installed Apache to use a generic directory listing for downloads (and obviously SFTP for uploads). It worked well.

Now...to replace that system.

-Hate
« Last Edit: February 14, 2012, 11:36:02 pm by hateborne » Logged

I'm so sorry Hunter, I tried...
Noel
Newbie
*
Posts: 48


View Profile
« Reply #4 on: February 14, 2012, 11:50:04 pm »

Ok, Ubuntu is good, since it is easy to maintain (this becomes important later as the packages become outdated).

Yes, you could install LAMP, but it may be more than you need. LAMP= Linux Apache MySQL php. You don't need MySQL strictly for upload/download functions and php is also not needed for this purpose, but should be installed as many other useful web tools use it.

Since your machine doesn't support SATA, it is probably not 64bit compatible. So go to http://www.ubuntu.com/download/server/download and download either LTS or latest.

Install system, then install Apache, PHP, VSFTPD, SSH. If you have a home grade router - you don't need iptables strictly speaking. My recommendation is to change SSH port and FTP ports to uncommon ones, so you don't get pounded by brute force bots. Then forward those ports from the router to the linux box. You may want to setup a DNS entry for that machine if you have a domain name you can use. An A record will be needed in DNS config pointing to the IP of the router/firewall.

Apache can provide basic directory listing for downloading out of the box. Just create a new site that points to the folder for downloads and enable directory listing (may be disabled by default).

You will probably put FTP and Apache dirs in /var/www


To take away some of the pain of the shell and commands - you may want to install midnight commander (mc package). Which is Norton Commander style management shell that has an editor (mcedit) and more.

It sounds like you know your way around the system, so go to the docs for Ubuntu and start hacking away.

Latest server:
https://help.ubuntu.com/11.10/serverguide/C/index.html

LTS server:
https://help.ubuntu.com/10.04/serverguide/C/index.html


Oh, i hope you are using apt-get for package installs and downloads...just making sure....

Logged
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #5 on: February 15, 2012, 12:16:23 am »

My recommendation is to change SSH port and FTP ports to uncommon ones, so you don't get pounded by brute force bots.

"Best step out of the line of fire", it was changed. I have SSH on a special port. FTP only works as SFTP through SSH port. No anonymous, no guest.

I will just replace the machine. It was only running 768mb of DDR2, single core processor, etc. It can be safely tossed. I think a 64bit might be overkill as it is for a simple file server (but that is an opinion).

Also, in the test environment at work: I created a user called "apache" (and matching group), tossed home directory to /home/apache, disabled login, removed shell, and stored all website based files (aka disposable) files in /home/apache/www. The user exists only to run the daemon and has NO privileges.

Lastly, yes 'apt-get update' followed by 'apt-get upgrade' every few days. I could set it to auto, but I had habit of getting patches that were a bit 'too' fresh. :-P

Thanks for the continued info Noel!

-Hate


(p.s. - I still promised that t2 zerg fest if you need it. I could also possibly rush one character to 3.5 depending on how friendly the drops are!)
Logged

I'm so sorry Hunter, I tried...
oldepharte
Jr. Member
**
Posts: 97


View Profile
« Reply #6 on: February 15, 2012, 12:17:34 pm »

I disagree with installing php because 'many other useful web tools use it.'

This is precisely why you do not want to install php unless you have a driving need from an application for php.  It is essentially a new attack interface in your environment.  For a limited purpose ftp server such driving need does not exist.

KISS* principle applies.  If there is no explicit need for a functionality, remove the functionality.

/s/ Your friendly neighborhood (retired firewall & network security geek) troll,

Skeezy Ratty Troll



* Keep It Simple, Stupid
Logged
Noel
Newbie
*
Posts: 48


View Profile
« Reply #7 on: February 15, 2012, 01:53:51 pm »

Hate - i would love your help with 3.5 - been stuck with 3.0 and T2 for a while now.


Skeezy - default Apache+php on ubuntu is safe unless there is a site/app that uses PHP has holes in it
Logged
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #8 on: February 15, 2012, 03:23:45 pm »

The comment about LAMP was because I know jack about web development. Networking and script-level are where I tend to do much better.

MySQL doesn't seem to be needed for my setup. I have a generic PHP/HTML upload with the ability to select the path from a dropdown (so people may eventually be able to select where their file is going), just need to add a very minor login now.

oldepharte and Noel, thank you for the help!

-Hate
Logged

I'm so sorry Hunter, I tried...
Kushie
Full Member
***
Posts: 150


View Profile
« Reply #9 on: February 17, 2012, 07:17:10 pm »

Remember... Co.cc domain names are free  Shocked
Logged

Bitch please.
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #10 on: February 20, 2012, 09:42:27 pm »

Thanks for the heads up. I have a DynDns atm and looking at picking up legit (because...it's $12/year).

UPDATE: I will soon have enough to order a box to replace what was my linux box. Should be maybe another week. Found a few for ~$150 with Core 2 Duo and ~2GB of ram. If anyone finds anything else similar or cheap, LET ME KNOW! Hard drive is irrelevant as I have a 500gb to throw in. Operating system is irrelevant as it will have Ubuntu Server 11.10 on it.

-Hate
Logged

I'm so sorry Hunter, I tried...
Slyminx
Jr. Member
**
Posts: 70


View Profile
« Reply #11 on: February 22, 2012, 07:34:49 am »

Might want to consider that not all players who'd have something to contribute are from the USA.

So blocking ALL IP's outside of US is telling those particular players that you think their contributions are irrelevant. Discrimination at it's best Wink
Logged

Have you seen my bear Tibbers?
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #12 on: February 22, 2012, 08:31:41 am »

Slyminx, nothing personal, but no.

First, yes it is discrimination. My basis for this discrimination is that 80% of the traffic smashing into our firewall guarding web servers is from outside the US. As a production company that doesn't ship outside the continental US (with small exceptions to *huge* orders in Canada), we have no reason even accept traffic from overseas. My thinking is similar, but I may be off in it. I could add a few other countries, but I need to know where some of those contributing players reside.

Second, putting words in my mouth is irritating. Anyone outside the US wishing to connect would only need to ask and give me their country of residence. Unless I am mistaken, we have no players from China, Russia, Korea (N/S), Japan, or the African nations. With ultra rare exception, most of those will stay blocked.

Third, downloading files would require nothing. Uploading would require a login. I am not handing a login out to any John Doe that asks for it. Even those that get a login will have severely limited access to anything else on server, short of uploading (to prevent system seizure).

I am not trying to start a flame war by doing this, simply trying to keep the server secure. Unless I can find a way to go all Fort Knox with it, this will be the way I do things at the moment.

-Hate
Logged

I'm so sorry Hunter, I tried...
Hunter
EZ Server GM
Legend
*******
Posts: 8100


EZ Server GM


View Profile
« Reply #13 on: February 22, 2012, 01:14:39 pm »

Internet security is not easy these days. Its a challenge.

Anyways, I know we definitely have players from Japan, Hong Kong, and Canada (I've been emailed by a few).

Also I know a few years ago people from China played but maybe not anymore.
Logged

Hunter - EZ Server GM
hateborne
Legend
*******
Posts: 2282


Don't nerf me bro!


View Profile
« Reply #14 on: February 22, 2012, 05:24:38 pm »

Hunter, thank you for the update.

After giving it some thought, I will *NOT* be blocking the rest of the world. Since the list of people that may upload will be tightly controlled, the uploader's accounts tightly locked down, and access forbidden outside of that...it may be safe to open it up. Only the custom SSH port and HTTP port need be open (on both router and ufw), so that blocks out a ton of other nonsense. As soon as the funds become available, I will purchase the system to host these files.

Thank you again to everyone that dropped in information on this thread!

-Hate
Logged

I'm so sorry Hunter, I tried...
Pages: [1] 2
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6156
  • Latest: Rin1
Stats
  • Total Posts: 65127
  • Total Topics: 5066
  • Online Today: 298
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 159
Total: 159
TinyPortal v1.0 beta 4 © Bloc