Proxmox disable IPv6 on a tap by default

This commit is contained in:
Alarig Le Lay 2019-01-21 19:14:00 +01:00
parent d6a735b585
commit 41132aa328

View file

@ -172,7 +172,7 @@ for ID_RANGE_V4 in ${ID_RANGES_V4}; do
${COMMAND} ${COMMAND}
# Updating ARP # Updating ARP
COMMAND="ip neigh change ${VM_IPV4} lladdr ${MAC} dev tap${VM_ID}i0" COMMAND="ip neigh add ${VM_IPV4} lladdr ${MAC} dev tap${VM_ID}i0"
echo "${COMMAND}" echo "${COMMAND}"
write_log INFO "${COMMAND}" write_log INFO "${COMMAND}"
${COMMAND} ${COMMAND}
@ -199,6 +199,9 @@ for ID_RANGE_V6 in ${ID_RANGES_V6}; do
VM_NH=$(ipv6calc --action prefixmac2ipv6 --in prefix+mac --out ipv6addr fe80:: ${MAC}) VM_NH=$(ipv6calc --action prefixmac2ipv6 --in prefix+mac --out ipv6addr fe80:: ${MAC})
fi fi
# Activation of IPv6 on the tap interface
sysctl net.ipv6.conf.tap${VM_ID}i0.disable_ipv6=1
# Ajout de la route associée # Ajout de la route associée
COMMAND="ip -6 route add ${VM_IPV6}/48 via ${VM_NH} dev tap${VM_ID}i0" COMMAND="ip -6 route add ${VM_IPV6}/48 via ${VM_NH} dev tap${VM_ID}i0"
echo "${COMMAND}" echo "${COMMAND}"
@ -206,7 +209,7 @@ for ID_RANGE_V6 in ${ID_RANGES_V6}; do
${COMMAND} ${COMMAND}
# Updating NDP # Updating NDP
COMMAND="ip neigh change ${VM_NH} lladdr ${MAC} dev tap${VM_ID}i0" COMMAND="ip neigh add ${VM_NH} lladdr ${MAC} dev tap${VM_ID}i0"
echo "${COMMAND}" echo "${COMMAND}"
write_log INFO "${COMMAND}" write_log INFO "${COMMAND}"
${COMMAND} ${COMMAND}