Async network management tool with NetworkManager D-Bus compatibility.
-
iproute2: Network interface management
- Debian/Ubuntu:
sudo apt install iproute2(usually pre-installed)
- Debian/Ubuntu:
-
iw or wireless-tools: WiFi configuration
- Debian/Ubuntu:
sudo apt install iworsudo apt install wireless-tools
- Debian/Ubuntu:
-
wpasupplicant: WPA/WPA2 authentication
- Debian/Ubuntu:
sudo apt install wpasupplicant
- Debian/Ubuntu:
-
Unbound DNS Resolver: Validating, recursive DNS resolver
- GitHub: https://github.com/NLnetLabs/unbound
- Debian/Ubuntu:
sudo apt install unbound
-
Dora DHCP Server: Modern DHCP server written in Rust
- GitHub: https://github.com/greenpdx/CRdoraPub.git
- Debian/Ubuntu: Not available in standard repos, build from source
-
crdhcpc DHCP Client: Comprehensive DHCP client written in Rust
- Location:
../crdhpcd/(sibling directory) - Provides automatic DHCP on link up for WiFi and ethernet
- See DHCP Client Integration
- Location:
-
hostapd: For access point mode
- Debian/Ubuntu:
sudo apt install hostapd
- Debian/Ubuntu:
-
openvpn: For OpenVPN VPN support
- Debian/Ubuntu:
sudo apt install openvpn
- Debian/Ubuntu:
-
wireguard-tools: For WireGuard VPN support
- Debian/Ubuntu:
sudo apt install wireguard-tools
- Debian/Ubuntu:
- Async Architecture: Built on tokio for high performance
- Interface Management: Control network interfaces (up/down, IP configuration)
- WiFi Support: Scan networks, manage connections, regulatory domain, WPA/WPA2 via wpa_supplicant
- Access Point Mode: Create WiFi hotspots with hostapd
- DHCP Client: Automatic DHCP via crdhcpc when links come up
- DHCP Server: Configure dora DHCP server
- Link State Monitoring: Automatically start DHCP when ethernet/WiFi links come up
- DNS Management: Manage DNS configuration
- Routing Control: Manage routing tables
- NetworkManager Compatible: D-Bus interface for drop-in replacement
- Easy Rebranding: Simple configuration file for customization
# Run the installation script
sudo ./install.shThe install script will:
- Build the project with cargo
- Install binaries to /usr/bin
- Install systemd service files
- Create configuration directories
- Install man pages and documentation
- Install example configurations
- Set up runtime directories
To uninstall:
sudo ./uninstall.sh# Build the Debian package
dpkg-buildpackage -us -uc -b
# Install the package
sudo dpkg -i ../netctl_*.deb
sudo apt --fix-broken install # If needed for dependenciesSee debian/BUILD.md for detailed build instructions.
# Build the project
cargo build --release
# Install binaries
sudo cp target/release/netctl /usr/bin/
sudo cp target/release/nm-converter /usr/bin/
sudo cp target/release/nccli /usr/bin/
# Install example configuration files
sudo mkdir -p /usr/share/doc/netctl/examples
sudo cp config/examples/*.nctl /usr/share/doc/netctl/examples/
sudo cp config/examples/*.nmconnection /usr/share/doc/netctl/examples/
# Install systemd service files
sudo mkdir -p /lib/systemd/system
sudo cp systemd/*.service /lib/systemd/system/
sudo systemctl daemon-reload
# Install man pages
sudo mkdir -p /usr/share/man/man1 /usr/share/man/man5 /usr/share/man/man7
sudo cp docs/netctl.1 /usr/share/man/man1/
sudo cp docs/nm-converter.1 /usr/share/man/man1/
sudo cp docs/nccli.1 /usr/share/man/man1/
sudo cp docs/netctl.nctl.5 /usr/share/man/man5/
sudo cp docs/netctl-plugin.7 /usr/share/man/man7/
sudo mandb # Update man databasenetctl can manage connections through configuration files, automatically handling WiFi, DHCP, and static IP:
# List available connections
netctl connection list
# Activate a connection (connects WiFi + starts DHCP automatically)
netctl connection up home-wifi
# Show active connections
netctl connection active
# Deactivate connection
netctl connection down wlan0See Connection Management Guide for complete documentation.
Alternatively, control interfaces directly:
netctl device list
netctl interface listnetctl wifi scan wlan0
netctl wifi info wlan0
netctl wifi set-reg USnetctl ap start wlan0 --ssid "MyAP" --password "secret123" --channel 6
netctl ap stop
netctl ap statusnetctl dhcp start wlan0 --range-start 10.255.24.10 --range-end 10.255.24.250 --gateway 10.255.24.1 --dns 10.255.24.1netctl interface up wlan0
netctl interface down wlan0
netctl interface set-ip wlan0 192.168.1.100 --prefix 24Complete documentation is available via man pages:
man netctl- Command reference and usageman netctl.nctl- Configuration file format and examplesman nm-converter- NetworkManager configuration converterman netctl-plugin- Plugin development guide
Edit branding.toml to customize:
- Project name and display name
- Binary name
- D-Bus service names
- Paths and directories
- Feature flags
- CLI behavior
- User-facing messages
# Run unit tests
cargo test --lib
# Run integration tests
cargo test --test '*'
# Run all tests
cargo testA comprehensive standalone D-Bus test program is available to exercise the CR D-Bus interface in both mock and real modes:
# Run in mock mode (simulated D-Bus service with test data)
cargo run --example dbus_test -- --mode mock
# Run in real mode (connect to actual netctl daemon)
cargo run --example dbus_test -- --mode real
# Test specific interfaces
cargo run --example dbus_test -- --mode mock --test network-control
cargo run --example dbus_test -- --mode mock --test wifi
cargo run --example dbus_test -- --mode mock --test vpn
cargo run --example dbus_test -- --mode mock --test signalsThe test program provides:
- Mock Mode: Runs a simulated D-Bus service with pre-populated test data (no root required)
- Real Mode: Connects to an actual netctl daemon for integration testing
- Comprehensive Coverage: Tests all D-Bus methods and signals across NetworkControl, WiFi, and VPN interfaces
- Detailed Output: Shows all method calls, return values, and signal emissions
See docs/DBUS_TEST_GUIDE.md for complete documentation.
When built with the dbus-nm feature (default), netctl provides a NetworkManager-compatible D-Bus interface at:
- Service:
org.freedesktop.NetworkManager - Object:
/org/freedesktop/NetworkManager
This allows applications expecting NetworkManager to work with netctl.
MIT OR Apache-2.0