public IPs on all my CTs

coryjsanders

New Member
Jun 28, 2013
7
0
1
Is it possible to use public IPs on CTs without port forwarding? With VMs it is very straight forward. My CT machines cannot go through any kind of NAT.

Thanks.
 
Thanks for the reply. I loaded ProxMox from a CD onto bare metal. I am running my public IP on eth0, so it looks like this:
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address my.pub.lic.ip
netmask 255.255.255.248
gateway my.pub.lic.gateway
bridge_ports eth0
bridge_stp off
bridge_fd 0

When I create a CT in Bridged mode from a Debian Wheezy Template and put the next public IP into the Network tab it creates /interfaces and says not to edit.

I've tried multiple combinations in this file and cannot make it ping outside. It's so easy with VMs. As I mentioned, my machines cannot NAT.

Can you give me some direction? I've read everything I can on Google, and nothing seems to work.

Thanks.
 
...

When I create a CT in Bridged mode from a Debian Wheezy Template and put the next public IP into the Network tab it creates /interfaces and says not to edit.
...

Hi,
what do you mean with "says not to edit"? Perhaps you have installed an network-manager or so on?
I have inside the CTs configured an normal /etc/network/interfaces with an static IP and the CT-config looks like this:
Code:
# grep NETIF /etc/pve/openvz/100.conf 
NETIF="ifname=eth0,mac=CA:7D:8A:13:29:D9,host_ifname=veth100.0,host_mac=DE:7E:14:10:63:1C,bridge=vmbr0"

# vzctl exec 100 cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.100.15
        netmask 255.255.255.0
        gateway 192.168.100.1
Perhaps your ISP don't allow multible MAC-Adresses? (But this should then also be an problem with KVM-VMs).

You can try to find the issue with tcpdump (while you ping from the CT outside and vice versa)
Code:
# tcpdump -i vmbr0 host IP.of.CT.x
Udo
 
Thaks, Udo.

When I create a CT and use the Debian Wheezy template available and then add a Public IP on the Network Tab of the GUI, and then start the machine and console into it, I am able to ping the host Public IP, but not ping out to google or anywhere else. I am able to ssh into the CT from the host, but not the outside. Here is the contents of my CT's /interfaces:

# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

# 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 <public IP I set on Network Tab in GUI>
netmask 255.255.255.255


#######end /interfaces of CT ############

from the host:

# grep NETIF /etc/pve/openvz/104.conf
NETIF="ifname=eth0,mac=A2:2B:B8:3A:E1:D0,host_ifname=veth104.0,host_mac=0E:4F:26:66:07:C3,bridge=vmbr0"


for the CTs to work for me they have to be public IPs and not NATed. The directions I see say simply edit /interfaces like you would any hardware node, but it is not working. VMs work perfectly. Thanks.
 

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!