Configure CT network

blue

New Member
Sep 24, 2014
16
0
1
HI,
I try to configure an OpenVH container in Proxmox.
My container can ping my server but it can't acces internet. I'm not very good in network so if someone can explain me if my bridge is correctyle configured. :

Host configuration : /etc/network/interfaces

iface eth0 inet static
address my.host.IP.adress
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.255
gateway x.x.x.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 > & /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -1 POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE


On Proxmox CT network I choose routed mode (venet) : 10.10.10.2

Can anyone tell me what's wrong?
Thanks
 
Here my CT network interface

# 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 10.10.10.2
netmask 255.255.255.255
 
Since I can ping my host, It should be the route which is wrong ?
I think my host doesn't forward my packet ><

Might be the firewall?
 
forget to enable IP forwarding in /etc/sysctl.conf .....

But doesn't work ....
 
Last edited:
I am thinking you might need to bridge eth0 in the vmbr0 interface as follow:
bridge_ports eth0

Can you make a try?
 
After I have gone through the man page of Proxmox, I found that you are missing the "1" in the forwarding sentence:

post-up echo 1 > & /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -I POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!