{"id":15595,"date":"2018-07-25T10:47:35","date_gmt":"2018-07-25T10:47:35","guid":{"rendered":"https:\/\/www.firewallhardware.it\/creare-una-vpn-road-warrior-client-to-gateway-con-pfsense-e-openvpn\/"},"modified":"2019-11-11T11:26:26","modified_gmt":"2019-11-11T11:26:26","slug":"create-a-road-warrior-vpn-client-to-gateway-with-pfsense-and-openvpn","status":"publish","type":"post","link":"https:\/\/blog.miniserver.it\/en\/firewall\/create-a-road-warrior-vpn-client-to-gateway-with-pfsense-and-openvpn\/","title":{"rendered":"Create a Road Warrior VPN (client-to-gateway) with PfSense and OpenVpn"},"content":{"rendered":"<p>[vc_row css=&#8221;.vc_custom_1517220328543{margin-top: 30px !important;}&#8221;]This article describes how to build an OpenVpn server with<br \/>\nSSL\/TLS + Auth authentication with PfSense Release 2.4.3.p1JTVCYWRyb3RhdGUlMjBiYW5uZXIlM0QlMjIzJTIyJTVE<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Create 3 certificates<\/h3>\n<p>[vc_separator border_width=&#8221;2&#8243; css=&#8221;.vc_custom_1519892703184{margin-top: -20px !important;}&#8221;]CA certificate: <strong>System<\/strong> -&gt; <strong>Cert.Manager<\/strong> reward the green &#8220;ADD&#8221; button below to create the CA certificate and fill in the fields as shown in the figure:[vc_single_image image=&#8221;15569&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338165581{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]<strong>Method<\/strong>: Create an Internal Certificate Authority<br \/>\n<strong>Key Length<\/strong>: 2048<br \/>\n<strong>Digest Algorithm<\/strong>: sha256<br \/>\n<strong>Lifetime<\/strong>: 3650<br \/>\n<strong>Country Code<\/strong>: IT<br \/>\n<strong>State or Province<\/strong>: \u00a0&lt;your data&gt;<br \/>\n<strong>City<\/strong>: &lt;your city&gt;<br \/>\n<strong>Organization<\/strong>:&lt; Company&gt;<br \/>\n<strong>Email Address<\/strong>: &lt;email&gt;<br \/>\n<strong>Common Name<\/strong>: &lt; optional&gt;<\/p>\n<p>Click on <strong>Save.<\/strong>[vc_separator border_width=&#8221;2&#8243; css=&#8221;.vc_custom_1519892703184{margin-top: -20px !important;}&#8221;]Certificate for the server: <strong>System<\/strong> \u00e0 <strong>Cert.Manager<\/strong> \u00e0 <strong>certificates<\/strong>, click here on the green Add button, the screen is the same as the previous one but follow this guidelines on this image:[vc_single_image image=&#8221;15573&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338177506{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]User certificate: as above but select Client certificate instead of server.<br \/>\n<strong>VPN <\/strong>\u00e0 <strong>Openvon<\/strong> \u00e0 <strong>Wizard<\/strong>: in the first mask that appears select local user access[vc_single_image image=&#8221;15575&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338187609{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]Click on &#8220;<strong>Next<\/strong>&#8220;<\/p>\n<p>Select the CA certificate created, click &#8220;Next&#8221; select the server certificate, click &#8220;Next&#8221; select the WAN interface, the UDP protocol (or TCP) and the 1194 port (this is the default one but you can put the one you prefer), and finally a description of the server.[vc_single_image image=&#8221;15577&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338195746{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]Click on the end and go on: for the server configuration we leave you to the following images[vc_single_image image=&#8221;15593&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338205368{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;][vc_single_image image=&#8221;15591&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338218747{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]<strong>IPv4 Tunnel network: <\/strong>the virtual network that will use OpenVPN<strong>. IPv4 local network: <\/strong>the LAN network of the firewall, for example<strong> &#8220;192.168.0.0\/24&#8221;. <\/strong>You can click, if you want, to<strong> force all the client generated trafic throught the tunnel. <\/strong>Leave everything as default as in the images below and then save everything.[vc_single_image image=&#8221;15589&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; css=&#8221;.vc_custom_1532589489117{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;][vc_single_image image=&#8221;15587&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338227365{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]To export user certificates, we recommend installing <strong>openvpn-client-export<\/strong> from <strong>System -&gt; package Manager<\/strong> and selecting <strong>Available packages<\/strong>.<\/p>\n<p>To create the user: <strong>System -&gt; User Manager<\/strong> create the user by entering the values \u200b\u200bby name, a password, full name, click the check on certifacte to create the certificate for the user, in certificate authority, select the CA certificate..<\/p>\n<p>It is possible to create a group called <strong>VpnUsers<\/strong> and then confine all vpn users in it.[vc_single_image image=&#8221;15585&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338236525{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]To export the user: <strong>VPN \u2013&gt; Openvpn<\/strong>\u00a0\u00e0<strong>client export<\/strong><\/p>\n<p>In the window <strong>Host name<\/strong> you will have to put the public IP of the WAN; going down, the list of users created with a valid certificate will appear. Pressing on the blue buttons will allow us to download the most suitable application for our device..[vc_single_image image=&#8221;15583&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338250597{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Do not forget to:<\/h3>\n<p>[vc_separator border_width=&#8221;2&#8243; css=&#8221;.vc_custom_1519892703184{margin-top: -20px !important;}&#8221;]<\/p>\n<ul>\n<li>Open the port on the WAN<\/li>\n<\/ul>\n<p>[vc_single_image image=&#8221;15581&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338258750{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]<\/p>\n<ul>\n<li>Enable traffic on the OpenVPN interface<\/li>\n<\/ul>\n<p>[vc_single_image image=&#8221;15579&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221; css=&#8221;.vc_custom_1539338267682{margin-top: -20px !important;padding-top: 10px !important;padding-right: 10px !important;padding-bottom: 10px !important;padding-left: 10px !important;background-color: #f4f4f2 !important;}&#8221;]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article describes how to build an OpenVpn server with SSL\/TLS + Auth authentication with PfSense Release 2.4.3.p1<\/p>\n","protected":false},"author":11,"featured_media":13991,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[123,128],"tags":[137,138],"class_list":["post-15595","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-firewall","category-hardware","tag-opnsense-en","tag-pfsense-en"],"_links":{"self":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/15595","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=15595"}],"version-history":[{"count":8,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/15595\/revisions"}],"predecessor-version":[{"id":18968,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/15595\/revisions\/18968"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media\/13991"}],"wp:attachment":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media?parent=15595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/categories?post=15595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/tags?post=15595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}