Ask Your Question
0

Instance as gateway

asked 2017-02-15 20:21:09 -0500

Gokimax gravatar image

Hi,

I'm trying to use an instance (VM-02) to route traffic to another instance (VM-01). The float IP(172.16.2.35) of the VM-02 is the default gateway of the clients.

The problem is when a client(172.16.2.101) try to reach internet, the traffic outs by the vrouter ip (172.16.1.30). The behaivour that I spect is that the traffic be routed to the VM-01.

The machines have the following configuration: VM-01 eth0: 192.168.100.14 eth1: 10.10.1.5 Float: 172.16.3.44 (out internet)

VM-02 eth0: 10.10.0.31 Float: 172.16.2.35 (client's gateway) eth1: 192.168.100.25

I disabled port security at all ports to permit that the instances route traffic.

Regards,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-28 12:41:02 -0500

You need to setup ip forwarding and ip masquerading on the gateway instance for this to work.

Ensure that your /etc/sysconfig/network has forwarding set to YES and the GATEWAY set as the floating ip.

You can use the route command to do this for you using:

bash route add default gw <FLOATING_IP> <INTERFACE_NAME>

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-02-15 20:21:09 -0500

Seen: 110 times

Last updated: Feb 28 '17