mirror of https://github.com/tteck/Proxmox.git
Make IP and NETMASK configurable
User can now customize IP and Netmask of the router
This commit is contained in:
parent
9189e12e48
commit
fbccafd76c
|
@ -204,6 +204,8 @@ function default_settings() {
|
||||||
MAC=$GEN_MAC
|
MAC=$GEN_MAC
|
||||||
LAN_MAC=$GEN_MAC_LAN
|
LAN_MAC=$GEN_MAC_LAN
|
||||||
LAN_BRG="vmbr0"
|
LAN_BRG="vmbr0"
|
||||||
|
LAN_IP_ADDR="192.168.1.1"
|
||||||
|
LAN_NETMASK="255.255.255.0"
|
||||||
LAN_VLAN=",tag=999"
|
LAN_VLAN=",tag=999"
|
||||||
MTU=""
|
MTU=""
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
|
@ -217,6 +219,8 @@ function default_settings() {
|
||||||
echo -e "${DGN}Using LAN MAC Address: ${BGN}${LAN_MAC}${CL}"
|
echo -e "${DGN}Using LAN MAC Address: ${BGN}${LAN_MAC}${CL}"
|
||||||
echo -e "${DGN}Using LAN Bridge: ${BGN}${LAN_BRG}${CL}"
|
echo -e "${DGN}Using LAN Bridge: ${BGN}${LAN_BRG}${CL}"
|
||||||
echo -e "${DGN}Using LAN VLAN: ${BGN}999${CL}"
|
echo -e "${DGN}Using LAN VLAN: ${BGN}999${CL}"
|
||||||
|
echo -e "${DGN}Using LAN IP Address: ${BGN}${LAN_IP_ADDR}${CL}"
|
||||||
|
echo -e "${DGN}Using LAN NETMASK: ${BGN}${LAN_NETMASK}${CL}"
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
echo -e "${BL}Creating a OpenWRT VM using the above default settings${CL}"
|
echo -e "${BL}Creating a OpenWRT VM using the above default settings${CL}"
|
||||||
|
@ -469,8 +473,8 @@ send_line_to_vm "uci delete network.lan"
|
||||||
send_line_to_vm "uci set network.lan=interface"
|
send_line_to_vm "uci set network.lan=interface"
|
||||||
send_line_to_vm "uci set network.lan.device=eth0"
|
send_line_to_vm "uci set network.lan.device=eth0"
|
||||||
send_line_to_vm "uci set network.lan.proto=static"
|
send_line_to_vm "uci set network.lan.proto=static"
|
||||||
send_line_to_vm "uci set network.lan.ipaddr=192.168.2.1"
|
send_line_to_vm "uci set network.lan.ipaddr=${LAN_IP_ADDR}"
|
||||||
send_line_to_vm "uci set network.lan.netmask=255.255.255.0"
|
send_line_to_vm "uci set network.lan.netmask=${LAN_NETMASK}"
|
||||||
send_line_to_vm "uci set firewall.@zone[1].input='ACCEPT'"
|
send_line_to_vm "uci set firewall.@zone[1].input='ACCEPT'"
|
||||||
send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'"
|
send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'"
|
||||||
send_line_to_vm "uci commit"
|
send_line_to_vm "uci commit"
|
||||||
|
|
Loading…
Reference in New Issue