<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>IP on Mike&#39;s Blog</title>
        <link>https://mikerossiter.tech/tags/ip/</link>
        <description>Recent content in IP on Mike&#39;s Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Thu, 03 Apr 2025 13:04:14 +0100</lastBuildDate><atom:link href="https://mikerossiter.tech/tags/ip/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>VPC IP Address Selector</title>
        <link>https://mikerossiter.tech/posts/vpc-ip-address-selector/</link>
        <pubDate>Thu, 18 Jan 2024 13:28:39 +0000</pubDate>
        
        <guid>https://mikerossiter.tech/posts/vpc-ip-address-selector/</guid>
        <description>&lt;img src="https://mikerossiter.tech/ips.png" alt="Featured image of post VPC IP Address Selector" /&gt;&lt;h1 id=&#34;cidr-block-tool-for-vpc-ip-addresses&#34;&gt;CIDR block tool for VPC IP addresses
&lt;/h1&gt;&lt;p&gt;This tool will take an IP address written by yourself and the number of IP addresses you require for your VPC on AWS or other since this is not something you want to get wrong as you may need to migrate your resources later if you underestimate the number of IPs you need. It will then output the IP with the correct CIDR block and the IP range you will receive. Remember in AWS the first three addresses are reserved for the VPC router, DNS and future use and the final address is used as the broadcast address. Also, the amount of IP addresses that will be returned will be a close estimation of what you have requested so double check the range after entering the values. &lt;em&gt;ALSO, if you&amp;rsquo;re testing this out for use with a VPC in AWS then remember that you only have between /16 (65,536 IP addresses) to /28 (16 IP addresses)!&lt;/em&gt;&lt;/p&gt;
&lt;body&gt;
    &lt;label for=&#34;ipAddress&#34;&gt;IP Address:&lt;/label&gt;
    &lt;input type=&#34;text&#34; id=&#34;ipAddress&#34; placeholder=&#34;Enter the IP address&#34; value=&#34;10.0.0.0&#34;&gt;
    &lt;label for=&#34;numAddresses&#34;&gt;Number of IP Addresses:&lt;/label&gt;
    &lt;input type=&#34;number&#34; id=&#34;numAddresses&#34; placeholder=&#34;Enter the number of IP addresses&#34; value=&#34;100&#34;&gt;
    &lt;button onclick=&#34;calculateCIDR()&#34;&gt;Calculate CIDR Block&lt;/button&gt;
    &lt;p id=&#34;result&#34;&gt;&lt;/p&gt;
    &lt;p id=&#34;ipRange&#34;&gt;&lt;/p&gt;
    &lt;script src=&#34;https://mikerossiter.tech/js/ip-vpc.js&#34;&gt;&lt;/script&gt;
&lt;/body&gt;
</description>
        </item>
        <item>
        <title>How to View Your Public IP Address in the Command Line</title>
        <link>https://mikerossiter.tech/posts/how-to-view-your-ip-address-in-the-command-line/</link>
        <pubDate>Tue, 04 Oct 2022 10:27:19 +0100</pubDate>
        
        <guid>https://mikerossiter.tech/posts/how-to-view-your-ip-address-in-the-command-line/</guid>
        <description>&lt;img src="https://mikerossiter.tech/world.png" alt="Featured image of post How to View Your Public IP Address in the Command Line" /&gt;&lt;h1 id=&#34;how-to-view-your-public-ip-address-in-the-command-line&#34;&gt;How to View Your Public IP Address in the Command Line
&lt;/h1&gt;&lt;p&gt;This is a short post but I discovered a really handy API in a great website: &lt;a class=&#34;link&#34; href=&#34;https://www.myip.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MyIP.com&lt;/a&gt; No ads either. (&lt;em&gt;Noice!&lt;/em&gt;) It shows you your IP and some interesting stats too. I have utilised the API of the website to make this handy command because it isn&amp;rsquo;t often that straightforward and running &lt;code&gt;ip a&lt;/code&gt; or &lt;code&gt;ifconfig&lt;/code&gt; only shows you the addresses for what is happening locally. So the command I&amp;rsquo;m using is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -s https://api.myip.com | jq .ip | tr -d \&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Taking this apart, we can run the curl command and return some useful values in json format. Hence the inclusion of the &lt;code&gt;jq&lt;/code&gt; parse tool which pulls out only the IP address. Finally the &lt;code&gt;tr&lt;/code&gt; tool simply trims off the surrounding quotes which is nicer to look at and might make this command more useful in a script or something. I don&amp;rsquo;t know. Or whatever you want to use it for.&lt;/p&gt;
&lt;p&gt;So there you go! If this helped you too then you can help me stay awake by &lt;a class=&#34;link&#34; href=&#34;https://www.buymeacoffee.com/mikerossiter&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;buying me a coffee&lt;/a&gt;. Thanks!&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
