Graphic Motion Video Art, Website, IT Network, Culture

Loading...

On this occasion, I’d like to explain how to build web hosting server as our own, at our home on our PC. This is Part II of Building Web Hosting Server but now we are using double or multiple router port forwarding technique using Mikrotik as the router of local network. The script automatic update dynamic public IP that most probably we have to the No-IP sub domain. The script will run automatically by system scheduler, and check our current public IP every time its changed the script will send the current IP to the noip.com server, and noip.com will know that the sub domain that we have should be updated to the current IP, and finally your sub domain still keep represent as your current public IP. So we don’t need “Dynamic Update Client” app of noip.com because this job will be handle by the script that will run on mikrotik, without burdening the web hosting server with the application.

Perhaps amongst of you will ask, why we need to use double router or multiple router ? so the reason is depending on your needs. Personally for me as you can see like the picture above ZTE Optical Router by ISP I have limited to manage everything to my network clients. Other than me as just the user of the ISP router that have limited to manage the router, Mikrotik is the programable router, I can manage my Bandwidth of my web hosting server amongst of other network clients as I see fit. I don’t want my web hosting server lack of bandwidth because of the internet purpose of other Pc clients on my local network.


1. The First Router Port Forwarding for TCP and UDP Protocol

In this case I am using ZTE Optical Router from ISP, I still have the access to the router as user login. I can setup port forwarding configuration of the public IP router ISP that is using port:80 to the Public IP wan interface my Mikrotik router that is using the some port:80. As you can see as the above schematic picture, dynamic public IP 36.85.254.229:80 will be forwarding to private public IP Mikrotik 192.168.1.2:80 that is using TCP and UDP protocol. 



Try to find port forwarding feature if your ISP is not using ZTE optical router, it should be any on many kind of the router. But if you have Mikrotik as the first router, you can add the rules on firewall NAT like this! Please change public interface name and public/wan IP that will be the second router!

/ip firewall nat
add action=dst-nat chain=dstnat in-interface=internet dst-port=80 protocol=tcp to-addresses=192.168.1.2 to-ports=80 comment="TCP port forwarding"
add action=dst-nat chain=dstnat in-interface=internet dst-port=80 protocol=udp to-addresses=192.168.1.2 to-ports=80 comment="UDP port forwarding"

It means the incoming connection that comes from public IP that is using port 80 will be forwarding to private public IP of the public/wan interface of the second router.

2. The Second Router Port Forwarding for TCP and UDP Protocol

Next we have plan to put our web hosting server as the PC client of local network of Mikrotik as the second router. We need to setup the second router port forwarding that will fowarding connection from public/wan IP on the second router Mikrotik that is using port 80 to the IP web hosting server as the client of local network second router mikrotik that is using port 8080. So we need add 2 rules on firewall NAT of the second router mikrotik like this!

/ip firewall nat
add chain=dstnat dst-address=192.168.1.2 action=dst-nat protocol=tcp to-addresses=192.168.2.254 to-ports=8080 comment="port forwarding router IP to the client"
add chain=dstnat dst-address=192.168.1.2 action=dst-nat protocol=udp to-addresses=192.168.2.254 to-ports=8080


At this time we have done to setup double router port forwarding on the two router. The condition now is if any incoming connection that comes from public IP on the first router that is using port 80 will be forwarding to the IP of web hosting server by double router port forwarding.

3. Adjustment Server Configuration on Local Network As Web Hosting Server

If you follow the previous article, its nothing different then what we have done to Build Web Hosting Server that used Single Router. Just make sure, the IP address of web hosting server should be set 192.168.2.254 as the static IP on the ethernet adapter configuration of LAN related to the second port forwarding. The windows firewall should not block wamp server as the web server application, and create the rules that allow TCP and UDP Port 8080. On Apache httpd.conf of wamp server

httpd.conf  : C:\wamp64\bin\apache\apache2.4.23\conf

Find the text with “Listen” and change

Listen 0.0.0.0:80 -> Listen 0.0.0.0:8080
Listen [::0]:80 -> Listen [::0]:8080

Find the text with “ServerName” and change

ServerName localhost:80 -> ServerName 192.168.2.254:80
Find the text with “onlineoffline” and change
Require local -> Require all granted

Optional:

DocumentRoot "${INSTALL_DIR}/www/agratitudesign"
<Directory "${INSTALL_DIR}/www/agratitudesign/">

phpmyadmin.conf  : “C:\wamp64\alias”

Require local -> Require all granted

4. Script for Automatic Update Dynamic Public IP to No-IP Domain on Mikrotik.

