Network configuration toolkit for Cortex Linux. Natural language wrapper for Netplan/NetworkManager, firewall management, VPN setup, and DNS configuration.
pip install cortex-networkOr install from source:
git clone https://github.com/cortexlinux/cortex-network.git
cd cortex-network
pip install -e .# Full network status
cortex-network status
# List interfaces
cortex-network interfaces
# Connectivity diagnostics
cortex-network check# Scan and list networks
cortex-network wifi list
# Connect to network
cortex-network wifi connect "MyNetwork" -p "password"
# Disconnect
cortex-network wifi disconnect
# Forget saved network
cortex-network wifi forget "MyNetwork"
# Show saved networks
cortex-network wifi saved
# Current connection status
cortex-network wifi status# Show status and rules
cortex-network firewall status
# Enable firewall (default deny incoming)
cortex-network firewall enable
# Disable firewall
cortex-network firewall disable
# Allow port/service
cortex-network firewall allow 22
cortex-network firewall allow ssh
cortex-network firewall allow 443 -p tcp
cortex-network firewall allow 80 --from 192.168.1.0/24
# Block port
cortex-network firewall deny 3306
# Delete rule
cortex-network firewall delete 3
# Reset to defaults
cortex-network firewall reset# Show VPN status
cortex-network vpn status
# Add WireGuard config from file
cortex-network vpn add myvpn /path/to/wg.conf
# Add OpenVPN config
cortex-network vpn add work /path/to/client.ovpn --type openvpn
# Create new WireGuard config
cortex-network vpn create myvpn \
--address 10.0.0.2/24 \
--peer-key "PEER_PUBLIC_KEY" \
--endpoint "vpn.example.com:51820"
# Connect/disconnect
cortex-network vpn connect myvpn
cortex-network vpn disconnect myvpn
# Remove config
cortex-network vpn remove myvpn# Show DNS status
cortex-network dns status
# Set DNS by provider
cortex-network dns set cloudflare
cortex-network dns set google
cortex-network dns set quad9
# Set custom DNS
cortex-network dns set 1.1.1.1 1.0.0.1
# List providers
cortex-network dns providers
# Reset to DHCP
cortex-network dns reset
# Flush cache
cortex-network dns flush
# Test resolution
cortex-network dns test google.com- NetworkManager (nmcli)
- systemd-networkd
- netplan
- wpa_supplicant
- iwd
- ufw (Uncomplicated Firewall)
- nftables
- firewalld
- iptables (legacy)
- WireGuard
- OpenVPN
- systemd-resolved
- NetworkManager
- Direct /etc/resolv.conf
- Python 3.11+
- Linux with systemd
- Root privileges for configuration changes
MIT