how to set one instance as gateway in openstack
I have created three instance in openstack . First is source machine , second machine is the machine on which i am running some application and third is destination.
*First machine(source)* details:*
IP ADDRESS:- 172.16.1.11 default gateway:- 172.16.1.1 Floating IP:- 192.168.1.103
Second Machine (on which my application is running) details:
IP ADDRESS:- 172.16.1.12 default gateway:- 172.16.1.1 Floating IP:- 192.168.1.104
Third Machine(Destination) details:
IP ADDRESS:- 172.16.1.13 default gateway:- 172.16.1.1 Floating IP:- 192.168.1.105
I want to send the packet from source to destination through second machine. So I am trying to delete the default gateway of source machine , So that i can add one static route for eg.
On source machine for adding the gateway
route add default gw 172.16.1.12 dev eth0
But when i am trying to delete the default gateway of source machine
i.e route del default gw 172.16.1.1 dev eth0 ,
My instance got hanged and i am not able to do any thing in that instance.
So can you tell me how to set second machine as default gateway , So that packet going from source to destination passes through second machine.