Skip to content

Instantly share code, notes, and snippets.

@VirtuBox
Created October 15, 2017 14:15
Show Gist options
  • Save VirtuBox/531e015df4ffd687259d0792276d5063 to your computer and use it in GitHub Desktop.
Save VirtuBox/531e015df4ffd687259d0792276d5063 to your computer and use it in GitHub Desktop.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address YOUR.VPS.IP
netmask 255.255.255.255
broadcast YOUR.VPS.IP
post-up route add YOUR.HOST.IP.254 dev eth0
post-up route add default gw YOUR.HOST.IP.254
pre-down route del YOUR.HOST.IP.254 dev eth0
pre-down route del default gw YOUR.HOST.IP.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 213.186.33.99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment