A Bash script to launch Firefox with the DNS server provided by your Wi-Fi network, making it easy to access and pass through captive portals. Inspired by @FiloSottile/captive-browser, but designed for Firefox and Linux with no extra dependencies.
- Zero-install: just copy the script
- Auto-detects Wi-Fi DNS
- Uses a private, temporary Firefox profile
- Sandboxed with firejail
./captive-firefox.sh [OPTIONS]
Options:
-u, --url URL
URL to open (default: Firefox captive portal check)-i, --iface IFACE
Wi-Fi interface (default: auto)-h, --help
Show help
Example:
./captive-firefox.sh # this will work for most users
./captive-firefox.sh --iface wlan0 --url "http://example.com"
- Detects your Wi-Fi interface and DNS
- Launches Firefox in a sandbox with a temporary profile and the correct DNS
- Bash, firejail, nmcli, iw, Firefox
- No data is saved; all traffic uses the Wi-Fi DNS; session is sandboxed
MIT