Each Mammoth VPS comes with access to the LAN via a private IP, which enables unmetered VPS-to-VPS data transfers. However the private IP is not setup by default.
This script will add your VPS' private IP to its network configuration so that the internal LAN can be used.
Deploy this script (requires existing VPS)
#!/bin/bash
privateip_debianlike() {
grep -q $VPS_PRIVATEIP /etc/network/interfaces && return
echo "Adding eth0:mammoth ($VPS_PRIVATEIP) to /etc/network/interfaces"
cat >> /etc/network/interfaces <<EOT
auto eth0:mammoth
iface eth0:mammoth inet static
address $VPS_PRIVATEIP
netmask 255.255.0.0
EOT
echo "Bringing up interface eth0:mammoth"
ifup eth0:mammoth
}
privateip_redhatlike() {
local networkfile=/etc/sysconfig/network-scripts/ifcfg-eth0\:mammoth
test -e $networkfile && return
echo "Adding eth0:mammoth ($VPS_PRIVATEIP) as $networkfile"
cat >> $networkfile <<EOT
DEVICE=eth0:mammoth
IPADDR=$VPS_PRIVATEIP
NETMASK=255.255.0.0
EOT
echo "Bringing up interface eth0:mammoth"
ifup eth0:mammoth
}
if test -z "$VPS_PRIVATEIP" ; then
echo VPS_PRIVATEIP is not set, giving up
fi
# Run appropriate function for our distribution
test -e /etc/network/interfaces && privateip_debianlike
test -e /etc/sysconfig/network-scripts && privateip_redhatlike