The second router Mikrotik as the programmable router that allow us to do the job like Dynamic Update Client to keep update your sub domain noip.com related to the dynamic Public IP ISP that would be changed at anytime. The System Script for Automatic Update Dynamic Public IP to No-IP will be join with system scheduler.

/system script
add name=no-ip_ddns_update policy=read,write,test source={
:local noipuser "agratitudesign"
:local noippass "Password"
:local noiphost "agratitudesign.sytes.net,agratitudesign.ddns.net"
:local inetinterface "internet"
:global previousIP
:if ([/interface get $inetinterface value-name=running]) do={
:log info "Fetching current IP"
/tool fetch url="https://www.trackip.net/ip" mode=http dst-path=mypublicip.txt
:local currentIP [/file get mypublicip.txt contents]
:log info "Fetched current IP as $currentIP"
:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={
:set currentIP [:pick $currentIP 0 $i]
}
}
:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP $currentIP is not equal to previous IP, update needed"
:set previousIP $currentIP
:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info "No-IP: Sending update for $host"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"
}
}  else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}
}


/system scheduler
add interval=5m name=no-ip_ddns_update on-event=no-ip_ddns_update policy=read,write,test comment="Update No-IP DDNS" disabled=no



Insert the script above to the new terminal winbox! the system script and scheduler should be set with policy=read,write,test. Change on the script that I have marked as red color, depending on your noip.com account and the public interface name on your mikrotik router as the second router. The system schedule will run every 5 menit as the interval that we set to execute the related system script. Then the system script will watch your current public IP, if it is changed from the previous public IP, the script will send the request to your noip.com account to update the related IP for sub domain that we have setup. But if the current public IP is not changed is nothing to send request to noip.com server.

Actually build web hosting server, its not such a big deal. It doesn’t matter, perhaps you need triple or multiple router port forwarding. We just only understand the principle Port forwarding techniques and how to make the firewall is not blocking the port forwarding process running on the server. That’s it… let’s see the video for more clearly, good job!



Share This Article :
Related Articles

