{"id":959,"date":"2022-01-08T00:00:00","date_gmt":"2022-01-08T00:00:00","guid":{"rendered":"https:\/\/www.anderson.nl\/?p=959"},"modified":"2022-01-08T00:00:00","modified_gmt":"2022-01-08T00:00:00","slug":"openvpn-server-op-een-raspberry-pi","status":"publish","type":"post","link":"https:\/\/anderson.nl\/?p=959","title":{"rendered":"OpenVPN server op een Raspberry PI"},"content":{"rendered":"\n<p>Het is altijd handig om een VPN naar jouw thuisnetwerk te hebben. Als je in het buitenland bent kunnen je op deze manier toch gebruik maken van bijvoorbeeld de Ziggo Go App enz. We gaan in dit artikel gebruik maken van PIVPN, met deze tool kan je eenvoudig een OpenVPN server opzetten.<\/p>\n\n\n\n<p>Als eerste stap gaan we er zorgen dat de Raspberry Pi helemaal up-to-date is.<br \/><strong><code>sudo apt-get update &amp;&amp; sudo apt-get upgrade<\/code><\/strong><\/p>\n\n\n\n<p>Download de software op de CLI via onderstaand commando.<br \/><code><strong>curl -L https:\/\/install.pivpn.io | bash<\/strong><\/code><\/p>\n\n\n\n<p>Na het downloaden start de tool direct op, klik op <strong>OK<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"125\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2024\/03\/PIVPN01.png\" alt=\"\" class=\"wp-image-1137\" style=\"width:439px;height:71px\"\/><\/figure>\n\n\n\n<p>Het is belangrijk dat de Raspberry Pi altijd hetzelfde IP adres heeft.<br \/>Je kan hiervoor een DHCP reservering maken of een vast IP adres instellen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"202\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-8.png\" alt=\"\" class=\"wp-image-972\" style=\"width:443px;height:116px\"\/><\/figure>\n\n\n\n<p>Ik gebruik een DCHP reservering, kies <strong>Yes<\/strong>, <strong>OK<\/strong> om door te gaan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"288\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-9.png\" alt=\"\" class=\"wp-image-973\" style=\"width:436px;height:163px\"\/><\/figure>\n\n\n\n<p>Gebruiker pi is goed, klik op <strong>OK<\/strong>.<br \/><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"178\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2024\/03\/PIVPN04.png\" alt=\"\" class=\"wp-image-1139\" style=\"width:445px;height:102px\"\/><\/figure>\n\n\n\n<p>Kies in de volgende stap <strong>OpenVPN<\/strong>, <strong>OK<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"480\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-3.png\" alt=\"\" class=\"wp-image-963\" style=\"width:440px;height:274px\"\/><\/figure>\n\n\n\n<p>Kies in volgende scherm No, je kan dan zelf de instellingen bepalen<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"268\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-11.png\" alt=\"\" class=\"wp-image-977\" style=\"width:443px;height:154px\"\/><\/figure>\n\n\n\n<p>Als VPN poort is 1194 goed of kies een eigen poort, <strong>OK<\/strong>. Bevestig de poort met <strong>Yes<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"145\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-4.png\" alt=\"\" class=\"wp-image-965\" style=\"width:441px;height:83px\"\/><\/figure>\n\n\n\n<p>Kies bij DNS provider bijvoorbeeld Google of Custom als je een andere voorkeur hebt.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"481\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-12.png\" alt=\"\" class=\"wp-image-979\" style=\"width:446px;height:279px\"\/><\/figure>\n\n\n\n<p>In de volgende stap kan je aangeven dat jou externe IP gebruikt wordt of kies een dns record op jou domein, zoals vpn.pidemo.nl, <strong>OK<\/strong>. Als hebt gekozen voor een DNS Entry type je deze in, <strong>OK<\/strong> en bevestig dit met <strong>Yes<\/strong>, <strong>OK<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"137\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2024\/03\/PIVPN10-1.png\" alt=\"\" class=\"wp-image-1143\" style=\"width:448px;height:109px\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"129\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-15.png\" alt=\"\" class=\"wp-image-983\" style=\"width:454px;height:76px\"\/><\/figure>\n\n\n\n<p>De OpenVPN server wil af en toe wat updates installeren, lijkt me een goed plan, <strong>OK<\/strong>, <strong>Yes<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"219\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-16.png\" alt=\"\" class=\"wp-image-985\" style=\"width:457px;height:129px\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"138\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2024\/03\/PIVPN13.png\" alt=\"\" class=\"wp-image-1145\" style=\"width:458px;height:83px\"\/><\/figure>\n\n\n\n<p>Klik op <strong>OK<\/strong>, <strong>Yes<\/strong>, <strong>OK<\/strong> om opnieuw te starten.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"265\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2022\/01\/image-18.png\" alt=\"\" class=\"wp-image-989\" style=\"width:461px;height:158px\"\/><\/figure>\n\n\n\n<p>Meld weer aan op de Raspberry en type het onderstaande commando om VPN profielen toe te voegen.<br \/><strong><code>pivpn add<\/code><\/strong><\/p>\n\n\n\n<p>Vul de computernaam in waarmee je verbinding wil maken naar deze OpenVPN server.<br \/>Vul de verloopdatum in van het certificaat.<br \/>Vul een wachtwoord in.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"890\" src=\"http:\/\/anderson.nl\/wp-content\/uploads\/2024\/03\/PIVPN20.png\" alt=\"\" class=\"wp-image-1147\" style=\"width:481px;height:450px\"\/><\/figure>\n\n\n\n<p>Je Profile is nu opgeslagen in <strong>\/home\/pi\/ovpn<\/strong>, dit profile heb je nodig in de OpenVPN Client. De client kan je downloaden vanaf https:\/\/openvpn.net\/client-connect-vpn-for-windows\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Het is altijd handig om een VPN naar jouw thuisnetwerk te hebben. Als je in het buitenland bent kunnen je op deze manier toch gebruik maken van bijvoorbeeld de Ziggo Go App enz. We gaan in dit artikel gebruik maken van PIVPN, met deze tool kan je eenvoudig een OpenVPN <a href=\"https:\/\/anderson.nl\/?p=959\" class=\"btn btn-link continue-link\">Lees verder<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,10,14,19],"tags":[],"class_list":["post-959","post","type-post","status-publish","format-standard","hentry","category-linux","category-macos","category-raspberry-pi","category-windows-10"],"_links":{"self":[{"href":"https:\/\/anderson.nl\/index.php?rest_route=\/wp\/v2\/posts\/959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anderson.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anderson.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anderson.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anderson.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=959"}],"version-history":[{"count":0,"href":"https:\/\/anderson.nl\/index.php?rest_route=\/wp\/v2\/posts\/959\/revisions"}],"wp:attachment":[{"href":"https:\/\/anderson.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anderson.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anderson.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}