Implantação de rota permanente

1

Estou tentando adicionar uma rota permanentemente ao meu VPS, no momento em que tenho que executar o comando manualmente toda vez que eu descubro que o servidor foi reinicializado. Eu li em algum lugar que eu tinha que adicionar algo para / etc / network / interfaces, mas não coincidiu com a minha configuração - eu tenho várias interfaces e o método não parece coincidir com o que eu vi no arquivo.

Meu comando que eu executo (como root) é:

ip route add 10.33.252.0/24 via 10.33.252.75

Meu arquivo / etc / network / interfaces parece:

# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
        up ifconfig venet0 up
        up ifconfig venet0 127.0.0.2
        up route add default dev venet0
        down route del default dev venet0
        down ifconfig venet0 down


iface venet0 inet6 manual
        up route -A inet6 add default dev venet0
        down route -A inet6 del default dev venet0

auto venet0:0
iface venet0:0 inet static
        address 198.91.90.242
        netmask 255.255.255.255

auto venet0:1
iface venet0:1 inet static
        address 69.175.32.40
        netmask 255.255.255.255

auto venet0:2
iface venet0:2 inet static
        address 69.175.32.41
        netmask 255.255.255.255

auto venet0:3
iface venet0:3 inet static
        address 69.175.32.42
        netmask 255.255.255.255

auto venet0:4
iface venet0:4 inet static
        address 69.175.32.43
        netmask 255.255.255.255

auto venet0:5
iface venet0:5 inet static
        address 69.175.32.138
        netmask 255.255.255.255

auto venet0:6
iface venet0:6 inet static
        address 173.236.6.220
        netmask 255.255.255.255

auto venet0:7
iface venet0:7 inet static
        address 198.91.90.243
        netmask 255.255.255.255

auto venet0:8
iface venet0:8 inet static
        address 10.33.252.75
        netmask 255.255.255.255

Qualquer ajuda seria muito apreciada:)

    
por Lewis Cawte 05.08.2013 / 18:44

0 respostas