63 comments :

  1. Online casinos offer rich players.
    GcluIt's the way to go online for online gambling games that can meet your needs, ready for you to play the next real fun online gambling. Online gambling has been broadcast by the famous gambling source of Cambodia. Bet at Poipet Casino Resort Have fun with your taste and exciting. Because of the type of gambling games, the new look is easy to understand. Challenge to deliver a superior gambling experience. Guaranteed the fun of the website that has long been available and is well accepted by gamblers who gamble. We are the leading online casino site in Thailand. Belief is open to all players. There is a dedicated team of experts. Discuss and ask questions. All about gambling games at any time. Take the chance to win the game online to make the user experience the exciting challenge games. Not only this, but also the money from the game. Every game is ready to make rich customers shortcut. The most popular online casino betting sites are waiting for users to take advantage of every moment. Royal1688

    ReplyDelete
  2. Wow, absolutely fantastic blog. I am very glad to have such useful information.

    ดูหนังออนไลน์

    ReplyDelete
  3. Excellent post.This will provide you information about web hosting server.I refer you web hosting like as
    contabo web hosting.

    ReplyDelete
  4. Thanks for the video guide! That was very helpful

    Web Hosting Services

    ReplyDelete
  5. I webtechnology offers the best Seo, Smo and web development service in Faridabad. For best results in Seo or branding join with us.

    Seo Service Faridabad | Web Development Service Faridabad.

    ReplyDelete
  6. Thanks for sharing nice information on . You are great!
    Web reference : Why Small Businesses Should Invest In Marketing Their Brand

    ReplyDelete
  7. I have been seeking information on this topic for the past few hours and found your post to be well written and has solid information. Thank you!
    ludo king

    ReplyDelete
  8. People can even buy this much hosting from here

    ReplyDelete
  9. if i have to add another ISP connection for incoming traffic on webserver, how i can active both isp for incoming on webserver via mikrotik

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. It is a very informative article... i was finding a web hosting for my projects like https://torrent-mac.com/010-editor-mac-free-download/ but could't found any... i will surely try this.. thanks dude !

    ReplyDelete
  12. We provide the Hot Bangalore Escorts, Independent Bangalore Escorts, VIP Bangalore Escorts, High Class Female escorts.
    playstar slots
    gold slots

    ReplyDelete
  13. Magnificent article, a debt of gratitude is in order for assembling this! This is clearly one extraordinary post. A debt of gratitude is in order for the important data and experiences you have so given here.Latest School News

    ReplyDelete
  14. Nice Blog, Thanks for sharing helpful information.

    WM
    City Of Dreams Casino

    ReplyDelete
  15. I have been meaning to post something like this on my blog and you have given me an idea. Cheers.
    webcare360

    ReplyDelete
  16. Many blogs like this cover subjects that just aren’t covered by magazines.
    offshoreservers.net

    ReplyDelete
  17. why we need to use double router or multiple router ?


    ALLBET
    Casino Deluxe

    ReplyDelete
  18. Mirillis Action Crack Software is one of the effective and useful tools in this field. Mirilis action software was developed for video recording while playing the game. The high quality of Mirilis action software is its first and prominent feature, although users can also take screenshots, it plays a more effective role in training depending on the users desire to record.

    Mirilis Action is the best video game recording software for computer games. You can store your videos in various formats and share them on social networks. The user interface of the software is easy and user friendly and you can save your videos in both SD and HD. Other features of the software include the ability to make screenshots of different parts of the screen. Now Mirillis Action's latest with full crack from website LicenseHD

    ReplyDelete
  19. Mirillis Action Crack Software is one of the effective and useful tools in this field. Mirilis action software was developed for video recording while playing the game. The high quality of Mirilis action software is its first and prominent feature, although users can also take screenshots, it plays a more effective role in training depending on the users desire to record.

    Mirilis Action is the best video game recording software for computer games. You can store your videos in various formats and share them on social networks. The user interface of the software is easy and user friendly and you can save your videos in both SD and HD. Other features of the software include the ability to make screenshots of different parts of the screen. Now Mirillis Action's latest with full crack from website LicenseHD

    https://licensehd.com/mirillis-action-crack-serial-key/

    ReplyDelete
  20. Orange Tree Samples create innovative sample libraries that enable musicians to easily achieve incredible realism. Each product is designed for real-time performance and sequencing, without tedious programming without using traditional sample libraries. We achieve this by combining state-of-the-art sampling techniques, proprietary physical modeling concepts, and innovative programming.

    https://getvstcrack.com/orange-tree-samples-evolution-strawberry-kontakt/

    ReplyDelete
  21. Our experienced escort girls are from various cities of India and foreign girls also available for your hungry needs. It’s all your choice to select the girl as per your desire and we make sure you will enjoy every moment with lots of fun and excitement.
    Nainital Escorts Service
    Call Girls in Nianital

    ReplyDelete
  22. Kolkata Independent Escort Prior I was in a demonstrating office and was working for them as a hot model yet I discovered escort administration as all the more interesting as it offers me fun and offers great advantages. I am pretty and too sizzling in appearance. My hot looks catch the consideration of men. I am known as a charmer in the city and a few men know me because of my magnificent assistance. I am running as a part of my character and excessively ludicrous. I love exotic fun and men are headed to me by virtue of my sex appeal.

    ReplyDelete
  23. Wow is the only word I can use to describe the service of this platform. www.npower.gov.ng login portal

    ReplyDelete
  24. These particular papers fabulous, and My spouse and I enjoy each of the perform that you have placed into this.
    I’m sure that you will be making a really useful place. I have been additionally pleased. Good perform!
    short bedtime stories
    gk quiz app
    bedtime english stories

    ReplyDelete
  25. This blog is an amazing blog, the contents here are always very educative and useful, the reason I make it my regular blog of visit so as to widen my knowledge every day, thanks for always sharing useful and interesting information, you can checkout this, it can be useful to you as well www.npower.gov.ng Teach Portal

    ReplyDelete
  26. https://infoguidenigeria.com/n-power-portal-login/

    ReplyDelete
  27. You're one of the best, I have found more joy in surfing through your article. It’s nice and great work, Keep it up to more updates. Check here, your best plug for naub post utme past questions and answers pdf

    ReplyDelete
  28. http://salonihyderabadescorts.in/call-girls-rates-in-hyderabad.html

    ReplyDelete
  29. http://salonihyderabadescorts.in/secunderabad-call-girls.html

    ReplyDelete
  30. http://salonihyderabadescorts.in/gachibowli-escorts.html

    ReplyDelete
  31. http://salonihyderabadescorts.in/uppal-call-girls.html

    ReplyDelete
  32. We are Delhi based SMO Company, We offer Social Media Optimization (SMO) Services in Delhi, India at reasonable price
    Buy Indoor Plants Online in India at best prices only at Birthright, India's leading online shop for agriculture supplies and garden tools.
    Financeatyourtip, provide updates about the best demat account for traders all over world. Its brokerage fee is extremely feasible and this assists traders and investors
    F95zone Latest Games & Updates. A visual overview of the latest new games and updates.

    ReplyDelete
  33. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


    windows vista product key
    NetFlix Account Checker
    Adobe XD Torrent
    smart pc fixer license key
    ez check printing software license key free
    InPage Download
    Download SPSS Full Crack
    Driver Booster 7.6 Key

    ReplyDelete
  34. I adore your site design and design.
    Summer is pleasant on the eyes, thus it helps me come here many times more comfortable.
    Have you ever hired a designer for your subject? Works outstanding!
    Avocode Key generator Download
    DFX Audio Enhancer Full Version with Serial Key Free Download
    DisplayFusion Pro Crack
    Color Efex Pro 5 Torrent

    ReplyDelete
  35. This is an excellent post that you have shared with us. Thank you for sharing this excellent post and I hope you will continue to do so in the future.
    Razer Cortex Game Booster
    Recuva Crack
    iMyFone Umate Crack
    king Soft Pc

    ReplyDelete
  36. Wow! This is the most useful information we've found on this subject so far. Excellent work. My expertise in this field makes me appreciative of your efforts.

    easyworship-crack
    norton-antivirus-crack
    wondershare-safeeraser-crack
    sony-acid-pro-crack
    idm-build-crack
    https://crackersofts.com/

    ReplyDelete
  37. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up. JKM Soft Solutions is Search eangine optimization Services california provider based out of USA & UK,
    after long times i found this type blog, its very useful content for me and other . IOS app development services california in the USA and UK, we comprehend that your iOS application should have USPs over the opposition.
    your post is awsome its very knowageful content i never read any blog like this your are a good wrighter and thankyou for this articel .Android App Development Company california & UK

    ReplyDelete
  38. Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here. Pune Indepededent Girls

    ReplyDelete
  39. Legal Translation, Also called Certified Translation, is carried out by Legal Translator who is accredited by Ministry of Justice UAE. Our ministry approved French Translation in dubai provides translation with legal, complex and technical content for various sectors such as translation for dubai courts, embassies, Dubai police, DNRD and much more. So, we know the challenges to provide French translation at your door step also we have the right combination of resources, technology and processes to translate high volume of French legal translation, meeting tight deadline and make sure that our output complies with international standards and regulations.

    ReplyDelete
  40. This comment has been removed by the author.

    ReplyDelete
  41. This comment has been removed by the author.

    ReplyDelete
  42. This comment has been removed by the author.

    ReplyDelete
  43. Creating a web hosting server using Mikrotik double router port forwarding and scripting automatic updates for dynamic IP is an intriguing setup! It sounds complex yet efficient. Can you share more details or steps on achieving this configuration?
    Custom Ecommerce Website Development Service

    ReplyDelete
  44. This comment has been removed by the author.

    ReplyDelete
  45. Setting up a robust web hosting server on MikroTik with double router port forwarding ensures enhanced security and reliability. With automatic updates for dynamic IP, stability is maintained. Additionally, our Web Design and Development Services India offer a seamless online presence, blending functionality and aesthetic appeal for a superior user experience. Visit here https://www.xportsoft.com/

    ReplyDelete
  46. Looking for reliable detective agencies in Delhi for matrimonial purposes? Look no further! Vrokx Detective Agency is here to help you with our top-notch Pre Matrimonial Investigation Services. We understand the importance of Background verification for marriage, and our team of experienced detectives is dedicated to providing accurate and comprehensive results. Make contact with the Detective Agency in Delhi.
    Pre Matrimonial Investigation.

    ReplyDelete
  47. whether you'd like to keep your face, skin and body clean, don't put off, visit soon female to male massage in hyderabad to maintain your body's health with the massage you want We only provide the best spa and best therapist

    ReplyDelete
  48. magical hands of female to male spa in bangalore make a wonder to your body by relaxing pain of stress make you cheer.

    ReplyDelete
  49. At our doorstep female to male body massage service, we pride ourselves on providing a premier experience for our clients in Chennai. Our team consists of highly trained and professional massage therapists who will bring their expertise and skill right to your doorstep. Whether you’re looking to relax, relieve stress, or alleviate muscle tension, our therapists have the knowledge and techniques to help you achieve your desired results.

    ReplyDelete
  50. you will feel yourself how satisfied you are once you take the service from our hot massage girl therapists, be sure before you come to our center because female to male massage in chennai therapists are certified and talented

    ReplyDelete
  51. b2b spa near me lowest price is a luxurious and intimate experience that offers various benefits, including relaxation and stress relief.

    ReplyDelete
  52. Just as yoga keeps your brain healthy as like as spa treatments keep your body healthy and your skin healthy, you can find this service only at best body to body spa in bangalore center

    ReplyDelete

Back to Top