Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : VM no internet access



Threaded Mode | Print  

 VM no internet access (9 Replies, Read 1886 times)
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Hello,
Sorry for my english, hope you could help me.
I want to run multiple VMs with 1 public and private (dummy) ip.
public ip 138.201.xx.xx
private ip: 10.0.98.0/24
For this, I created an ip pool in NAT (10.0.98.0/24). The virtual machine (VM) starts without problem but unfortunately it does not have access to the Internet. How to ensure that the VMs have access to the Internet?

thank you
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
If it can help

from virtualizor
# route -n
Table de routage IP du noyau
Destination    Passerelle          Genmask        Indic Metric Ref    Use Iface
0.0.0.0        138.201.133.193    0.0.0.0        UG    0      0        0 viifbr0
10.0.98.0      0.0.0.0          255.255.255.0    U    0      0          0 natbr1
138.201.133.0  0.0.0.0        255.255.255.0    U    0      0          0 viifbr0
169.254.0.0    0.0.0.0        255.255.0.0        U    1003  0          0 viifbr0

from the VM
# route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
0.0.0.0        10.0.98.1      0.0.0.0        UG    0      0        0 eth0
10.0.98.0      0.0.0.0        255.255.255.0  U    0      0        0 eth0


IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:

Hello,
I still can't see internet on my VM (vps).
If someone can help me?

# brctl show
bridge name    bridge id          STP    enabled    interfaces
natbr1        8000.525400a5a2aa      yes                viifv1001
viifbr0        8000.901b0ea0ac33      no                enp0s31f6
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Quote From : redback38 January 26, 2022, 4:10 pm

Hello,
I still can't see internet on my VM (vps).
If someone can help me?

# brctl show
bridge name    bridge id          STP    enabled    interfaces
natbr1        8000.525400a5a2aa      yes                viifv1001
viifbr0        8000.901b0ea0ac33      no                enp0s31f6


# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master viifbr0 state UP group default qlen 1000
    link/ether 90:1b:0e:a0:ac:33 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::921b:eff:fea0:ac33/64 scope link
      valid_lft forever preferred_lft forever
3: viifbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 90:1b:0e:a0:ac:33 brd ff:ff:ff:ff:ff:ff
    inet 138.201.133.205/24 brd 138.201.133.255 scope global viifbr0
      valid_lft forever preferred_lft forever
    inet6 2a01:4f8:172:310d::2/64 scope global
      valid_lft forever preferred_lft forever
    inet6 fe80::921b:eff:fea0:ac33/64 scope link
      valid_lft forever preferred_lft forever
4: natbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:a5:a2:aa brd ff:ff:ff:ff:ff:ff
    inet 10.0.98.1/24 brd 10.0.98.255 scope global natbr1
      valid_lft forever preferred_lft forever
5: natbr1-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master natbr1 state DOWN group default qlen 1000
    link/ether 52:54:00:a5:a2:aa brd ff:ff:ff:ff:ff:ff
7: viifv1001: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master natbr1 state UNKNOWN group default qlen 1000
    link/ether fe:16:3e:be:e5:e1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc16:3eff:febe:e5e1/64 scope link
      valid_lft forever preferred_lft forever
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Quote From : redback38 January 26, 2022, 4:11 pm
Quote From : redback38 January 26, 2022, 4:10 pm

Hello,
I still can't see internet on my VM (vps).
If someone can help me?

# brctl show
bridge name    bridge id          STP    enabled    interfaces
natbr1        8000.525400a5a2aa      yes                viifv1001
viifbr0        8000.901b0ea0ac33      no                enp0s31f6


# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master viifbr0 state UP group default qlen 1000
    link/ether 90:1b:0e:a0:ac:33 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::921b:eff:fea0:ac33/64 scope link
      valid_lft forever preferred_lft forever
3: viifbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 90:1b:0e:a0:ac:33 brd ff:ff:ff:ff:ff:ff
    inet 138.201.133.XX/24 brd 138.201.133.255 scope global viifbr0
      valid_lft forever preferred_lft forever
    inet6 2a01:4f8:172:310d::2/64 scope global
      valid_lft forever preferred_lft forever
    inet6 fe80::921b:eff:fea0:ac33/64 scope link
      valid_lft forever preferred_lft forever
4: natbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:a5:a2:aa brd ff:ff:ff:ff:ff:ff
    inet 10.0.98.1/24 brd 10.0.98.255 scope global natbr1
      valid_lft forever preferred_lft forever
