Skip to content

Commit 5b481c3

Browse files
committed
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.
1 parent a31cb6c commit 5b481c3

File tree

2 files changed

+709
-1
lines changed

2 files changed

+709
-1
lines changed

src/docker/containers/wod/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
CPU_CORES: "4"
99
RAM_SIZE: "4G"
1010
DHCP: "Y" # required for DHCP
11-
TZ: "US/New_York"
11+
TZ: "US/New_York"
1212
device_cgroup_rules: # required for DHCP
1313
- 'c *:* rwm' # required for DHCP
1414
devices:

0 commit comments

Comments
 (0)