<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OCI &#8211; Made For Cloud</title>
	<atom:link href="https://madeforcloud.com/category/oci/feed/" rel="self" type="application/rss+xml" />
	<link>https://madeforcloud.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 12 Jan 2022 03:33:16 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>OCI: No route to host?</title>
		<link>https://madeforcloud.com/2022/01/12/oci-no-route-to-host/</link>
					<comments>https://madeforcloud.com/2022/01/12/oci-no-route-to-host/#comments</comments>
		
		<dc:creator><![CDATA[gocallag]]></dc:creator>
		<pubDate>Wed, 12 Jan 2022 03:33:16 +0000</pubDate>
				<category><![CDATA[OCI]]></category>
		<guid isPermaLink="false">https://madeforcloud.com/?p=129</guid>

					<description><![CDATA[I&#8217;ve been doing some work on Oracle&#8217;s Cloud as they provide a decent free tier to experiment with. I&#8217;ve been very pleasantly surprised with OCI and will likely move some of my personal workloads there. It wasn&#8217;t without a bit of a head scratching experience though when I was trying to get application connectivity between&#8230;<p><a class="more-link" href="https://madeforcloud.com/2022/01/12/oci-no-route-to-host/" title="Continue reading &#8216;OCI: No route to host?&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve been doing some work on Oracle&#8217;s Cloud as they provide a decent free tier to experiment with.  I&#8217;ve been very pleasantly surprised with OCI and will likely move some of my personal workloads there.</p>



<p>It wasn&#8217;t without a bit of a head scratching experience though when I was trying to get application connectivity between two OCI images on the same private 10.0.0.0/24 network I had created.</p>



<p>eg.</p>



<pre class="wp-block-code"><code>curl http://10.0.0.53/
curl: (7) Failed to connect to 10.0.0.53 port 80: No route to host</code></pre>



<p>My first thought was the cloud ingress rules, but i&#8217;d added the following as a first desperate attempt to get things working.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://madeforcloud.com/wp-content/uploads/2022/01/image-1024x188.png" alt="" class="wp-image-130"/></figure>



<p>Try again, Still no route!  </p>



<p>What I discovered is the OCI supplied images (I was using the Ampere Ubuntu 20.04 image in this case) have an interesting set of iptables rules baked into the image.</p>



<pre class="wp-block-code"><code>root@blog:~# cat /etc/iptables/rules.v4
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
# iptables configuration for Oracle Cloud Infrastructure

# See the Oracle-Provided Images section in the Oracle Cloud Infrastructure
# documentation for security impact of modifying or removing these rule

*filter
:INPUT ACCEPT &#91;0:0]
:FORWARD ACCEPT &#91;0:0]
:OUTPUT ACCEPT &#91;463:49013]
:InstanceServices - &#91;0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp --sport 123 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
<strong>#-A INPUT -j REJECT --reject-with icmp-host-prohibited</strong>
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -d 169.254.0.0/16 -j InstanceServices
.
.
.</code></pre>



<p>I&#8217;ve commented out the offending line.  With OCI supplied images, even though the default filter is ACCEPT, they place a <strong>reject-with icmp-host-prohibited </strong>at the end of the INPUT table, which effectively rejects everything not specifically allowed (such as the port 22 rule the line before).</p>



<p>My two options were to either put in my specific allows (the right thing to do) or remove the <strong>reject </strong>and just use the INPUT filter default.  I chose the latter as I was experimenting in this case and kept the information at my finger tips for more &#8216;production-like&#8217; deployments.</p>



<p>The end result, communication between the 2 OCI Ubuntu instances over the private network now works fine.</p>



<p><strong>Caveat</strong>:  In my case I understood the risks associated with removing the <strong>reject </strong>for my Use Case.  Please perform your own due diligence for your Use Case,  you&#8217;re probably better off specifically adding the communication rules you want to allow.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://madeforcloud.com/2022/01/12/oci-no-route-to-host/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