5: natbr1-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master natbr1 state DOWN group default qlen 1000
    link/ether 52:54:00:a5:a2:aa brd ff:ff:ff:ff:ff:ff
7: viifv1001: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master natbr1 state UNKNOWN group default qlen 1000
    link/ether fe:16:3e:be:e5:e1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc16:3eff:febe:e5e1/64 scope link
      valid_lft forever preferred_lft forever
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Hello, I'm moving slowly. I now have internet on the VPS with private ip addresses by following this tutorial https://www.virtualizor.com/docs/admin/manage-vps-domain-forwarding/#kvm-lxc-openvz-7-and- xen
From the VPS I can ping:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=5.30 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=5.43 ms
On the other hand if I do a ping on www.google.fr (or any other domain name it does not work).

# ping www.google.com
Ping: www.google.fr: Temporary failure in name resolution

I thought it was from the DNS but
# cat /etc/resolv.conf
nameserver 4.2.2.1
nameserver 4.2.2.2

If anyone has an idea?
Sorry again for my english
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Hello, I'm moving slowly. I now have internet on the VPS with private ip addresses by following this tutorial
https://www.virtualizor.com/docs/admin/manage-vps-domain-forwarding/#kvm-lxc-openvz-7-and- xen

KVM, LXC, OpenVZ 7 and XEN
Login to command line console as root and follow below steps on host where you want internal network with working Internet access:

Create internal network (eg network and bridge name: HAProxy) on the host
Navigate to /etc/libvirt/qemu/networks
Create a new xml file with network_name (eg HAProxy) as filename and with following content:
<network>
  <name>HAProxy</name>
  <forward mode='nat'/>
  <bridge name='HAProxy' stp='on' delay='0' />
  <ip address='10.0.0.1' netmask='255.0.0.0'>
  </ip>
</network>
Define this network by running following command:
virsh net-define /etc/libvirt/qemu/networks/HAProxy.xml
Set to auto start this network by running following command (replace network name HAProxy with the one you created in below command):
virsh net-autostart HAProxy
Start this network by running following command (replace network name HAProxy with the one you created in below command):
virsh net-start HAProxy
Now create an IP Pool with internal network details through Virtualizor Admin Panel:
Navigate to Admin Panel > IP Pool > Create IP Pool
Select the server where you have setup the internal network
Provide a meaningful name for this pool
Set according to our example network:
Gateway to: 10.0.0.1
Netmask to: 255.0.0.0
Nameserver 1: 8.8.8.8
Nameserver 2: 8.8.4.4
First IP: 10.0.0.2
Last IP: 10.0.0.50
Enable VLAN: checked
VLAN Bridge: BRIDGE_NAME you set when creating it (HAProxy)
Click "Add IP Pool" to save the new pool
Create VPS with any one of the IPs in the above IP range. The VPS will have a working internet access
Done!


From the VPS I can ping:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=5.30 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=5.43 ms
On the other hand if I do a ping on www.google.fr (or any other domain name it does not work).

# ping www.google.com
Ping: www.google.fr: Temporary failure in name resolution

I thought it was from the DNS but
# cat /etc/resolv.conf
nameserver 4.2.2.1
nameserver 4.2.2.2

If anyone has an idea?
Sorry again for my english
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
problem solved, it was the firewall

# ping www.google.fr
PING www.google.fr (172.217.16.3) 56(84) bytes of data.
64 bytes from waw02s13-in-f3.1e100.net (172.217.16.3): icmp_seq=1 ttl=116 time=19.3 ms
64 bytes from waw02s13-in-f3.1e100.net (172.217.16.3): icmp_seq=2 ttl=116 time=19.4 ms
64 bytes from mil02s06-in-f3.1e100.net (172.217.16.3): icmp_seq=3 ttl=116 time=19.4 ms
64 bytes from mil02s06-in-f3.1e100.net (172.217.16.3): icmp_seq=4 ttl=116 time=19.3 ms
IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:
Hello, when I activate the firewall on my dedicated hetzner server my VPS create can ping on ip (example 8.8.8.8 ok) but when I try to ping on a domain name (example www.google. fr does not work). I don't see what port to open more. Here is a screenshot

IP: --   

VM no internet access
redback38
Group: Member
Post Group: Newbie
Posts: 15
Status:

find, you have to use the hetzner DNS

https://poweruserguide.com/fix-internet-on-my-hetzner-root-server/
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 27, 2022, 3:30 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:2.390