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 a few extra dependencies.
- Zero-install: just copy the script
- Auto-detects Wi-Fi DNS
- Uses a private, temporary Firefox profile
- Sandboxed with firejail
- Disables JIT and WebAssembly by default for a reduced attack surface on untrusted networks
./captive-firefox.sh [OPTIONS]Options:
-u, --url URLURL to open (default: Firefox captive portal check)-i, --iface IFACEWi-Fi interface (default: auto)--no-disable-jitDo not disable JIT and WebAssembly (they are disabled by default for security)-h, --helpShow 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, firefox, firejail, nmcli, iw
- No data is saved; all traffic uses the Wi-Fi DNS; session is sandboxed
- JIT compilation and WebAssembly are disabled by default to reduce the attack surface on untrusted networks; use
--no-disable-jitto opt out
MIT