mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
added dhcp support
This commit is contained in:
parent
87f40367b5
commit
4a737723a3
@ -106,7 +106,12 @@ else
|
|||||||
VLAN=""
|
VLAN=""
|
||||||
fi
|
fi
|
||||||
# Reconfigure conatiner
|
# Reconfigure conatiner
|
||||||
pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME \-nameserver $LXC_DNS -searchdomain $LXC_DOMAIN -onboot 1 -timezone $LXC_TIMEZONE -features nesting=$LXC_NESTING -net0 name=eth0,bridge=$LXC_BRIDGE,firewall=1,gw=$LXC_GW,ip=$LXC_IP,type=veth$VLAN;
|
pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME -onboot 1 -timezone $LXC_TIMEZONE -features nesting=$LXC_NESTING;
|
||||||
|
if [ $LXC_DHCP == true ]; then
|
||||||
|
pct set $LXC_NBR -net0 name=eth0,bridge=$LXC_BRIDGE,ip=dhcp;
|
||||||
|
else
|
||||||
|
pct set $LXC_NBR -net0 name=eth0,bridge=$LXC_BRIDGE,firewall=1,gw=$LXC_GW,ip=$LXC_IP,type=veth$VLAN -nameserver $LXC_DNS -searchdomain $LXC_DOMAIN;
|
||||||
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
if [ $LXC_MP -gt 0 ]; then
|
if [ $LXC_MP -gt 0 ]; then
|
||||||
|
@ -39,6 +39,9 @@ LXC_HOSTNAME="zamba"
|
|||||||
# Defines the domain name / search domain of your LXC container
|
# Defines the domain name / search domain of your LXC container
|
||||||
LXC_DOMAIN="zmb.rocks"
|
LXC_DOMAIN="zmb.rocks"
|
||||||
|
|
||||||
|
# Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false]
|
||||||
|
LXC_DHCP=false
|
||||||
|
|
||||||
# Defines the local IP address and subnet of your LXC container in CIDR format
|
# Defines the local IP address and subnet of your LXC container in CIDR format
|
||||||
LXC_IP="192.168.100.200/24"
|
LXC_IP="192.168.100.200/24"
|
||||||
|
|
||||||
|
@ -57,6 +57,11 @@ Defines the domain name / search domain of your LXC container
|
|||||||
```bash
|
```bash
|
||||||
LXC_DOMAIN="zmb.rocks"
|
LXC_DOMAIN="zmb.rocks"
|
||||||
```
|
```
|
||||||
|
### LXC_DHCP
|
||||||
|
Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false]
|
||||||
|
```bash
|
||||||
|
LXC_DHCP=false
|
||||||
|
```
|
||||||
### LXC_IP
|
### LXC_IP
|
||||||
Defines the local IP address and subnet of your LXC container in CIDR format
|
Defines the local IP address and subnet of your LXC container in CIDR format
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user