<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Networking on davepedu.com</title><link>https://davepedu.com/tags/networking/</link><description>Recent content in Networking on davepedu.com</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>dave@davepedu.com (dave)</managingEditor><webMaster>dave@davepedu.com (dave)</webMaster><lastBuildDate>Mon, 12 Jun 2017 00:00:00 +0000</lastBuildDate><atom:link href="https://davepedu.com/tags/networking/index.xml" rel="self" type="application/rss+xml"/><item><title>pfSense and ESXi setup on OVH's network</title><link>https://davepedu.com/blog/2017/06/13/pfsense-and-esxi-on-ovh-network/</link><pubDate>Mon, 12 Jun 2017 00:00:00 +0000</pubDate><author>dave@davepedu.com (dave)</author><guid>https://davepedu.com/blog/2017/06/13/pfsense-and-esxi-on-ovh-network/</guid><description>&lt;p&gt;I host my projects on a dedicated server rented from &lt;a href="http://ovh.com/"&gt;OVH&lt;/a&gt;, I&amp;rsquo;m a huge VMware fan, so I&amp;rsquo;ve used their
free product, the &lt;a href="http://www.vmware.com/products/vsphere-hypervisor"&gt;ESXi Hypervisor&lt;/a&gt;, to cram lots of virtual machines
inside my one server. Since not all my virtual machines need internet-facing IPs and ESXi has only basic NAT capability,
an easy solution here is running a &lt;a href="https://www.pfsense.org/"&gt;pfSense&lt;/a&gt; install as a NAT router, as a virtual machine.
OVH&amp;rsquo;s network has some unique setup required for this specific situation. Unfortunately, this is best documented in
various blog posts across the internet.&lt;/p&gt;</description><content>&lt;p&gt;I host my projects on a dedicated server rented from &lt;a href="http://ovh.com/"&gt;OVH&lt;/a&gt;, I&amp;rsquo;m a huge VMware fan, so I&amp;rsquo;ve used their
free product, the &lt;a href="http://www.vmware.com/products/vsphere-hypervisor"&gt;ESXi Hypervisor&lt;/a&gt;, to cram lots of virtual machines
inside my one server. Since not all my virtual machines need internet-facing IPs and ESXi has only basic NAT capability,
an easy solution here is running a &lt;a href="https://www.pfsense.org/"&gt;pfSense&lt;/a&gt; install as a NAT router, as a virtual machine.
OVH&amp;rsquo;s network has some unique setup required for this specific situation. Unfortunately, this is best documented in
various blog posts across the internet.&lt;/p&gt;
&lt;h1 id="installation"&gt;Installation&lt;/h1&gt;
&lt;p&gt;You can grab the latest pfSense from here: &lt;a href="https://www.pfsense.org/download/index.html"&gt;https://www.pfsense.org/download/index.html&lt;/a&gt;. At the time of writing, the
latest and pfSense version I&amp;rsquo;m using is 2.3.4, though any version later than 2.1 should work nicely. Thorough IPv6
support was introduced in 2.1, but if you don&amp;rsquo;t need that I suppose an earlier version would be fine as well. So grab an
ISO and upload it to your ESXi machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virtual machine creation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I used the 64-bit version of pfSense, so the &amp;ldquo;type&amp;rdquo; of virtual machine I used was &lt;strong&gt;Linux - Other Linux
(64-bit)&lt;/strong&gt;. pfSense is based on BSD, so any similiar configuration should be fine. 512mb of ram allocated will be more
than enough, but 256mb is doable. 4GB disk space allocated is fine as well. Next, other than adding a second network
adapter, the default options that ESXi presents will work fine. One specialty for OVH - in your control panel, you must
generate a MAC address for the address this host will be using - assign it to the public-facing network adapter. Also,
create a virtual switch and attach it to the &amp;ldquo;private&amp;rdquo; network adapter. This switch is where your private network and
virtual machines will live.&lt;/p&gt;
&lt;p&gt;Installing pfSense to the virtual machine is pretty straightforward, but [check out this guide]
(&lt;a href="https://doc.pfsense.org/index.php/Installing_pfSense"&gt;https://doc.pfsense.org/index.php/Installing_pfSense&lt;/a&gt;) if you need help.&lt;/p&gt;
&lt;h1 id="ovh-customization"&gt;OVH customization&lt;/h1&gt;
&lt;p&gt;After you finish pfSense&amp;rsquo;s command-line setup wizard, you won&amp;rsquo;t have internet connectivity. You need to add some routes
specific to your server&amp;rsquo;s in the OVH network. If your server&amp;rsquo;s primary IP is A.B.C.D and the IP 1.2.3.4 will be
assigned to this new host, run these commands in the shell:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;route add -net A.B.C.254 1.2.3.4&lt;/p&gt;
&lt;p&gt;route add default A.B.C.254&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These commands will add routes needed to access your host&amp;rsquo;s gateway. You&amp;rsquo;ll have connectivity now, but need to make this
fix permanent. Log into the UI, and in pfSense&amp;rsquo;s package repo the package Shellcmd is a convenient way to do this.
Install it and add the two commands above as startup commands.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://davepedu.com/blog/2017/06/13/pfsense-and-esxi-on-ovh-network/img/pfsense_hu_ca9405783f3fe3ef.png" alt="Pfsense running in the VMware console" title="Pfsense running in the
VMware console" /&gt;&lt;/p&gt;
&lt;h1 id="wrap-up"&gt;Wrap up&lt;/h1&gt;
&lt;p&gt;If you&amp;rsquo;ve enabled the DHCP server on your pfSense install you can now create privately-networked virtual machines with
internet access via NAT, but with no exposure to the internet. Ports can be forwarded to public services and everything
else is hidden behind a layer of NAT.&lt;/p&gt;
&lt;p&gt;Next time: setting up IPv6 with &lt;a href="https://tunnelbroker.net/"&gt;TunnelBroker.net&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Editor&amp;rsquo;s Note: originally composed in &lt;strong&gt;2014&lt;/strong&gt;, but rotted in the drafts bin&amp;hellip;&lt;/p&gt;</content></item></channel></rss>