Re: How to create permanent TAP interface?

Home Page Forums Network Management ZeroShell How to create permanent TAP interface? Re: How to create permanent TAP interface?

#50235

Larry Baker
Member

Here is how to do it:

In the SYSTEM > Setup page, select the Startup/Cron tab.

Select the Pre Boot script from the pull-down menu

Edit the Pre Boot script:

>>> SNIP — Pre Boot Script starts here — SNIP <<<
# Define the number of virtual Ethernet (TAP) interfaces to create
NUM_TAP_DEVICES=1

# Enumerate the virtual Ethernet interfaces (NAME=TAPnn)

typeset -i n=NUM_TAP_DEVICES-1
if [ $n “$TAPDIR/Description”
echo up > “$TAPDIR/STATUS”
fi

done

# Ignore the link status for TAP interfaces

[ -f /root/kerbynet.cgi/scripts/getlinkstatus.original ] ||
cp /root/kerbynet.cgi/scripts/getlinkstatus{,.original}
/root/kerbynet.cgi/scripts/getlinkstatus
sed ‘//usr/local/sbin/ethtool/i
[ “${INTERFACE:0:3}” != TAP ] && \

>>> SNIP — Pre Boot Script ends here — SNIP << Setup page, Network tab. I use them to bind the ZeroShell DNS and NTP services to a private (non-routable) subnet, separate from my physical
private subnet with a different IP address range.