cannot reach container from outside

raqdedicados

Well-Known Member
Nov 26, 2008
85
0
46
Hi there .. just installed the new proxmox 4.1 :) :)
have question. on our proxmox 3.X we do a vm backup then restore it on the new lxc node followin the restore steps. all ok.
we have internet inside the container but from outside we cannot reach it, the node that is running proxmox has a public ip, the container also in same lan but nothing... cannot ssh... apache etc... also we try making a new container coz we supose it was a restore error ..... and same issue...do i m missing something ? the firewall is off and on the old proxmox we can create containers in same way and is working... thanks
 
Note that the network configuration is not restored when converting from OpenVZ but has to be newly configured. Can be done by WEB GUI.
 
yes i know that but same result, firewall is also on allow ... don t know what could be wrong

If you post

Code:
cat /etc/network/interfaces
route -n

from both host and container we can say more.

Since you mentioned firewall also
Code:
iptables-save

Does it work with firewall completely disabled?
 
from host
auto vmbr0
iface vmbr0 inet static
address 190.183.237.4
netmask 255.255.255.192
gateway 190.183.237.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 190.183.237.1 0.0.0.0 UG 0 0 0 vmbr0
190.183.237.0 0.0.0.0 255.255.255.192 U 0 0 0 vmbr0

From Container /eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=190.183.237.40
NETMASK=255.255.255.192
GATEWAY=190.183.237.1

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0
190.183.237.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0
 
From Container /eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=190.183.237.40
NETMASK=255.255.255.192
GATEWAY=190.183.237.1

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0
190.183.237.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0


The container´s routing table is wrong.

Note that what is defined in config file is just a "default" and can be overwritten by changes directly inside of the container.

The entry

169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0

let me assume that inside the container "dhcp" is set, but no dhcp server exists on the network.

Solution: remove this inside of the container, it´s probably in /etc/network/interfaces (if you have an ubuntu/debian distro)
 
I notice that but on the container there is not a dhcp server running or a adaptar configuring for it , check this screen
 

Attachments

  • Screen Shot 2015-12-16 at 11.27.11 AM.png
    Screen Shot 2015-12-16 at 11.27.11 AM.png
    102.3 KB · Views: 11
  • Screen Shot 2015-12-16 at 11.37.59 AM.png
    Screen Shot 2015-12-16 at 11.37.59 AM.png
    89 KB · Views: 9
I notice that but on the container there is not a dhcp server running or a adaptar configuring for it , check this screen

The container seems to be in a dhcp client role.

As already mentioned: the container network settings in Proxmox GUI are just something like a default. What really counts is what we have inside of the container (like in any other, also physical, machine). If you have a debian/ubuntu container you will find the data (usually, but also this can be changed) in /etc/network/interfaces.

However, the result of all these network settings can be read by

Code:
ifconfig
route -n

and the IP net 169.254.0.0/16 is the typical value when a dhcp client did not get a lease.

What the reason is for this I cannot say; but in any case it has to be resolved inside the container.
 
I try to configure and reconfigure, this is eth0

eth0 Link encap:Ethernet HWaddr 0A:47:3F:1E:28:B0

inet addr:190.183.237.41 Bcast:0.0.0.0 Mask:255.255.255.240

inet6 addr: fe80::847:3fff:fe1e:28b0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:1271 errors:0 dropped:1 overruns:0 frame:0

TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:92311 (90.1 KiB) TX bytes:900 (900.0 b)


lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:65536 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 

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!