0

I had a problem with the server. The hardware had a problem and broken the system. The system administrators restarted the server in the rescue mode and it never booted again. Proxmox and the virtual machines are gone.

They gave me another server with the same specs. Now I did the same things as always to reinstall the VMs from scratch.

-Installed Promox VE

-Uploaded the Centos 7 iso image

-Created the VM

-Installed the OS system

-Added the MAC address in the VM hardware configuration > network device for the bridge.

-In the VM, I configured the network with manual ip address, the gateway, and the dns server, with the data from the hosting provider. Used nmtui.

-I restarted the network.

If I ping from my personal computer to the VM it works

0% packet loss

But if I try to ping from the VM to google.com or 8.8.8.8 it does not work

100% packet loss

I even disabled the firewall

I can ping google.com from the main server in rescue mode. The support team told me the server is ok. it might be something wrong in the configuration.

Any suggestion?

Thank you

Regards.

Jvrq
  • 75
  • 1
  • 5

2 Answers2

0

Sounds like a bad route to me. If you can ping stuff on the same subnet - but not things outside of that subnet, it's almost always a bad route/gateway or perhaps it's using the wrong subnet mask. Don't overthink the route, it is simply "where do I go if I can't find a host on my same subnet?" I find with many of my peers, they overthink routing.

First, I'd check the IP address and see if the CIDR is correct (/24 for a standard subnet usually)

    [root@virgo ~]# ip a

3: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      inet **192.168.1.4/24** brd 192.168.1.255 scope global noprefixroute

The /24 after the IP denotes a 255.255.255.0 subnet

https://docs.netgate.com/pfsense/en/latest/network/cidr.html

Then check your static route

[root@virgo ~]# ip route
**default via 192.168.1.1** dev bridge0 proto static metric 425
192.168.1.0/24 dev bridge0 proto kernel scope link src 192.168.1.4 metric 425
[root@virgo ~]#

The default should be your gateway. This is assuming a single NIC interface on the server, you should just have one default gateway. Multiple network connections can complicate the routing, depending on the setup.

  • My network mask is 255.255.255.0 Now I have used /24 And I can see /24 in both commands ip addr and ip route I restarted the network in the vm I'm still not able to ping the gateway https://pasteboard.co/JICJwH8.jpg – Jvrq Jan 08 '21 at 02:39
0

I was confused with the ips and the mac addresses. the one for the server and the one for the VM Now works Thank you.

Jvrq
  • 75
  • 1
  • 5