Connect pve host machine to internet only...

{c}guy_123

Member
Sep 8, 2020
32
0
11
53
Hey gang,
I ran into an issue the other day where I upgraded some packages, and it caused my proxmox host to not boot correctly or launch any VM's. Since my router IS a VM on the server, this created a problem,as I couldn't downgrade without access to the proxmox repo.

I have a static IP from my isp and figured no problem I'll just reconfigure the /etc/network/interfaces file with my new settings, but no matter what I tried I couldn't get a direct internet connection to work! ( spent hours on this pounding my head). I'm pretty sure I had the interfaces config right, but feel like maybe I missed something in the routing table? I was unable to ping anything, even my own static ip.

Can someone tell me exactly what would be needed to get my physical nic ( ens3p0 ) conected to my fiber modem with a static ip, up and running via command line? and what route commands would be needed? or an example of what the routing table should look like?

Thanks in advance.

Here's what I had in my interfaces file:

auto lo
iface lo inet loopback

auto enp3s0
iface enp3s0 inet static
address 64.xxx.xxx.xxx
gateway 64.xxx.xxx.xxx
netmask 255.255.255.0

Just as a further note, the interface would come up but really had no connectivity.

and my resolv.conf file:

nameserver 1.1.1.1
nameserver 1.0.0.1

( I manually added these entries when trying to get the internet working - they are normally different )

Thanks again.
 
You can rule out nameserver problems by using ping as a first step. What modem do you have? Is there any way that you can check connectivity between computer<->modem or modem<->internet independently?

What is the output of the following?
Code:
ip -c a
 
I should have mentioned that I tried ping to multiple different destinations and received no replies, same response when I pinged my own machine IP. I know there was no problem with the physical connection to the modem, because I plugged it into another machine and it worked fine.
 
With my ISP I cannot change the device that is connected to the router without rebooting the router. I don't know if that would be the case with your ISP and router but you might want to try that.
 
Yup, did that as well. Multiple times.

I'm not really looking for a troubleshooting session here, more of a 'how to set this up correctly' tutorial....

Again appreciate the help.
 
Honestly it should be simple and no need for a tutorial. Unless your ISP is using some kind of port security on the router what you did should work.

The only thing I potentially see wrong is the netmask you assigned. Most ISPs don't hand out /24 netmasks for single IPs.
 
So the commands I listed above should do the trick? (barring the netmask -which I'll check on). What about the routing table, should I need to manually add any route commands or should they happen automatically when the interface comes up?
and I did check on the netmask, I pay extra for a dedicated IP so I do get a /24 netmask.
 
If you have more then one gateway then you could have a problem. Take a look at your routes and see ip route if there is more then one default gateway.
 
Only have one gateway, and yes I checked the routing table with ip route and only one default was listed. Might have been just a fluke, but I tried and tried for hours and couldn't get the damn internet to work! I ended up plugging in an old router I had lying around and set the interface to dhcp and that worked to get me through the issue. Just wanted to be better prepared if/when I should have a problem again.
Thanks for the help.
 

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!