How can I create a server for hosting websites?

Asked

Viewed 274 times

-1

Hello, I’m studying web programming and I ended up having an idea to repurpose an old computer that is sitting here at home.

Doing some searches on servers, I found that the best option for me is Ubuntu Server 18.04.2 LTS. I downloaded and installed on the machine in question, plugged it to the cable directly on the router, made some basic network settings, installed LAMP and an FTP server currently it only works on my local network.

Because I have very little knowledge about networks and servers, I would like to know:

  1. It’s a good idea to use an old computer like this?

  2. If it is a good idea, which packages and applications should I install on my "server" to be able to host websites and game servers safely?

  3. What settings are necessary for me to have security and not suffer a hack of my "server" or my personal network, putting at risk the data of other devices in my home?

  4. Is there any monitoring method for me to know who is connected and if I am being hacked?

  5. And what configuration do I need to do on my router to free up access beyond my personal network without losing security? (I did something similar to a game server a long time ago, but I don’t know if it’s safe)

NOTE: I have no intention of hosting websites professionally, it is only for study and also share my websites and my applications with some friends. Even if it is only for testing, I have a concern for the security of my personal network.

In case anyone can answer my questions, I thank you wholeheartedly/

1 answer

-1


1) It is and it isn’t. I find it interesting because this way you will be studying/learning how it works. The fact that the computer is old does not impact so much, since there are many applications that can run smoothly. On the other hand it is not as interesting because, as you said yourself, you do not have much knowledge in networks and security, and may end up leaving your local network (staff) exposed. (Search for hardening on Ubuntu servers)

2) LAMP brings together a series of tools that can be used to run a basic PHP application for example. If this old computer is 64 bits, search for how to run applications on Docker. Regarding what you will have to install in general, it depends on 'IN WHICH LANGUAGE' you will develop. For example if it is a website using Java, vc will use different tools( like apache Tomcat) than it would be a PHP project.

3) You have to be careful not to upload any application that contains vulnerability. For example an Apache < 2.2.34. insert link description here .You would have to release for example port 80,443 if it is a web application. In the most I suggest you create rules with UFW first. This way you can release for example only a specific IP ..

4) Yes, there are actually several. You can look at the logs in real time. This is often done with the #Tail -f command /var/log/auth.log (ex only). But you can use more advanced tools like IDS, IPS (ossec, Zabbix, Agios).

5) You will have to do port forwarding (releasing only 443.8) if it is web application. Also check that your modem/router firmware is safe. For this just play his template on google with a few keywords(security, exploit ..)

OBS: I will make a lab more or less than you want, in case you want to get in touch, call me at They chose that we exchange an idea. Remembering that I am also studying and everything I told you is based on what I have read and studied to date .. Telegram => @apolzek Valeuu =D

Hardening -> Ubuntu https://gist.github.com/lokhman/cc716d2e2d373dd696b2d9264c0287a3

Browser other questions tagged

You are not signed in. Login or sign up in order to post.