{"id":19325,"date":"2022-05-26T11:22:44","date_gmt":"2022-05-26T09:22:44","guid":{"rendered":"http:\/\/www.firewallhardware.it\/pfsense-2-4-x-configurazione-captive-portal\/"},"modified":"2022-05-26T12:43:04","modified_gmt":"2022-05-26T10:43:04","slug":"pfsense-captive-portal-configuration","status":"publish","type":"post","link":"https:\/\/blog.miniserver.it\/en\/pfsense\/pfsense-captive-portal-configuration\/","title":{"rendered":"pfSense: Captive Portal Configuration"},"content":{"rendered":"<p>The purpose of this guide is to allow access to the Internet through the <strong>PFSense Captive Portal<\/strong> service. This system allows access to navigation by entering authorized users or by entering a temporary configurable vaucher (usage time, allowed speed, &#8230;)<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Hardware and software environment used<\/h3>\n<p>Tested hardware: We performed the configuration on a single hardware system as, in fact, the configuration can be replicated on any device compatible with the <strong>pfSense<\/strong> system. However, we recommend not using a lower power system than the system used in our tests.<\/p>\n<p><strong>Tested Corporate Firewall:<\/strong><br \/>\nThe entire <u><a href=\"https:\/\/www.miniserver.it\/firewall\/corporate\/compact-small-utm-3\" target=\"_blank\" rel=\"noopener noreferrer\">Compact Small UTM<\/a><\/u> line<br \/>\nAll the <u><a href=\"https:\/\/www.miniserver.it\/firewall\" target=\"_blank\" rel=\"noopener noreferrer\">Small UTM<\/a><\/u> line<\/p>\n<p>The <strong>software used<\/strong> on the appliance is <strong>pfSense\u00ae<\/strong> version <strong>2.4.4-RELEASE-p3<\/strong><\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Configuration<\/h3>\n<p>First we need to identify one or more network cards on which the <strong>Captive Portal<\/strong> will be controlled, these can be normal LAN or VLan. Let&#8217;s take an example on VLAN.<\/p>\n<p>Create a VLAN from the &#8220;<strong>Interface<\/strong>-&gt; <strong>assignement<\/strong>-&gt;<strong>Vlan<\/strong>&#8221; menu then <strong>add<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18698\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-1.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"372\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-1-300x116.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-1-768x298.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-1.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Configure it on the desired interface, in this example we create the VLan 25 on the LAN interface (igb1)<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18700\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-2.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"537\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-2-300x168.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-2-768x430.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-2.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Then we add an interface with the VLAN just created, from the tab &#8220;<strong>Interface assignement<\/strong>&#8221; select in the drop down menu of &#8220;<strong>avaible network port<\/strong>&#8221; the newly created VLan then click on &#8220;<strong>Add<\/strong>&#8221; as shown in fig below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18702\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-3.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"463\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-3-300x145.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-3-768x370.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-3.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>An interface with the initial name &#8220;<strong>OPT<\/strong>&#8221; will be created. Click on it to enable and configure it<\/p>\n<p>Below an example<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18704\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-4.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"668\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-4-300x209.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-4-768x534.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-4.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Configure DHCP from <strong>Services<\/strong>-&gt;<strong>DHCP Server<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18706\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-5.jpg\" alt=\"Captive Portal\" width=\"600\" height=\"498\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-5-300x249.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-5.jpg 600w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>So, in our example, select the tab of the newly added tab and configure DHCP as you wish<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18708\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-6.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"674\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-6-300x211.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-6-768x539.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-6.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>We create and enable the captive portal from the <strong>Service<\/strong>-&gt;<strong>Captive portal<\/strong> menu, click on &#8220;<strong>Add<\/strong>&#8221;<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18710\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-7.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"291\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-7-300x91.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-7-768x233.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-7.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Then we enable the service by giving it a name, so we click on <strong>Save &amp; continue<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18712\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-8.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"347\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-8-300x108.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-8-768x278.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-8.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>The page will appear as below, we enable the service<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18714\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-9.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"438\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-9-300x137.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-9-768x350.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-9.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>At this point we select the network or networks on which to enable the <strong>captive portal<\/strong>. In our example we will select <strong>VLAN25<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18716\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-10.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"337\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-10-300x105.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-10-768x270.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-10.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Further down the page we select the type of authentication, in our example we will use local users at the firewall.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18718\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-11.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"444\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-11-300x139.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-11-768x355.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-11.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>From the Vouchers tab we create all the vouchers we want with the &#8220;<strong>Add<\/strong>&#8221; button<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18720\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-12.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"346\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-12-300x108.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-12-768x277.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-12.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Then we select the complexity of the voucher with <strong>Roll#<\/strong><\/p>\n<p>The minutes of connections allowed with the use of these vouchers<\/p>\n<p>And with count how many vouchers to generate<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18722\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-13.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"503\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-13-300x157.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-13-768x402.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-13.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Once saved, we can export the vouchers by clicking on the &#8220;<strong>X<\/strong>&#8221; icon<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18724\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-14.jpg\" alt=\"\" width=\"960\" height=\"390\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-14-300x122.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-14-768x312.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-14.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>An example of an exported file<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18726\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-15.jpg\" alt=\"Captive Portal\" width=\"600\" height=\"672\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-15-268x300.jpg 268w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-15.jpg 600w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>If from VLan25 we try to connect using the <strong>pfsense<\/strong> as gateway, this will send us back to the <strong>Captive Portal<\/strong> page; asking us to authenticate a local user or enter a voucher<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18728\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-16.jpg\" alt=\"Captive Portal\" width=\"600\" height=\"721\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-16-250x300.jpg 250w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-16.jpg 600w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>If we go to the active user tab we will see the active vouchers<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18730\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-17.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"452\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-17-300x141.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-17-768x362.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-17.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>With possibility to see detailed information as in the figure below<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-18732\" src=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-18.jpg\" alt=\"Captive Portal\" width=\"960\" height=\"384\" srcset=\"https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-18-300x120.jpg 300w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-18-768x307.jpg 768w, https:\/\/blog.miniserver.it\/wp-content\/uploads\/CaptivePortal-18.jpg 960w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Il Captive Portal di pfSense ii permettere di accedere alla navigazione tramite inserimento di utenti autorizzati oppure con l\u2019inserimento di un vaucher temporaneo configurabile (tempo di utilizzo, velocit\u00e0 consentita,\u2026).<\/p>\n","protected":false},"author":11,"featured_media":25347,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[124],"tags":[199,138],"class_list":["post-19325","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pfsense","tag-firewall-en","tag-pfsense-en"],"_links":{"self":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/19325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/comments?post=19325"}],"version-history":[{"count":6,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/19325\/revisions"}],"predecessor-version":[{"id":25346,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/19325\/revisions\/25346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media\/25347"}],"wp:attachment":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media?parent=19325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/categories?post=19325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/tags?post=19325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}