Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The answer came from here http://codigo.cmabreu.com.br/2016/08/01/openstack-mirantis-fuel-no-ubuntu-server/ ( PT_BR sorry ).

Lets say your host machine is 192.168.25.25.

iptables -I FORWARD -d 10.20.0.2 -m comment --comment "Accept to forward Fuel DashBoard traffic" -m tcp -p tcp --dport 8443 -j ACCEPT
iptables -I FORWARD -m comment --comment "Accept to forrward Fuel DashBoard return traffic" -s 10.20.0.2 -m tcp -p tcp --sport 8443 -j ACCEPT
iptables -t nat -I PREROUTING -m tcp -p tcp --dport 8443 -m comment --comment "redirect pkts to virtual machine" -j DNAT --to-destination 10.20.0.2:8443
iptables -t nat -I POSTROUTING -m comment --comment "NAT the src ip" -d 10.20.0.2 -o vboxnet0 -j MASQUERADE

Now http://192.168.25.25:8443 will access Fuel at 10.20.0.2:8443

The answer came from here http://codigo.cmabreu.com.br/2016/08/01/openstack-mirantis-fuel-no-ubuntu-server/ ( PT_BR sorry ).

Lets say your host machine is 192.168.25.25.192.168.25.25. Add this iptables rules to the host machine.

iptables -I FORWARD -d 10.20.0.2 -m comment --comment "Accept to forward Fuel DashBoard traffic" -m tcp -p tcp --dport 8443 -j ACCEPT
iptables -I FORWARD -m comment --comment "Accept to forrward Fuel DashBoard return traffic" -s 10.20.0.2 -m tcp -p tcp --sport 8443 -j ACCEPT
iptables -t nat -I PREROUTING -m tcp -p tcp --dport 8443 -m comment --comment "redirect pkts to virtual machine" -j DNAT --to-destination 10.20.0.2:8443
iptables -t nat -I POSTROUTING -m comment --comment "NAT the src ip" -d 10.20.0.2 -o vboxnet0 -j MASQUERADE

Now http://192.168.25.25:8443 will access Fuel at 10.20.0.2:8443