Title: Self-Hosting Website via External Router: Comprehensive Guide
Introduction
This guide will walk you through the process of self-hosting a website using an external router when your Internet Service Provider (ISP) provides a modem with an integrated router of poor quality. We'll be using a Netgear router as an example, but the principles apply to other brands as well.
Prerequisites
- A static IP from your ISP
- A modem provided by your ISP (with an integrated router of poor quality)
- A Netgear router (or any other brand compatible with your ISP)
- A network cable to connect the modem and the router
Setting Up the Router
-
Connect the Modem and the Router
Connect the modem and the router using a network cable. Plug one end of the cable into the WAN/Internet port on the back of the router and the other end into the modem.
-
Power Up the Devices
Power up the modem and the router. Wait for both devices to finish booting.
-
Configure the Router
Access the router's web interface by typing its IP address (usually 192.168.1.1 or 192.168.0.1) into a web browser. Enter the default username and password (usually found in the router's manual) when prompted.
Navigate to the router's settings, typically found under "Advanced" or "Setup." Look for the "Internet" or "WAN" settings.
-
Configure the WAN Settings
Set the connection type to "Static IP." Enter the static IP address provided by your ISP, the subnet mask, default gateway, and DNS servers.
Save the changes and reboot the router.
Configuring the Modem
-
Disable DHCP Server
Access the modem's web interface. Look for the DHCP server settings and disable it. Save the changes and reboot the modem.
Setting Up the Website
-
Assign a Static IP to the Router
Log back into the router's web interface. Look for the "LAN" settings and assign a static IP to the router. This IP should be within the same subnet as the static IP provided by your ISP.
-
Forward Ports
Forward the necessary ports for your website (e.g., 80 for HTTP, 443 for HTTPS) to the static IP you assigned to the router.
-
Install a Web Server
Install a web server on the device running your website. Configure the web server to listen on the static IP you assigned to the router.
Security Considerations
- Change the default username and password for both the router and the modem.
- Enable a firewall on the router.
- Keep both the router and the modem's firmware up-to-date.
Troubleshooting
If you're having trouble connecting to your website, ensure that port forwarding is correctly configured on the router and that the firewall is not blocking incoming connections.
References
- Self-Hosting for Everyone: Build Your Own Web Server by Sams Teach Yourself
- "Configure a Static IP Address on a Netgear Router"
- "How to Disable DHCP on a Cable Modem"