SOLVED: No Internet Connection after Reboot

DISCLAIMERS: I know nothing about computers. Use any code at your own risk.

Problem: After setting up IPFire, I had no internet. I pulled the plug on my ONT and waited 15 minutes assuming it was a stale DHCP. After plugging in the ONT, the IPFire was online. Success? Nope! After every reboot, I would have to unplug the WAN cable and plug it back in. I tried everything I could in the Web GUI because I was scared of the CLI. Eventually, I had no other choice. After two days of ChatGPT and I, we have a solution boys!

Solution: Follow the instructions below to create an automated script that resets the WAN port during bootup to ensure internet is reconnected! Hope this helps someone!

IPFire WAN Auto-Recovery Setup Guide

Purpose

This guide explains how to configure automatic WAN (RED interface) recovery on an IPFire firewall when internet does not return after reboot unless the WAN interface is manually reset.

Problem Summary

After reboot, RED (red0) shows an IP address and gateway, but internet traffic does not work until the WAN cable is unplugged/replugged or the interface is manually bounced. This indicates a stale WAN interface state after boot, not an ISP or ONT failure.

Final Working Solution

The successful fix was NOT the original rc.local-only method. The final working solution used an init startup script and a boot-time symbolic link so the RED interface automatically resets during every startup.

Step 1 — Create the Startup Script

Command:

nano /etc/init.d/red-fix

Paste ONLY this into the file:

#!/bin/sh

case “$1” in
start)
sleep 60
ip link set dev red0 down
sleep 5
ip link set dev red0 up
;;
stop)
;;
restart)
$0 stop
$0 start
;;
esac

Step 2 — Save and Exit

In nano: CTRL + O, press ENTER, then CTRL + X

Step 3 — Make the Script Executable

Command:

chmod +x /etc/init.d/red-fix

Step 4 — Test the Script Manually

Command:

/etc/init.d/red-fix start

Expected result: RED interface resets, internet returns automatically, and no WAN cable unplug is needed.

Step 5 — Create the Boot-Time Startup Link (THE DEFINING STEP)

This was the key command that made the automatic fix work.

Command:

ln -s /etc/init.d/red-fix /etc/rc.d/rc3.d/S99red-fix

This creates the boot-time symbolic link that tells IPFire to automatically run the red-fix script during startup.

Step 6 — Verify the Link Exists

Command:

ls -l /etc/rc.d/rc3.d/

You should see something like:

S99red-fix → /etc/init.d/red-fix

Step 7 — Final Reboot Test

Command:

reboot

After reboot, wait 2–3 minutes and confirm internet works automatically with no manual intervention.

How the Fix Works

1. System boots
2. Startup link calls red-fix
3. Script waits 60 seconds
4. RED interface goes down
5. RED interface comes back up
6. WAN renegotiates cleanly
7. Internet works automatically

Adjusting the Sleep Time Later

If internet still comes up too early or too late, adjust the delay.

How to Change the Delay

Open the file:

nano /etc/init.d/red-fix

Find this line:

sleep 60

Change it as needed:

sleep 30 = faster startup
sleep 90 = slower but safer
sleep 120 = for very slow ONT startup

Save Changes

CTRL + O, ENTER, CTRL + X

Apply Changes

No rebuild is needed. The new delay will apply automatically on the next reboot.

Final Result

Reboot → automatic RED recovery → internet works with no cable pull and no manual fixes.