diff --git a/misc/all-templates.sh b/misc/all-templates.sh index ab430e7c..614b0eb1 100644 --- a/misc/all-templates.sh +++ b/misc/all-templates.sh @@ -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=( diff --git a/misc/build.func b/misc/build.func index f21ad361..464eb408 100644 --- a/misc/build.func +++ b/misc/build.func @@ -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 diff --git a/turnkey/turnkey.sh b/turnkey/turnkey.sh index 202143cf..1f13df7f 100644 --- a/turnkey/turnkey.sh +++ b/turnkey/turnkey.sh @@ -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=(