Created
January 30, 2015 17:47
-
-
Save gnanet/02ed769c45ca722bf2a1 to your computer and use it in GitHub Desktop.
Snippet for Hetzner Root server with multiple IP address in the same subnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iface eth0 inet static | |
address $ETH0 | |
netmask 255.255.255.224 | |
# network $NW | |
broadcast $BC | |
post-up ip route add $GW/32 dev eth0 src $ETH0 table mainip | |
post-up ip route add default via $GW dev eth0 table mainip | |
post-up ip rule add from $ETH0 table mainip | |
# post-up ip route add default scope global nexthop via $GW dev eth0 | |
post-down ip rule del from $ETH0 table mainip | |
# dns-* options are implemented by the resolvconf package, if installed | |
dns-nameservers 213.133.98.98 213.133.99.99 213.133.100.100 8.8.8.8 | |
iface eth2 inet static | |
address $ETH2 | |
netmask 255.255.255.224 | |
# network $NW | |
broadcast $BC | |
post-up ip route add $GW/32 dev eth2 src $ETH2 table gstatic | |
post-up ip route add default via $GW dev eth2 table gstatic | |
post-up ip rule add from $ETH2 table gstatic | |
post-down ip rule del from $ETH2 table gstatic | |
# dns-nameservers 213.133.98.98 213.133.99.99 213.133.100.100 8.8.8.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment