-
Notifications
You must be signed in to change notification settings - Fork 1
L. Public Web Server
In the last chapter we launched🚀 our Apache web server but it could only be accessed within the network created by our home router as it has a local ip.
In order to make our server available to the public we first need to:
-
set up port forwarding in our router
-
get a public domain
Before we move any further a word of caution:
-
it's not a good idea opening your port from your router
-
what we're launching right now is more of a beta site as it does not have any security certificates
-
the public domain we'll be using is temporary
-
the ip address we're given by our ISP might change as usually the allocation is dynamic
I highly recommend that you check out this youtube video, it's a step by step explanation on how to set up domains.google.com and basic explanations on all the commands we're running )
This will be done in your router, I am using a Zyxel and on the back of it i have my credentials(default username and password) and ip address.
Usually the ip address is: 192.168.1.1 or 192.168.1.0.
To log into our router we type in any browser the default ip address, then our credentials (if it's the first time it will ask you to change the password but you can SKIP that).
3 horizontal lines on the right -> Network Settings -> NAT -> Add New Rule
Usually you are asked to add:
Service Name : here you can put anything as it has no importance
WAN Interface: i set it as VD_Internet
Start port: default is 80, so i used that
End port: default is 80, so i used that
Translation Start Port: default is 80, so i used that
Translation End Port: default is 80, so i used that
Protocol: make sure this is **TCP**
My settings:
For this we will be using noip.com which is a pretty simple and basic site to use.
Again, please know that they only offer 30 days of free Dynamic DNS.
What this does is link your public ip address from your router to the site link we'll be creating.
-
Choose your site name : mine will be bogdantudorache
-
Choose your extension, from the free ones
-
Sign up with your email address
Once that is done wait a couple of minutes for the change to take effect and check your site.
Mine is working as expected!🧨
You can also check your online account and create up to 3 different addresses.
This is a simple way to test out your front-end and back-end coding skills and see an instant result but long term i highly recommend that you buy your own domain, buy a security certificate and strengthen your router security settings - all 3 are mandatory!!
For now, feel free to play around and have fun coding!
**Congrats, you're done!**
We have learned about the making our web server public by ip forwarding and owning a domain.
We have to also keep in mind about the cyber security and see this as a learning exercise more than a practical implementation that will be accessed by a high number of people.
If you hit a problem or have feedback (which is highly welcomed) please feel free to get in touch, more details in the footer.