Whenever you face vps network issue, whether its a fresh vps with fresh ip pool or for an existing ip pool, check for any blocking done by your ip provider or if any firewall is enabled either on Ip provider panel or on your server.
If you feel everything is fine there, then check if vps is booted as expected. You can view it in vnc from panel.
Also make sure if vps firewall is not blocking your connections.
If vps is getting pinged or ssh then there is some service issues within your vps which is beyond our support scope.
Vpses, in most cases, will always use a bridged network.
If you have added normal ip pool with routed option on/off then make sure viifbr0 or any other default bridge is started or not.
To start virtnetwork (bridge as a service) you can check this guide :
And to create it as a permanent Linux bridge then you can use this guide :
https://www.virtualizor.com/docs/admin/kvm-bridge/#making-the-bridge-permanent
# brctl show
If you have added VLAN, Internal or NAT ip pool on panel then check if corresponding bridge is setup properly and working as expected.
Previous command will help you check if the bridge is attached to required network interface on server and also to vps interfaces.
If the vps interfaces are not attached to the bridge then you can either stop and start vps from panel or try attaching it manually :
# brctl addif viifbr0 viifv1001
Where viifv1001 is vps interface and viifbr0 is your bridge name.
Temporary Route
If the provider requires you to add/create extra routing to make the VPS work in bridge mode then first try adding vps ip as alias on main server viifbr0:0 (or your custom bridge) and then check if that ip works from outside.
Run following command to setup alias ip:
# ifconfig viifbr0:0 <alias_IP_address> netmask <subnet_mask> up
Check login works with server Password?
If login works with server password then looks like it needs extra routing on server to make it work in vps.
Down the alias ip carefully which was added on server using the below guide:
# ifconfig viifbr0:0 <alias_IP_address> netmask <subnet_mask> down
Then try adding static route on server for the vps subnet using below command:
# ip route add <subnet_range>/<subnet> via <server_ip> dev viifbr0
Once the VPS network starts working , also update the routing entries in the corresponding bridge config file so that it gets added automatically on reboot.
Permanent Route
IP pool gateway will be server's IP.
1.) Almalinux OS:
To add a permanent route to the Network Manager, you have to navigate to the connection file located at “/etc/NetworkManager/system-connections”.
Edit your Bridge config file (example viifbr0.connection) and add a “route1” property in the IPv4 part of the network configuration.
Example file contents for IPV4:
[ipv4]
address1=192.168.178.36/24,192.168.178.1
#192.168.178.36 is the server's IP
method=manual
route1=10.0.3.0/24,192.168.178.36
#the subnet routed via server's IP 192.168.178.36
2.) Ubuntu OS:
Netplan is an Ubuntu exclusive, but it can be quite useful if you want to configure your network using a simple YAML file.
To add a permanent route using Netplan, add the following section to your “/etc/netplan” configuration file.
Example file contents for IPV4: /etc/netplan/<configuration_file>.yaml
routes:
- on-link: true
to: 0.0.0.0/0
via: 192.168.178.1
#following is the additional subnet route via server's IP
- to: 10.0.3.0/24
via: 192.168.178.1
For the changes to be applied, you will have to execute the “netplan” command with the “apply” argument.
# netplan apply
Openvz 7 Ipv6 +ipv4
Routed option should be in use for IP pool when using any IPs for Openvz vps.
For KVM, bridge mode (via br0 or some other bridge created on server) would work fine.
But if you want to use an IP Pool for both Openvz and KVM vps, routed option should also work for most cases depending on network setup from data center.
For Ipv4, with routed mode on, MAC requirement would also go away in case there is a requirement for using MAC address for IPs.
For Ipv6, fe80::ffff:1:1 as gateway would be required when using routed option for IP pool.
Gateway provided by data center would be required when using bridged mode (that bridge mode would be applied when routed option is NOT chosen for ip pool on panel).
Ip pool settings would be picked up from panel when applying network settings only for a KVM vps.
Gateway entry is neglected from panel while applying network settings for Openvz vps. (as it would be using routed mode for its network and also requires ipv6 to be working on server first.)