A network configuration generator and validator for multi-vendor network devices.
- Multi-vendor support: Generate configurations for Cisco IOS/IOS-XE, NX-OS, Arista EOS, Juniper Junos, SONiC, and Fortinet FortiGate
- Configuration validation: Catch errors and get best-practice recommendations before deployment
- Import & analyze: Parse existing configurations and identify issues
- Configuration diff: Compare two configurations side-by-side
- Secure vault: Encrypted storage for credentials and sensitive variables
- Modern GUI: Clean, dark-themed interface with PySide6
# Clone the repository
git clone <repo-url>
cd netconfigpro
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Run the application
python main.py-
Generate Configuration
- Select your target vendor (Cisco IOS, NX-OS, Arista EOS, Juniper, SONiC, Fortinet)
- Fill in hostname, interfaces, VLANs, routing configuration
- Click "Generate" or press
Ctrl+G - Review validation results and export
-
Import Configuration
- Paste an existing configuration or open a file
- Click "Parse Configuration"
- Review parsed elements and validation issues
-
Compare Configurations
- Use the Diff tab to compare two configurations
- See additions, deletions, and changes highlighted
-
Secure Vault
- Create a vault with a master password
- Store credentials and template variables securely
- All data is encrypted at rest
| Element | Cisco IOS | NX-OS | Arista EOS | Juniper | SONiC | FortiGate |
|---|---|---|---|---|---|---|
| Interfaces | Yes | Yes | Yes | Yes | Yes | Yes |
| VLANs | Yes | Yes | Yes | Yes | Yes | Yes |
| ACLs/Firewall | Yes | Yes | Yes | Yes | Yes | Yes |
| Static Routes | Yes | Yes | Yes | Yes | Yes | Yes |
| OSPF | Yes | Yes | Yes | Yes | Yes | Yes |
| BGP | Yes | Yes | Yes | Yes | Yes | Yes |
| Route Maps | Yes | Yes | Yes | Yes | - | Yes |
| Prefix Lists | Yes | Yes | Yes | Yes | - | Yes |
SONiC configurations are generated in config_db.json format with support for:
- DEVICE_METADATA: Hostname, BGP ASN, device type
- PORT: Interface configuration with MTU (default 9100)
- INTERFACE / LOOPBACK_INTERFACE: L3 addressing
- VLAN / VLAN_MEMBER / VLAN_INTERFACE: VLAN configuration
- OSPF_ROUTER / OSPF_ROUTER_AREA / OSPF_INTERFACE: OSPF routing
- BGP_NEIGHBOR: BGP peering with
rmt_asnfield format - STATIC_ROUTE: Static routing
- ACL_TABLE / ACL_RULE: L3 ACLs
- NTP_SERVER / DNS_NAMESERVER: Management services
Interface naming is automatically converted:
GigabitEthernet0/0→Ethernet0Ethernet0/1→Ethernet1(slot/port to flat numbering)Loopback0→Loopback0
FortiGate configurations are generated in FortiOS CLI format with support for:
- config system global: Hostname, FQDN
- config system interface: Interface configuration with IP, status, MTU
- config system dns / ntp: Management services
- config router static: Static routing
- config router ospf: OSPF with areas, interfaces, passive interfaces
- config router bgp: BGP neighbors, networks, redistribution
- config router prefix-list / route-map: Policy configuration
- config firewall address / policy: ACL to firewall policy conversion
Interface naming is automatically converted:
GigabitEthernet0/0→port1Ethernet1→port2(1-indexed)Loopback0→loopback0
netconfigpro/
├── main.py # Application entry point
├── requirements.txt # Python dependencies
├── src/
│ ├── core/
│ │ ├── models.py # Data models
│ │ ├── generators/ # Config generation
│ │ │ └── config_generator.py
│ │ ├── validators/ # Validation rules
│ │ ├── parsers/ # Config parsing
│ │ │ └── config_parser.py
│ │ └── templates/
│ │ └── vendors/ # Jinja2 templates
│ │ ├── cisco_ios.j2
│ │ ├── cisco_nxos.j2
│ │ ├── arista_eos.j2
│ │ ├── juniper_junos.j2
│ │ ├── sonic.j2
│ │ └── fortinet_fortigate.j2
│ ├── security/ # Encryption, vault
│ └── gui/ # PySide6 GUI
├── tests/
│ └── unit/
│ ├── test_generator.py
│ ├── test_parser.py
│ ├── test_sonic.py
│ ├── test_all_templates.py
│ └── ...
└── docs/ # Documentation
# Run all tests
python -m pytest tests/ -v
# Run SONiC-specific tests
python -m pytest tests/unit/test_sonic.py -v
# Run all template tests
python -m pytest tests/unit/test_all_templates.py -v
# Run with coverage
python -m pytest tests/ --cov=src| Shortcut | Action |
|---|---|
| Ctrl+1-5 | Switch tabs |
| Ctrl+G | Generate configuration |
| Ctrl+S | Save project |
| Ctrl+O | Open project |
| Ctrl+E | Export configuration |
| Ctrl+L | Clear form |
| Ctrl+I | Add interface |
| Ctrl+Shift+C | Copy output |
- All sensitive data is encrypted using AES-256 (Fernet)
- PBKDF2 with 480,000 iterations for key derivation
- Vault files use restrictive permissions (600)
- No plaintext secrets stored on disk
- Python 3.10+
- PySide6
- Jinja2
- cryptography
MIT License