CTs don't have internet access.

farbod

New Member
Apr 30, 2023
6
0
1
Hi there,
I installed a new Proxmox 7.4 node on my new Hetzner server with a main IP and two additional IP addresses and connected my node to my cluster.
I configured a new bridge network vmbr0 and added an IP to my new CT.
but i can't ping or run commands like apt update because of network access.
I am almost sure of my configuration and i executed ifreload -a after configuration.
Here is my host configuration:
Code:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp7s0
iface enp7s0 inet static
        address 65.109.99.230/26
        gateway 65.109.99.193
        up route add -net 65.109.99.192 netmask 255.255.255.192 gw 65.109.99.193 dev enp7s0
# route 65.109.99.192/26 via 65.109.99.193

iface enp7s0 inet6 static
        address 2a01:4f9:3080:24d9::2/64
        gateway fe80::1

auto vmbr0
iface vmbr0 inet static
        address 65.109.99.230/26
        bridge-ports none
        bridge-stp off
        bridge-fd 0


and this is vm-routes file in /etc/network/interfaces.d directory:
Code:
iface vmbr0 inet static
        up ip route add 65.109.99.213/32 dev vmbr0

and here is my CT /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
iface lo inet6 loopback


auto eth0
iface eth0 inet static
        address 65.109.99.213/32
# --- BEGIN PVE ---
        post-up ip route add 65.109.99.230 dev eth0
        post-up ip route add default via 65.109.99.230 dev eth0
        pre-down ip route del default via 65.109.99.230 dev eth0
        pre-down ip route del 65.109.99.230 dev eth0
# --- END PVE ---


My main IP address is:
ip address: 65.109.99.230
Gateway: 65.109.99.193
Netmask: 255.255.255.192
Broadcast: 65.109.99.255
and my two additional Ips are:
65.109.99.213 and 65.109.99.214
with same Gateway and Netmask
 
Last edited:
You made a mistake. You need to remove the IP from your main interface and then create a new bridge and use the information you found on the interface over the bridge.

And then use the same bridge for your VMs and keep adding your new IP and Mac.
 
Can you give me an example of the configuration?
Can i config it from Web-UI panel?
Thanks,
 
I will do it once I am near to my device. Just follow this

As soon your entered into UI, you will see only one interface with your primary IP. Just open a new tab and create a new bridge and mention the interface as Slave.

Now remove all the info from your primary interface and then paste to your new bridge. And then apply it. You are good to go.

After this you can use the new bridge to all your VMs and you can start using.

Do note that you need to order new IP if you need Public IP access and also you need to use new MAC address by generating from your Robot panel.
 
Last edited:
So i tried your solution and added a new bridge with my main IP and its gate way.
and deleted IP ad gateway from main interface.
Now my config file looks like this:
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp7s0
iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 65.109.99.230/26
        gateway 65.109.99.193
        bridge-ports enp7s0
        bridge-stp off
        bridge-fd 0

and my CT config:
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 65.109.99.213/32
# --- BEGIN PVE ---
        post-up ip route add 65.109.99.230 dev eth0
        post-up ip route add default via 65.109.99.230 dev eth0
        pre-down ip route del default via 65.109.99.230 dev eth0
        pre-down ip route del 65.109.99.230 dev eth0
# --- END PVE ---
 
Last edited:
Another weird thing is that my CT monitoring shows that it has internet traffic
but i cant access to internet from my CT
And also my CT can ping the host ip but can't ping other public IP addresses.
 

Attachments

  • Screenshot from 2023-05-01 23-36-02.png
    Screenshot from 2023-05-01 23-36-02.png
    20.5 KB · Views: 4
Last edited:

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!