Quick Start
Get up and running with OPNsense Config Faker in under 5 minutes.
Your First Generation
Generate your first OPNsense configuration:
# Generate 10 VLAN configurations
cargo run --release -- generate vlan --count 10 --output my-vlans.xml
This creates a valid OPNsense XML file with 10 realistic VLAN configurations.
Basic Commands
Generate VLANs
# Simple VLAN generation
cargo run --release -- generate vlan --count 25 --output vlans.xml
# With custom base VLAN ID
cargo run --release -- generate vlan --count 50 --base-id 100 --output vlans.xml
Generate Complete Configurations
# Generate VLANs with firewall rules
cargo run --release -- generate --count 10 --format xml --include-firewall-rules --output config.xml
# Generate with specific complexity
cargo run --release -- generate --count 5 --firewall-rule-complexity advanced --output advanced-config.xml
Output Formats
# CSV format for data processing
cargo run --release -- generate vlan --count 20 --format csv --output data.csv
# JSON format for API integration
cargo run --release -- generate vlan --count 15 --format json --output data.json
Understanding the Output
XML Output Structure
The generated XML follows OPNsense configuration schema:
<opnsense>
<vlans>
<vlan>
<vlanif>vlan100</vlanif>
<tag>100</tag>
<descr>IT Department VLAN</descr>
<if>em0</if>
</vlan>
</vlans>
</opnsense>
CSV Output Structure
CSV output includes columns for easy data processing:
vlan_id,name,description,interface,network
100,IT_Department,IT Department VLAN,em0,192.168.100.0/24
101,Engineering,Engineering VLAN,em0,192.168.101.0/24
Common Use Cases
Testing Environment Setup
# Generate test data for a lab environment
cargo run --release -- generate --count 20 --format xml --output lab-config.xml
Security Tool Testing
# Generate complex configurations for security testing
cargo run --release -- generate --count 50 --firewall-rule-complexity advanced --output security-test.xml
Documentation Examples
# Generate sample configurations for documentation
cargo run --release -- generate vlan --count 5 --output examples.xml
Next Steps
- Explore Basic Usage for more detailed examples
- Check out Configuration Generation for advanced features
- Review Examples for real-world scenarios
Getting Help
If you encounter any issues:
- Check the command help:
cargo run --release -- --help - Review the Troubleshooting Guide
- Look at the Examples for similar use cases