mirror of https://github.com/tteck/Proxmox.git
Enable firewall in default LXC network configuration
This commit is contained in:
parent
b12a98e5a3
commit
cc3c343ca8
|
@ -85,7 +85,7 @@ PCT_OPTIONS="
|
|||
-cores 2
|
||||
-memory 2048
|
||||
-password $PASS
|
||||
-net0 name=eth0,bridge=vmbr0,ip=dhcp
|
||||
-net0 name=eth0,bridge=vmbr0,firewall=1,ip=dhcp
|
||||
-unprivileged 1
|
||||
"
|
||||
DEFAULT_PCT_OPTIONS=(
|
||||
|
|
|
@ -417,6 +417,13 @@ advanced_settings() {
|
|||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Enable firewall" --yesno "Enable firewall?" 10 58); then
|
||||
FW=1
|
||||
else
|
||||
FW=0
|
||||
fi
|
||||
echo -e "${DGN}Enable Firewall: ${BGN}$FW${CL}"
|
||||
|
||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
||||
if [ -z $VLAN1 ]; then
|
||||
|
@ -543,7 +550,7 @@ build_container() {
|
|||
-tags proxmox-helper-scripts
|
||||
$SD
|
||||
$NS
|
||||
-net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU
|
||||
-net0 name=eth0,bridge=$BRG$MAC,firewall=$FW,ip=$NET$GATE$VLAN$MTU
|
||||
-onboot 1
|
||||
-cores $CORE_COUNT
|
||||
-memory $RAM_SIZE
|
||||
|
|
|
@ -106,7 +106,7 @@ PCT_OPTIONS="
|
|||
-cores 2
|
||||
-memory 2048
|
||||
-password $PASS
|
||||
-net0 name=eth0,bridge=vmbr0,ip=dhcp
|
||||
-net0 name=eth0,bridge=vmbr0,firewall=1,ip=dhcp
|
||||
-unprivileged 1
|
||||
"
|
||||
DEFAULT_PCT_OPTIONS=(
|
||||
|
|
Loading…
Reference in New Issue