You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've successfully enhanced the network.sh script to add a second network interface with no port forwarding. The implementation allows for independent configuration of each interface while maintaining the functionality of the original script.
Key features of the implementation:
Added environment variables for the second interface with sensible defaults:
NETWORK2="N" (disabled by default)
VM_NET2_TAP="qemu2"
VM_NET2_IP="30.30.30.31"
And others that mirror the first interface's variables
Created parallel configuration functions for the second interface:
configureDHCP2(), configureDNS2(), configureNAT2(), configureUser2()
These functions mirror the functionality of the first interface but with no port forwarding
Added a configureSecondNetwork() function that follows the same logic as the first interface
Updated closeNetwork() to properly clean up resources for both interfaces
Modified the main script flow to configure both interfaces sequentially
The second interface can be enabled by setting NETWORK2="Y" and can be configured independently from the first interface. It uses a different subnet (30.30.30.x) and has no port forwarding as requested. This implementation provides flexibility while maintaining backward compatibility with existing configurations.
0 commit comments