关于VPS的网关
IP failover: 163.172.115.116
Dedicated server IP: 195.154.226.60
Gateway’s IP is your server’s main IP ending in .254
So the gateway’s IP is: 195.154.226.254
For Ubuntu & Debian:
File: /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 163.172.115.116
netmask 255.255.255.255
broadcast 163.172.115.116
#—-BEGIN PVE—–
post-up ip route add 195.154.226.254 dev eth0
post-up ip route add default via 195.154.226.254 dev eth0
pre-down ip route del default via 195.154.226.254 dev eth0
pre-down ip route del 195.154.226.254 dev eth0
# —END PVE—
File: /etc/resolvconf/resolv.conf.d/base
nameserver 213.186.33.99
nameserver 8.8.8.8
nameserver 8.8.4.4
For CentOS6
File: /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=163.172.115.116
NETMASK=255.255.255.255
GATEWAY=195.154.226.254
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6ADDR=auto
File: /etc/sysconfig/network-scripts/route-eth0
# --- BEGIN PVE ---
195.154.226.254 dev eth0
default via 195.154.226.254 dev eth0
# --- END PVE ---
File: /etc/resolvconf/resolv.conf.d/base
nameserver 213.186.33.99
nameserver 8.8.8.8
nameserver 8.8.4.4
For FreeBSD 8 & FreeBSD 9
File: /etc/rc.conf
ifconfig_em0="inet 163.172.115.116 netmask 255.255.255.255 broadcast 163.172.115.116"
static_routes="net1 net2"
route_net1="-net 163.172.115.254/32 163.172.115.116"
route_net2="default 195.154.226.254"
File: /etc/resolv.conf
nameserver 213.186.33.99
nameserver 8.8.8.8
nameserver 8.8.4.4
For FreeBSD 10
File: /etc/rc.conf
ifconfig_em0="inet 163.172.115.116 netmask 255.255.255.255 broadcast 163.172.115.116"
static_routes="ovh"
route_ovh="-net 195.154.226.254/32 163.172.115.116"
defaultrouter="195.154.226.254"
File: /etc/resolv.conf
nameserver 213.186.33.99
nameserver 8.8.8.8
nameserver 8.8.4.4
For FreeBSD 11
File: /etc/rc.conf
ifconfig_em0="inet 163.172.115.116 netmask 255.255.255.255 broadcast 163.172.115.116"
static_routes="ovh"
route_ovh="-net 195.154.226.254 -iface em0"
defaultrouter="195.154.226.254"
File: /etc/resolv.conf
nameserver 213.186.33.99
nameserver 8.8.8.8
nameserver 8.8.4.4
For Windows 7
如果你使用的是Online的服务器,由于Online网关不同于OVH,你只需要将上述所有应用于OVH的网关195.154.226.254更改为Online的网关195.154.226.1即可,其余所有配置同上。