Having grown up in a world already dominated by the internet and technology, it makes it very challenging for me to imagine such a world without it. My daily morning routine is to turn off the alarm on my phone, and proceed to spend up to half an hour scrolling through social media. Given that, so much of my life is surrounded by technology, I wanted to not only consume it, but also understand and master it. This is one of my long term goals as I evolve through my career in tech. In attempting to learn more about how these amazing tools and machines work, I’ve taken upon myself many projects, my most recent attempt at one was hosting a webserver locally in my room.
For this, I managed to get my hands on some old computer hardware and equipment. The list of which includes;
- 2x Dell OptiPlex 7010
- 1x Cisco ASA 5506-x Firewall
Both Dell OptiPlex’s looked to be in good condition, if not just old and dusty. Checking the serial numbers on both devices shows that they were manufactured in 2013, a decade old as of the time of writing this. Both machines also had a active Windows 7 Pro license on them. While they were in no shape to say turn into a gaming machine, nor were they small enough to store in my living room as a media server, I decided to try and turn them into a locally ran webserver. Why a webserver? Because, who doesn’t want to have their own website? Local hosting is a great project that would hopefully teach me the ins and outs of computer networking as well as server hosting. All of the lovely 2-3 letter acronyms of IP, NAT, ACL, and more were to be conquered and understood with this project.
The idea was fairly simple. Power up both machines, wipe them, install a newer OS that I was more familiar with, and start configuring it to host a simple website. I installed Windows Server 2022 on both machines, and designated one to be my webserver (hostname: PUB-SERV-1) and the other to be a local test machine (hostname: LOCA-SERV-1). Windows Server was chosen arbitrarily, as it was a “server” OS rather than a consumer Windows 10 Home/Pro install. It doesn’t really matter all too much to me but it would have sounded more official going with the former.
After booting and configuring the machines, I got started with PUB-SERV-1 and installed WAMP-server on it. WAMP was chosen as it came packaged with all I needed to start hosting. The main component was it having Apache2 come with it. Starting up Apache2 to host a localhost website was easy enough. All I did was configure the http and vhost conf files to allow for it to read the new test1 web environment that held my basic index.html file. The HTML written was quickly configured using an online HTML editor. Developing the website was less important compared to the networking configurations needed to be done to allow for it to be access on the internet. Here’s a preview of the HTML written.
<!DOCTYPE html>
<html>
<title>test1</title>
<head>
</head>
<body>
<h1>test1</h1>
<div>this is a website with cool and amazing stuff on it, come look!</div>
</body>
</html>
test1
The first hurdle I had to face was getting PUB-SERV-1 online and connected to the internet. My ISPs internet solution was a simple gateway modem and router combo with two Ethernet ports available. One port was already occupied by my main rig, and the other was also in use. The OptiPlex’s did not have any wireless capabilities so I needed to figure out a way to get more ports working for these computers. Recall that I also managed to get my hands on a Cisco ASA. This would be the answer, as it came with one port reserved for the gateway connection and eight more ports for other devices. Plenty more to get these OptiPlex’s running.
My second hurdle was configuring the ASA to actually allow for internet connectivity. This is where my lack of knowledge on computer networking and configuration really takes a hit. I’ve worked on getting a server up and running on a local network before, it was fairly simple and was a fun project for school, but it only was on the LAN. Now the challenge was to get it on the internet. This was a very difficult task, one I was not prepared for.
Along with that, I’ve never work on Cisco equipment before. I’ve messed around with some simple TPlink switches and managed switches, but Cisco is totally alien to me. Not to mention that the ASA commands on the firewall itself was like learning an entire new language.
The plan was to open a port on my ISP router, pass that open port to the ASA, and configure the ASA to open the same port to PUB-SERV-1. That would open a line for incoming connection through that port to my WAN IP to be forwarded to the ASA, which will then be sent to PUB-SERV-1, allowing that traffic to read the basic HTML file and display a website. A diagram of the basic topology can be seen below.
Ultimately, I failed. It’s not a bad thing to fail, as it’s a learning experience to see what and why it went wrong. So here is what I think went wrong.
1) Not understanding computer networking enough.
In trying to allow for incoming connections to my home, I needed to configure and open some ports so that traffic is allowed to enter pass my router. However, I understand little about what or how ports work. So in trying to mess with something I know very little about, something is bound to not be configured correctly, either on the ISP router, my ASA, and/or on PUB-SERV-1.
2) Not understanding Cisco ASA.
I spent a very nice three days long weekend learning how on earth the ASA worked with all of its confusing commands and not so very newb-friendly documentation. There is an option to work on the ASA through a web GUI called an ASDM, but even then the setting descriptions and such were too complicated for me to understand. If I had more time and/or had a mentor guide me through how everything works, I think it might have worked out. Alas, not all is perfect.
Those are the main two reasons why I was unable to set up and host a webserver locally. Of course, there were many smaller bumps and workarounds I had to try, but all of the work lead to nothing but a blogpost of how failed. I am not discouraged. There are many more things I can do with my new hardware. I may return to this project in some time, but now my focus is on other things. Plus, managing a local webserver demands time and attention I currently do not have. It was a good try, but better luck next time. -al