An open API service indexing awesome lists of open source software.

https://github.com/ohmydevops/ohmynet

Which interface has the internet? I'll choose that one! (Linux distors only)
https://github.com/ohmydevops/ohmynet

bash internet iran routing

Last synced: 4 months ago
JSON representation

Which interface has the internet? I'll choose that one! (Linux distors only)

Awesome Lists containing this project

README

          

# 🛠️ Ohmynet - Auto Internet Interface Switcher

**Ohmynet** is a Bash script that continuously monitors internet connectivity and automatically switches to a working network interface if the current one goes offline.

## 🔍 Features

- Checks for internet connectivity every 3 seconds
- Detects the default route interface
- Switches to an alternative connected interface if internet is lost
- Uses `nmcli` to bring connections up/down (safe with NetworkManager)
- Works with multiple interfaces: Ethernet, Wi-Fi, USB NICs, etc.

---

## 🚀 Usage

- Run script:

```bash
wget -qO- https://raw.githubusercontent.com/ohmydevops/ohmynet/main/ohmynet.sh | bash
```

- It should be:

![sample](./screenshot.png)