Skip to content

Abhijithsp/ip_reset_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ip_reset_scripts


πŸ“˜ Network Reset Tool (Windows, Linux, macOS)

A cross-platform set of scripts to reset network configuration, refresh IP, and clear DNS cache.

Supports:

  • πŸͺŸ Windows (.ps1, .bat)
  • 🐧 Linux (.sh)
  • 🍎 macOS (.sh)

πŸš€ Features

  • Flush DNS cache
  • Renew IP address
  • Reset network stack
  • Restart network services
  • Optional system restart prompt

πŸ“‚ Files Included

File OS Description
network-reset.ps1 Windows PowerShell script
network-reset.bat Windows Batch script
network-reset.sh Linux Bash script
network-reset-mac.sh macOS Bash script

πŸͺŸ Windows Usage

βœ… Option 1: PowerShell Script

Steps

  1. Right-click β†’ Run as Administrator
  2. Or run manually:
Set-ExecutionPolicy Bypass -Scope Process -Force
.\network-reset.ps1

βœ… Option 2: Batch Script

Steps

  1. Right-click β†’ Run as Administrator
  2. Or double-click (auto-elevates)

🐧 Linux Usage

πŸ“„ Script Reference

See:

Steps

chmod +x network-reset.sh
sudo ./network-reset.sh

🍎 macOS Usage

πŸ“„ Script Reference

See:

Steps

chmod +x network-reset-mac.sh
sudo ./network-reset-mac.sh

⚠️ Important Notes

  • You must run as Administrator / sudo
  • Internet will temporarily disconnect during execution
  • Restart is recommended after completion

πŸ› οΈ Troubleshooting Guide

❌ 1. Script Not Running (Permission Issues)

Windows

  • Error: Execution Policy Restriction
Set-ExecutionPolicy Bypass -Scope Process -Force

Linux/macOS

  • Error: Permission denied
chmod +x script.sh

❌ 2. No Internet After Running Script

Check:

βœ” IP Address

ip a        # Linux
ifconfig    # macOS
ipconfig    # Windows

If you see:

169.x.x.x

πŸ‘‰ DHCP failed

Fix:

  • Reconnect WiFi / Ethernet
  • Restart router
  • Run script again

❌ 3. DNS Not Working

Test:

ping google.com

If fails:

ping 8.8.8.8
  • If 8.8.8.8 works but google.com fails β†’ DNS issue

Fix:

Set DNS manually:

  • Google DNS β†’ 8.8.8.8, 8.8.4.4

❌ 4. Network Service Not Restarting (Linux)

Some distros don’t use NetworkManager

Try manually:

sudo systemctl restart networking

or

sudo service networking restart

❌ 5. Interface Not Found (Linux/macOS)

Check active interface:

ip route        # Linux
route get default  # macOS

Update script if needed:

  • eth0, wlan0, en0, etc.

❌ 6. Corporate / VPN Networks

  • VPN may override DNS
  • Firewall may block DHCP

πŸ‘‰ Try:

  • Disconnect VPN
  • Re-run script

❌ 7. Winsock Reset Requires Restart (Windows)

If issues persist: πŸ‘‰ Restart system manually


πŸ“Œ Best Practices

  • Run only when facing:

    • No internet
    • DNS issues
    • IP conflicts
  • Avoid frequent unnecessary resets



πŸ‘¨β€πŸ’» Author Notes

Designed for quick internal troubleshooting across environments with minimal setup.

This tool performs low-level network operations including resetting DNS cache, renewing IP configurations, and restarting network services.

By using this tool, you acknowledge and agree that:

  • Code Created with help of multiple AI
  • You are executing these scripts at your own risk.
  • The author or contributors are not responsible for any system issues, network disruptions, data loss, or unintended side effects.
  • This tool may temporarily disconnect your network or interfere with active connections (including VPNs).
  • Behavior may vary depending on your system configuration, OS version, network policies, or administrator restrictions.

It is strongly recommended to:

  • Save your work before running the tool
  • Close active network-dependent applications
  • Use only in troubleshooting scenarios

If you do not agree with these terms, do not use this tool.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors