Post

Modem Died Isp Came Through To Swap They Said My Internet Dont Work Because I Use 1010101 For My Gateway

Welcome to our latest post where we delve into the intricacies of self-hosted infrastructure and DevOps automation. Today, we tackle a common issue that many homelab enthusiasts might face -.

# Modem Died, ISP Came Through To Swap - My Internet Didn’t Work Because I Use 1010101 For My Gateway

Welcome to our latest post where we delve into the intricacies of self-hosted infrastructure and DevOps automation. Today, we tackle a common issue that many homelab enthusiasts might face - a seemingly inexplicable outage after modem replacement when using non-standard router configurations.

Prerequisites

  • Ubuntu Server 20.04 LTS (Focal Fossa) or higher with root access
  • Docker installed and running: apt install docker-ce=5.0.8 docker-compose
  • Basic understanding of network routing, DNS, and firewall configuration

Solution Steps

1. Revert Default Gateway

First, let’s revert your gateway setting to the ISP-provided IP:

1
sudo ip route change default via 101.101.101.101

2. Install Docker Compose

If you haven’t already, install Docker Compose to manage your containerized services:

1
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

3. Configure Your Services

Create a new directory for your services, e.g., ~/homelab, and navigate to it:

1
mkdir ~/homelab && cd ~/homelab

Next, create a Docker Compose file (e.g., docker-compose.yml) that defines your services:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
version: '3'
services:
  router:
    image: linuxserver/labs-router:latest
    container_name: homelab-router
    environment:
      TZ: America/Los_Angeles # Set your timezone
      ROUTER_IP: 192.168.0.1 # Your desired LAN IP for the router
      DNS_SERVERS: "8.8.8.8 8.8.4.4" # Preferred DNS servers
    ports:
      - "53:53/udp" # DNS port mapping
    volumes:
      - /etc/localtime:/etc/localtime # Ensure correct time
      - ./router-data:/config # Persist configuration changes

4. Launch Your Services

Now, you can launch your services with the following command:

1
docker-compose up -d

This command will start the container in detached mode (background), and it will automatically restart if it ever stops.

5. Test Your Setup

To ensure everything is working as expected, try running a DNS query:

1
dig @localhost example.com

If your ISP-provided modem has been updated with the correct public IP, you should see a response.

Troubleshooting

  • Ensure that your router container is up and running by checking its status: docker ps.
  • Verify network connectivity using tools like ping or traceroute.

Conclusion

By following these steps, you’ve successfully set up a self-hosted router in your homelab infrastructure and restored your internet connection post-modem swap. This approach offers numerous benefits such as custom routing rules, network segmentation, and integration with other open-source DevOps tools. Remember to always prioritize security by keeping your software updated and using strong passwords for all sensitive components.

Happy self-hosting! 🌐💪

This post is licensed under CC BY 4.0 by the author.