[Openstack] Openstack Nat Problem
Abdurrahim ÖZEL
arahim.ozel at gmail.com
Tue Sep 9 15:25:05 UTC 2014
Hi
I have a question about networking on openstack. I try to create 2 network
segment using vm ubuntu. It has 2 networking cards 192.168.1.0/24 and
192.168.2.0/24. I configured nat rules using iptables but it doesnt work as
i expected. When i try to ping from 192.168.2.0/24 to 192.168.1.0/24 network,
ubuntu server gets packet but cannot forward the other site ?
I googled but cannot find any solution. So how can i configure nat properly
on ubuntu vm ? I configured the sysctl for ip_forwarding and iptables
rules.
I can verify that ping packet from Machine2 reaches the Machine1 but
Machine2 ping reply doesn't come to Machine1. The reply packet come to
Ubuntu's interface 192.168.1.5 but the nat rule does not work.
Below is the rules i did. eth0 external network, eth1 internal network.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j
ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
Best regards
[image: Satır içi resim 2]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140909/34f2751b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 24818 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140909/34f2751b/attachment.png>
More information about the Openstack
mailing list