Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

Guest unable to connect to http - KVM, ubuntu16, NAT

$
0
0
Hello,

I'm fairly new to Ubuntu (and linux). I'm attempting to do a very basic VM setup using KVM to create a centos7 box. This machine is unable to connect to the internet. Pretty much every site says "it should just work auto-magically!" I've been banging my head against a wall trying to figure out why its not for me. ](*,)

About the only thing I can do from the guest is ssh to the host. However, the host cannot ssh to guest (no open-ssh installed yet).

guest = app02@localhost
host = drew@drewbuntu

GUEST INFO
ifconfig
Code:


[app02@localhost ~]$ ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.122.146  netmask 255.255.255.0  broadcast 192.168.122.255
        inet6 fe80::1349:eb5b:fa83:2e06  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:d6:36:a8  txqueuelen 1000  (Ethernet)
        RX packets 109  bytes 8255 (8.0 KiB)
        RX errors 0  dropped 5  overruns 0  frame 0
        TX packets 51  bytes 8422 (8.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 648  bytes 54472 (53.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 648  bytes 54472 (53.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:be:14:6e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0-nic: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 52:54:00:be:14:6e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

iptables -L on guest
Code:

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       
ACCEPT    all  --  anywhere            192.168.122.0/24    ctstate RELATED,ESTABLISHED
ACCEPT    all  --  192.168.122.0/24    anywhere


Attempt to ssh to guest
Code:

drew@drewbuntu:~$ ssh 192.168.122.146
ssh: connect to host 192.168.122.146 port 22: No route to host

HOST INFO

ifconfig
Code:

drew@drewbuntu:~$ ifconfig
eno1      Link encap:Ethernet  HWaddr 00:22:4d:56:8a:70 
          inet addr:192.168.0.140  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::16b3:8a58:d76a:a654/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3154 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2846 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2407664 (2.4 MB)  TX bytes:470768 (470.7 KB)
          Interrupt:20 Memory:fba00000-fba20000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:43528 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43528 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:913836544 (913.8 MB)  TX bytes:913836544 (913.8 MB)

virbr0    Link encap:Ethernet  HWaddr fe:54:00:d6:36:a8 
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7921 (7.9 KB)  TX bytes:1965 (1.9 KB)

vnet0    Link encap:Ethernet  HWaddr fe:54:00:d6:36:a8 
          inet6 addr: fe80::fc54:ff:fed6:36a8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53 errors:0 dropped:0 overruns:0 frame:0
          TX packets:316 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8663 (8.6 KB)  TX bytes:19177 (19.1 KB)

cat /proc/sys/net/ipv4/ip_forward
Code:

sudo cat /proc/sys/net/ipv4/ip_forward
[sudo] password for drew:
1

/etc/network/interfaces on host
Code:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

iptables -L on host
Code:

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       
ACCEPT    all  --  anywhere            192.168.122.0/24    ctstate RELATED,ESTABLISHED
ACCEPT    all  --  192.168.122.0/24    anywhere


kernal: 4.8.0-44-generic
I have attempted these troubleshooting steps already: https://help.ubuntu.com/community/KV...roubleshooting

I've got to be missing something stupid-easy...

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>