fix: TUN device error

This commit is contained in:
Kroese 2024-12-03 11:50:02 +01:00 committed by GitHub
parent 8bff6ab80a
commit df8d6184eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,6 +169,7 @@ configureUser() {
configureNAT() { configureNAT() {
local tuntap="TUN device is missing. $ADD_ERR --device /dev/net/tun" local tuntap="TUN device is missing. $ADD_ERR --device /dev/net/tun"
local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"
# Create the necessary file structure for /dev/net/tun # Create the necessary file structure for /dev/net/tun
if [ ! -c /dev/net/tun ]; then if [ ! -c /dev/net/tun ]; then
@ -190,8 +191,6 @@ configureNAT() {
fi fi
fi fi
local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"
# Create a bridge with a static IP for the VM guest # Create a bridge with a static IP for the VM guest
{ ip link add dev dockerbridge type bridge ; rc=$?; } || : { ip link add dev dockerbridge type bridge ; rc=$?; } || :