For last two days I am trying to figure out why vm can not reach to internet. Server is dedicated in hetzner. On their page http://wiki.hetzner.de/index.php/Proxmox_VE/en they say;
KVM/Routed
And I want to use more then one ip on a VM so I prefered KVM/Route. And I did all written here. But vm can not reach to internet. http://wiki.hetzner.de/index.php/Proxmox_VE/en#Network_configuration_host_system_KVM.2FRouted
My main ip is 78.46.77.145
And additinal ip I got later
Usable IP addresses:
46.4.230.161 to 46.4.230.166
Ok here is host config - /etc/network/interfaces :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 78.46.77.145
netmask 255.255.255.255
gateway 78.46.77.129
pointopoint 78.46.77.129
broadcast 78.46.77.159
auto vmbr0
iface vmbr0 inet static
address 78.46.77.145
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
up ip route add 46.4.230.160/32 dev vmbr0
up ip route add 46.4.230.161/32 dev vmbr0
up ip route add 46.4.230.162/32 dev vmbr0
up ip route add 46.4.230.163/32 dev vmbr0
up ip route add 46.4.230.164/32 dev vmbr0
up ip route add 46.4.230.165/32 dev vmbr0
up ip route add 46.4.230.166/32 dev vmbr0
up ip route add 46.4.230.167/32 dev vmbr0
And this is centos 6.4 vm config - /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=5b772859-e283-4b41-8265-cl57bla4bBee
ONB00T=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=ca:5e:59:3e:lf:9c
POINTOPOINT=78.46.77.145
DNS1=213.133.98.98
DNS2=213.133.99.99
DNS3=213.133.100.100
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
USERCTL=no
IPADDR=46.4.230.161
NETMASK=255.255.255.255
GATEWAY=79.46.77.145
But vm can not reach to internet. Also when I ping 46.4.238.161 from outside, I am getting host is unreachable.
KVM/Routed
- Advantages: Almost any operating system can be installed. Several IP addresses may be used on one VM. The VM requires no modification.
- Disadvantages: IP configuration cannot be obtained via DHCP. Point-to-point setup is required for IP addresses from different networks.
And I want to use more then one ip on a VM so I prefered KVM/Route. And I did all written here. But vm can not reach to internet. http://wiki.hetzner.de/index.php/Proxmox_VE/en#Network_configuration_host_system_KVM.2FRouted
My main ip is 78.46.77.145
And additinal ip I got later
Subnet: | 46.4.230.160 /29 |
Mask: | 255.255.255.248 |
Broadcast: | 46.4.230.167 |
46.4.230.161 to 46.4.230.166
Ok here is host config - /etc/network/interfaces :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 78.46.77.145
netmask 255.255.255.255
gateway 78.46.77.129
pointopoint 78.46.77.129
broadcast 78.46.77.159
auto vmbr0
iface vmbr0 inet static
address 78.46.77.145
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
up ip route add 46.4.230.160/32 dev vmbr0
up ip route add 46.4.230.161/32 dev vmbr0
up ip route add 46.4.230.162/32 dev vmbr0
up ip route add 46.4.230.163/32 dev vmbr0
up ip route add 46.4.230.164/32 dev vmbr0
up ip route add 46.4.230.165/32 dev vmbr0
up ip route add 46.4.230.166/32 dev vmbr0
up ip route add 46.4.230.167/32 dev vmbr0
And this is centos 6.4 vm config - /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=5b772859-e283-4b41-8265-cl57bla4bBee
ONB00T=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=ca:5e:59:3e:lf:9c
POINTOPOINT=78.46.77.145
DNS1=213.133.98.98
DNS2=213.133.99.99
DNS3=213.133.100.100
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
USERCTL=no
IPADDR=46.4.230.161
NETMASK=255.255.255.255
GATEWAY=79.46.77.145
But vm can not reach to internet. Also when I ping 46.4.238.161 from outside, I am getting host is unreachable.