Issues with Persistent Default Gateway Configuration on Debian VM in Proxmox

mgaspar

New Member
Jul 26, 2024
1
0
1
Hi everyone,

I'm experiencing an issue where Ping 8.8.8.8 is not working on my debian VM but google.com Is, and I'm hoping to get some help or insights from the community.

Setup Details:
- Proxmox Host IP: 192.168.1.100
- Debian VM IP: 192.168.1.80
- Correct Gateway: 192.168.1.1

Issue:
I noticed that I could successfully ping domain names (like `google.com`), but not IP addresses (like `8.8.8.8`). After checking my routing table with `ip route`, I found that the default route was missing, and the entry for my network was incorrect. The routing table output was as follows:

Code:
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 
172.18.0.0/16 dev br-d4bf51b70862 proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-7b19f913b7b9 proto kernel scope link src 172.19.0.1 
192.168.1.0/24 dev ens18 proto kernel scope link src 192.168.1.80

To temporarily fix the issue, I ran:
Code:
sudo ip route add default via 192.168.1.1 dev ens18
This allowed me to ping `8.8.8.8` successfully, but I know this change will not persist after a reboot.

What I've Tried:
1. Editing `/etc/network/interfaces`:
Code:
   auto lo
   iface lo inet loopback

   auto ens18
   iface ens18 inet static
       address 192.168.1.80
       netmask 255.255.255.0
       gateway 192.168.1.1
After restarting networking, the issue persisted.


Question:
Has anyone faced a similar issue with Proxmox and Debian VMs, and how did you resolve it to ensure the default gateway persists across reboots?

Thank you in advance for your help!
 
Odd that DNS works but IP not, it is usually the other way around, unless the DNS-ping goes through IPv6 instead of IPv4, did you check which one it did?
As for it not keeping your settings, something on your system is likely changing your settings on reboot, do you perhaps have a netplan set up? (check /etc/netplan/ )
 

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!