Hi Mark,<div><br></div><div>That part I understand :) Consider these rules (nabbed from forum posting <a href="http://www.zeroshell.net/eng/forum/viewtopic.php?p=655&sid=76f8a08777176b9f939642734f2b23d0#655">here</a>):</div>

<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

iptables -t nat -A prerouting_rule -d WAN_IP -p tcp --dport 80 -j DNAT --to 192.168.0.10 <br>iptables -A forwarding_rule -p tcp --dport 80 -d 192.168.0.10 -j ACCEPT <br>iptables -t nat -A postrouting_rule -s <a href="http://192.168.0.0/24">192.168.0.0/24</a> -p tcp --dport 80 -d 192.168.0.10 -j MASQUERADE</blockquote>

<div><br></div><div>Some pretty "basic" iptables based router distro's like pfSense etc call this hairpin NAT or NAT reflection.. And, I'm wondering if a similar technique is possible with the rules OS generates?</div>

<div><br></div><div>(I've quite literally never used NAT with iptables, except indirectly via Vyatta's config system, so I'm hoping someone more familiar with iptables NAT can chime in!)</div><div><br></div><div>

Thanks,<br>Kiall<br>
<br><br><div class="gmail_quote">On Mon, Oct 10, 2011 at 12:16 PM, Mark McLoughlin <span dir="ltr"><<a href="mailto:markmc@redhat.com">markmc@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Kiall,<br>
<div><div></div><div class="h5"><br>
On Sun, 2011-10-09 at 22:41 +0100, Kiall Mac Innes wrote:<br>
> Hiya,<br>
><br>
> I'm looking to find out if there is any way to access an instance via its<br>
> public (floating ip) from within the same instance.<br>
><br>
> The docs mention that this is not possible here:<br>
> <a href="http://docs.openstack.org/diablo/openstack-compute/admin/content/associating-public-ip.html" target="_blank">http://docs.openstack.org/diablo/openstack-compute/admin/content/associating-public-ip.html</a><br>


><br>
> My question is this: is this a physical impossibility, or a limitation of<br>
> the current nova-network implementation?<br>
<br>
</div></div>Floating IPs are implemented by nova-network using NAT - incoming<br>
packets in the host destined for the floating IP have their destination<br>
changed to the fixed IP and vice versa.<br>
<br>
i.e. from within the VM, you basically have no knowledge of your<br>
floating IP apart by looking at e.g. the public-ipv4 property from the<br>
EC2 metadata API or using the likes of <a href="http://www.whatismyip.com" target="_blank">www.whatismyip.com</a><br>
<br>
It's pretty much the same situation as being behind any NAT<br>
<br>
Cheers,<br>
<font color="#888888">Mark.<br>
<br>
</font></blockquote></div><br></div>