working on host...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-27 16:13:38 +03:00
parent 3f0e00b821
commit c880780e48
4 changed files with 55 additions and 4 deletions

View File

@ -473,10 +473,11 @@ PCT_TEMPLATE_VARS=(
EMAIL EMAIL
DOMAIN DOMAIN
CTHOSTNAME CTHOSTNAME
HOST_ADMIN_IP
GATE_HOSTNAME GATE_HOSTNAME
NS_HOSTNAME
GATE_LAN_IP GATE_LAN_IP
GATE_ADMIN_IP GATE_ADMIN_IP
NS_HOSTNAME
NS_LAN_IP NS_LAN_IP
NS_ADMIN_IP NS_ADMIN_IP
WAN_IP WAN_IP
@ -532,8 +533,8 @@ expandTemplate(){
# #
# expandTemplate PATH [VAR ...] # expandPCTTemplate PATH [VAR ...]
# .. | expandTemplate [VAR ...] # .. | expandPCTTemplate [VAR ...]
# #
expandPCTTemplate(){ expandPCTTemplate(){
local input= local input=

View File

@ -85,6 +85,9 @@ DFL_PCT_EXTRA=SKIP
# can be left as-is. # can be left as-is.
# #
# host
HOST_ADMIN_IP=10.0.0.245/24
# Nameserver # Nameserver
NS_HOSTNAME=ns NS_HOSTNAME=ns
NS_ID=100 NS_ID=100

24
host/bridges.tpl Normal file
View File

@ -0,0 +1,24 @@
auto vmbr0
iface vmbr0 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
#LAN
auto vmbr1
iface vmbr2 inet manual
bridge-ports ${WAN_PORT}
bridge-stp off
bridge-fd 0
#WAN
auto vmbr2
iface vmbr3 inet static
address ${HOST_ADMIN_IP}
gateway ${GATE_ADMIN_IPn}
bridge-ports ${ADMIN_PORT}
bridge-stp off
bridge-fd 0
#ADMIN

View File

@ -10,11 +10,22 @@ PATH=$PATH:$(dirname "$(pwd)")
source ../.pct-helpers source ../.pct-helpers
#----------------------------------------------------------------------
need ifupdown2
#---------------------------------------------------------------------- #----------------------------------------------------------------------
readConfig readConfig
DFL_WAN_PORT=${DFL_WAN_PORT:-enp5s0}
DFL_ADMIN_PORT=${DFL_ADMIN_PORT:-enp2s0}
# XXX move this to root config...
DFL_HOST_ADMIN_IP=${PROXMOX_ADMIN_IP:-10.0.0.254/24}
SOFTWARE=( SOFTWARE=(
make make
w3m links w3m links
@ -38,7 +49,19 @@ fi
# Networking # Networking
if xreadYes "# Create bridges?" BRIDGES ; then if xreadYes "# Create bridges?" BRIDGES ; then
echo xread "WAN port: " WAN_PORT
xread "ADMIN port: " ADMIN_PORT
xread "Host ADMIN IP: " HOST_ADMIN_IP
xread "Gate ADMIN IP: " GATE_ADMIN_IP
INTERFACES="${cat bridges.tpl \
| expandPCTTemplate}"
# XXX add $INTERFACES to /etc/network/interfaces either before the
# source command or at the end...
# XXX
#@ ifupdown2 -a
fi fi
# Firewall # Firewall