No internet available in Microstack hosted instance

538 views Asked by At

I have hosted Microstack, in my Macbook. Everything works fine, I am able to boot instances from the Microstack.

But on the Xenial Server instance I have booted from my Microstack has no internet. I am planning to install docker and create containers.

ubuntu@xone:~$ ifconfig
ens3      Link encap:Ethernet  HWaddr fa:16:3e:b7:14:e0
          inet addr:94.23.76.87  Bcast:94.23.76.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:feb7:14e0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
          RX packets:169 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15821 (15.8 KB)  TX bytes:16228 (16.2 KB)

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:14708 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:1091208 (1.0 MB)  TX bytes:1091208 (1.0 MB)

When I run ifconfig in my Xenial Server instance, this is the result I'm getting.

I am able to both ping router_gateway and router_interface from my xone(Xenial instance). Both 10.20.20.82 and 192.168.222.1.

Network topology

But I am unable to ping 8.8.8.8 from xone instance. How best I can resolve this issue?

1

There are 1 answers

0
javafox On

Thanks to https://bugs.launchpad.net/microstack/+bug/1812415.

I was able to resolve this issue by running the following commands in the host (OpenStack) instance:

sudo iptables -t nat -A POSTROUTING -s 10.20.20.1/24 ! -d 10.20.20.1/24 -j MASQUERADE

sudo sysctl net.ipv4.ip_forward=1