Answer the question
In order to leave comments, you need to log in
Internet access for container (proxmox 3.4 + openvz)?
Installed proxmox 3.4.
A container has been created that does not have internet access. The host machine is pinging.
Config /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# for Routing
auto vmbr1
iface vmbr1 inet manual
post-up /etc/pve/kvm-networking.sh
bridge_ports dummy0
bridge_stp off
bridge_fd 0
# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
address {IP_хоста}
netmask 255.255.255.0
network 193.70.9.0
broadcast 193.70.9.255
gateway 193.70.9.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
iface vmbr0 inet6 static
address 2001:41d0:1000:246b::
netmask 64
post-up /sbin/ip -f inet6 route add 2001:41d0:1000:24ff:ff:ff:ff:ff dev vmbr0
post-up /sbin/ip -f inet6 route add default via 2001:41d0:1000:24ff:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del default via 2001:41d0:1000:24ff:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del 2001:41d0:1000:24ff:ff:ff:ff:ff dev vmbr0
Answer the question
In order to leave comments, you need to log in
Yes, I changed the config a little, added iptables rules, and it started up.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address {IP_хоста}
netmask 255.255.255.0
network 193.70.9.0
broadcast 193.70.9.255
gateway 193.70.9.254
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
well, look if the guest has a default route ip route
and if the IP address is gray, then on the host you need to update the IP table rules for nata IP addresses
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question