{"id":2114,"date":"2022-04-23T20:07:19","date_gmt":"2022-04-23T20:07:19","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=2114"},"modified":"2023-08-28T09:24:04","modified_gmt":"2023-08-28T09:24:04","slug":"how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/es\/como-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota\/","title":{"rendered":"Configurar un servidor VPN con Raspberry Pi"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"600\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg\" alt=\"raspberry pi vpn\" class=\"wp-image-2170\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg 1000w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn-300x180.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn-768x461.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn-18x12.jpg 18w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>This article covers how to turn your Raspberry Pi into a VPN server.<\/p>\n\n\n\n<p>I was inspired when one of my friends was going away on a long trip and wanted a VPN.<\/p>\n\n\n\n<p>The benefit of having a VPN, he explained, was that it allowed him to access his home network and files.<\/p>\n\n\n\n<p>That\u2019s pretty standard.<\/p>\n\n\n\n<p>He also mentioned that he\u2019d have an easier time logging into banking apps and other services if he logs in through his home network.<\/p>\n\n\n\n<p>Having an overseas IP address throws red flags and it would cause him to need to do Captcha tests and 2FAs.<\/p>\n\n\n\n<p>So that made me think of whether the Raspberry Pi would work in this case.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Check your router first<\/h2>\n\n\n\n<p>An important detail here is to check whether your router can act as a VPN server.<\/p>\n\n\n\n<p>That would be the most reliable solution. Frankly, it was also the easiest and least tedious solution.<\/p>\n\n\n\n<p>I have a TP-Link Archer C7 which has the ability to run a VPN server using OpenVPN or PPTP VPN. In less than five minutes, I <a href=\"https:\/\/www.tp-link.com\/us\/user-guides\/archer-a7&amp;c7_v5\/chapter-14-vpn-server#ug-sub-title-1\">followed the instructions<\/a> and managed to get it running.&nbsp;<\/p>\n\n\n\n<p>Then all I had to do was install OpenVPN on my devices and use the configuration file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/QX6C5CJUyteysRogDt1oXIm-ukqg9HapydBEX4agvilf7NWJTovjnHS09vxyxbfxmtFl2H766GNATlAdvUImheIEBHs2rg_t7yjjddYLCwM4QRYgV8iOZplyFfhBnlPz8I2gXEV5\" alt=\"\" style=\"width:679px;height:599px\" width=\"679\" height=\"599\"\/><\/figure>\n<\/div>\n\n\n<p>If, however, you have a router that doesn\u2019t support VPN connections, then follow along\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What do I need to create a Raspberry Pi server?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/hardware-for-vpn-raspberry-pi-1-1000px.jpg\" alt=\"Ethernet cable, Raspberry Pi and router to set up a PiVPN\" class=\"wp-image-2116\" style=\"width:700px;height:525px\" width=\"700\" height=\"525\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/hardware-for-vpn-raspberry-pi-1-1000px.jpg 1000w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/hardware-for-vpn-raspberry-pi-1-1000px-300x225.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/hardware-for-vpn-raspberry-pi-1-1000px-768x576.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/hardware-for-vpn-raspberry-pi-1-1000px-16x12.jpg 16w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\">Ethernet cable, Raspberry Pi and router<\/figcaption><\/figure>\n<\/div>\n\n\n<p>First and foremost, you will need a Raspberry Pi.&nbsp;<\/p>\n\n\n\n<p>It would be ideal to have a Raspberry Pi with a wired ethernet connection such as the Raspberry Pi 4 for maximum reliability and speed.<\/p>\n\n\n\n<p>If you choose these devices, then, you will need an ethernet cable to connect the Raspberry Pi to your router.<\/p>\n\n\n\n<p>And in order to ensure your Raspberry Pi is connected via wired ethernet, you should disable the wireless connection.<\/p>\n\n\n\n<p>However, PiVPN has successfully run on a Zero-series Raspberry Pi, so you could use that too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install PiVPN<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"312\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image.png\" alt=\"PiVPN logo\" class=\"wp-image-2117\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image.png 486w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-300x193.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-18x12.png 18w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><figcaption class=\"wp-element-caption\">PiVPN logo<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Head to <a href=\"https:\/\/pivpn.io\/\">pivpn.io<\/a> for more information about the software.<\/p>\n\n\n\n<p>To install it, run the installation command <strong>curl -L https:\/\/install.pivpn.io | bash <\/strong>in your Terminal.<\/p>\n\n\n\n<p>This step can take a while, but once it\u2019s done, you will see this intro screen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DHCP Reservation<\/h2>\n\n\n\n<p>The PiVPN is a server, so it needs to have a static IP address to function properly.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If you are able to create a DHCP reservation\u2026<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-1024x576.png\" alt=\"\" class=\"wp-image-2118\" style=\"width:729px;height:410px\" width=\"729\" height=\"410\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-1024x576.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-768x432.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-1536x864.png 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/dhcp-reservation-tplink-raspberry-pi.png 1920w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/figure>\n<\/div>\n\n\n<p>Not all routers allow you to create a DHCP reservation, so if you can&#8217;t find a section for this setting, skip to the next section.<\/p>\n\n\n\n<p>I have a separate modem and a router that I bought so I could create a DHCP reservation to ensure PiVPN is on the same IP address all the time.<\/p>\n\n\n\n<p>Every router is a bit different, so you\u2019d have to Google the exact instructions for creating a DHCP reservation for your router.<\/p>\n\n\n\n<p>In case you use a TP-Link Archer C7, like I do, you\u2019d go to <strong>Advanced &gt; Network &gt; DHCP Server<\/strong>.<\/p>\n\n\n\n<p>Under the <strong>Address Reservation<\/strong> section, I clicked on <strong>Add<\/strong>. I needed my MAC Address (not shown in PiVPN) and the IP address provided by PiVPN.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Finding your MAC Address<\/h4>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/finding-mac-address-raspberry-pi.jpg\" alt=\"finding mac address raspberry pi\" class=\"wp-image-2119\" style=\"width:653px;height:577px\" width=\"653\" height=\"577\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/finding-mac-address-raspberry-pi.jpg 944w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/finding-mac-address-raspberry-pi-300x265.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/finding-mac-address-raspberry-pi-768x679.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/finding-mac-address-raspberry-pi-14x12.jpg 14w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><figcaption class=\"wp-element-caption\">You can usually find your Raspberry Pi&#8217;s MAC address through your router or use <strong>ifconfig<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>There are two ways you can find your MAC address.&nbsp;<\/p>\n\n\n\n<p>Most conveniently, my TP-Link router displayed my MAC address \u201cDC-A6-32-88-AC-97\u201d in the table of DHCP clients.<\/p>\n\n\n\n<p>Alternatively, you can open up a Terminal and type in <strong>ifconfig<\/strong>.<\/p>\n\n\n\n<p>Since you\u2019re connected via wired ethernet, look for \u201ceth0\u201d and on the line where it says <strong>ether<\/strong>, that\u2019s where your MAC address is.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If you can\u2019t create a DHCP reservation,<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1-1024x696.png\" alt=\"dhcp reservation raspberry pi vpn or static ip address\" class=\"wp-image-2120\" style=\"width:689px;height:468px\" width=\"689\" height=\"468\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1-1024x696.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1-300x204.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1-768x522.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-1.png 1136w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/figure>\n<\/div>\n\n\n<p>In this menu, press \u201cNo\u201d to set up a static IP address.<\/p>\n\n\n\n<p>In the next menu, you will need to configure your static IP address to something that is not within the range of IP addresses that your router will assign devices.<\/p>\n\n\n\n<p>For example, my router assigns connected devices an IP address 192.168.0.100 to 192.168.0.249. So, I can assign PiVPN an IP address of 192.168.0.250.<\/p>\n\n\n\n<p>It\u2019ll then ask you for the gateway IP address. You can leave this as default unless you have a different gateway. It\u2019s usually the IP address of your router.<\/p>\n\n\n\n<p>Finally, press OK on PiVPN until you reach the \u201cLocal Users\u201d page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Local users<\/h2>\n\n\n\n<p>In the \u201cChoose A User\u201d page, I chose the one and only user, pi.<\/p>\n\n\n\n<p>In the latest updates of the Raspberry Pi OS, you no longer have \u201cpi\u201d as a default user, so just be aware.<\/p>\n\n\n\n<p>Press OK.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation Mode<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2-1024x696.png\" alt=\"raspberry pi vpn wireguard\" class=\"wp-image-2121\" style=\"width:669px;height:455px\" width=\"669\" height=\"455\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2-1024x696.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2-300x204.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2-768x522.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-2.png 1135w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/figure>\n<\/div>\n\n\n<p>Here, it\u2019ll ask you whether you want to use WireGuard or OpenVPN. I went with WireGuard because it was recommended.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Default Wireguard Port<\/h2>\n\n\n\n<p>Unless you need another port, you can just press OK and use the default 51820 port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DNS Provider<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3-1024x692.png\" alt=\"choose google for dns provider pivpn raspberry pi vpn\" class=\"wp-image-2122\" style=\"width:639px;height:432px\" width=\"639\" height=\"432\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3-1024x692.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3-300x203.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3-768x519.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-3.png 1134w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/figure>\n<\/div>\n\n\n<p>There are many choices for DNS providers here and I just went with Google for the ease of set up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Public IP or DNS<\/h2>\n\n\n\n<p>What you\u2019re seeing here is your public IP address and this will be the IP address you\u2019ll use to connect to your VPN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unattended Upgrades<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4-1024x701.png\" alt=\"unattended upgrades pivpn\" class=\"wp-image-2123\" style=\"width:665px;height:455px\" width=\"665\" height=\"455\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4-1024x701.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4-300x205.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4-768x526.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-4.png 1133w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n<\/div>\n\n\n<p>I enabled unattended upgrades because I wanted the security upgrades.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Time to add client profiles<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5-1024x697.png\" alt=\"Use pivpn add to add a client, then use pivpn -qr to get a QR code for your phone to scan\" class=\"wp-image-2124\" style=\"width:674px;height:459px\" width=\"674\" height=\"459\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5-1024x697.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5-300x204.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5-768x523.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-5.png 1138w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><figcaption class=\"wp-element-caption\">Use <strong>pivpn add<\/strong> to add a client, then use <strong>pivpn -qr <\/strong>to get a QR code for your phone to scan<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Sweet! You\u2019ve made it to the \u201cInstallation Complete\u201d menu.<\/p>\n\n\n\n<p>Setting PiVPN up on the Raspberry Pi is half the battle. The next half is configuring your client profiles so that you can connect computers, phones and other devices to it.<\/p>\n\n\n\n<p>Here\u2019s how:<\/p>\n\n\n\n<p>Open up a Terminal and type \u201cpivpn add\u201d<\/p>\n\n\n\n<p>Enter a name for the client. You can use something like \u201cclient1\u201d, \u201cclient2\u201d or something more intuitive like \u201csmartphone\u201d, \u201ctelevision\u201d, etc.<\/p>\n\n\n\n<p>Press Enter.<\/p>\n\n\n\n<p>When it\u2019s done, you will see a message saying it\u2019s done.<\/p>\n\n\n\n<p>PiVPN would have generated a .conf file that you can use with Wireguard apps.<\/p>\n\n\n\n<p>However, there\u2019s an even easier way to get the configuration onto your phone.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up an Android phone<\/h3>\n\n\n\n<p>In the same terminal, enter <strong>pivpn -qr<\/strong><\/p>\n\n\n\n<p>Then, enter the client that you want. There\u2019s only one right now named \u201csmartphone\u201d.<\/p>\n\n\n\n<p>So, enter \u201csmartphone\u201d and press enter.<\/p>\n\n\n\n<p>If everything goes well, you will see a QR code that you can scan with the Wireguard app on your smartphone.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"387\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-6.png\" alt=\"Encoding problems leads to a garbled PiVPN QR code\" class=\"wp-image-2125\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-6.png 564w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-6-300x206.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-6-18x12.png 18w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><figcaption class=\"wp-element-caption\">Encoding problems leads to a garbled PiVPN QR code<\/figcaption><\/figure>\n<\/div>\n\n\n<p>However, if it doesn\u2019t, it will look garbled. This is because the encoding of your Terminal is wrong.<\/p>\n\n\n\n<p>If this happens to you, you can copy the smartphone.conf file onto your phone and point the Wireguard app to the file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code-1024x498.jpg\" alt=\"wireguard pivpn qr code\" class=\"wp-image-2126\" style=\"width:701px;height:341px\" width=\"701\" height=\"341\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code-1024x498.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code-300x146.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code-768x374.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code-18x9.jpg 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/wireguard-pivpn-qr-code.jpg 1480w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><figcaption class=\"wp-element-caption\">Wireguard Android app scanning QR code<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Another way is to try to ssh into the Raspberry Pi and run the command <strong>qrencode -t ansiutf8 &lt; \/home\/pi\/configs\/smartphone.conf <\/strong>(change \u201csmartphone\u201d to whatever you named your client).<\/p>\n\n\n\n<p>The QR code was generated successfully when I used ssh on my Windows computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up WireGuard on your computer<\/h3>\n\n\n\n<p>There are two things you need to do. Download the WireGuard app for your computer and also get the .conf file from your Raspberry Pi.<\/p>\n\n\n\n<p>You can download the <a href=\"https:\/\/www.wireguard.com\/install\/\">WireGuard app for Windows, Linux and Mac here<\/a>.<\/p>\n\n\n\n<p>Once you have that, create a new profile by using <strong>pivpn add<\/strong>.&nbsp;<\/p>\n\n\n\n<p>Type in the name of your config file. I used <strong>msi-pc<\/strong>, which generates a <strong>msi-pc.conf<\/strong> file.<\/p>\n\n\n\n<p>In order to copy the file to your PC, the easiest way is to copy it using a command. You should have SSH access enabled on the Raspberry Pi OS.<\/p>\n\n\n\n<p>If you are on Windows like I am, you would use this command:<\/p>\n\n\n\n<p>pscp.exe <strong>[your-user-name]<\/strong>@<strong>[your-pi-ip-address]<\/strong>:\/home\/pi\/configs\/<strong>[wireguard file].conf<\/strong> <strong>[local-dir]<\/strong><\/p>\n\n\n\n<p>Here\u2019s what mine turned out to be like:<\/p>\n\n\n\n<p><strong>pscp.exe pi@192.168.0.241:\/home\/pi\/configs\/msi-pc.conf<\/strong><\/p>\n\n\n\n<p>In the app, press \u201cAdd Tunnel\u201d and locate your .conf file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7-1024x359.png\" alt=\"\" class=\"wp-image-2129\" style=\"width:710px;height:249px\" width=\"710\" height=\"249\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7-1024x359.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7-300x105.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7-768x269.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7-18x6.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-7.png 1521w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/figure>\n<\/div>\n\n\n<p>Activate and you are done!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup port forwarding on your router<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/HI1Dw1BTiRtIazRZ5kS_R2CvM_lErhfXUXxB87JlFMIauYZK-TaiZeLZZHYbXBaac_e4plRRp-Q2biky0EyZvmnsmgR90b6xAwKQlbfMwAy15Jf06wU_OBIpwcw2-RknmV6oE2P9\" alt=\"\" style=\"width:684px;height:563px\" width=\"684\" height=\"563\"\/><\/figure>\n<\/div>\n\n\n<p>If you\u2019ve followed the steps up until now, you will be able to enable the toggle on your Wireguard app, but you won\u2019t be able to get on the internet.<\/p>\n\n\n\n<p>That\u2019s because you need to configure your router so that it points traffic accessing port 51820 to your Raspberry Pi.<\/p>\n\n\n\n<p>In order to do this, go to the port forwarding menu on your router. On my TP-Link Archer router, it was accessible in <strong>Advanced &gt; NAT Forwarding &gt; Virtual Servers<\/strong>.<\/p>\n\n\n\n<p>You\u2019ll know you\u2019re in the right place when it asks you for an external and internal port and an internal IP address.<\/p>\n\n\n\n<p>This screen is basically asking, \u201cif we get traffic from the interwebs using port 51820, which device do we send it to and which port?.<\/p>\n\n\n\n<p>In this case, the external and internal ports are <strong>51820<\/strong>, Wireguard\u2019s default. Protocol is <strong>UDP<\/strong> and <strong>Internal IP <\/strong>is your Pi\u2019s IP address.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do I know my VPN is working?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"481\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/vpn-off-vpn-on.jpg\" alt=\"testing vpn if working\" class=\"wp-image-2142\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/vpn-off-vpn-on.jpg 657w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/vpn-off-vpn-on-300x220.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/vpn-off-vpn-on-16x12.jpg 16w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/figure>\n<\/div>\n\n\n<p>You&#8217;ll know your VPN is working if your IP address changes.<\/p>\n\n\n\n<p>In order to test my smartphone&#8217;s VPN connection, I first went to find my IP address before I connected to the VPN.<\/p>\n\n\n\n<p>The VPN said my address was XXX.XX.88.241<\/p>\n\n\n\n<p>I connected to my VPN and my IP address changed to XXX.XXX.169.39.<\/p>\n\n\n\n<p>So, if there is a change in your IP address, that means that you have successfully connected.<\/p>\n\n\n\n<p>There are many services out there. You could even just Google &#8220;what is my IP address&#8221; and Google might be able to tell you on the search result page. Or else, I used <a href=\"https:\/\/whatismyip.com\" rel=\"nofollow\">whatismyip.com<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What happens if my internet IP changes?<\/h2>\n\n\n\n<p>Sometimes, you might not get the same IP address when you reset your router. Power outages, accidental yanks of power cords can happen.&nbsp;<\/p>\n\n\n\n<p>The question is\u2026 how do you find your new IP address when you\u2019re not at home and desperately need to connect to your VPN?<\/p>\n\n\n\n<p>Our software <strong>PiCockpit<\/strong> makes it easy to find out what your public IP is.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8-1024x571.png\" alt=\"\" class=\"wp-image-2131\" style=\"width:669px;height:373px\" width=\"669\" height=\"373\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8-1024x571.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8-300x167.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8-768x428.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/image-8.png 1064w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/figure>\n<\/div>\n\n\n<p>In the screenshot above, that is my public IP. If it ever changes, you can update your .conf files with the new endpoint address.<\/p>\n\n\n\n<p>PiCockpit will also allow you to reboot and diagnose issues with your Raspberry Pi remotely through its web interface.<\/p>\n\n\n\n<p><a href=\"https:\/\/picockpit.com\/raspberry-pi\/installation-of-picockpit\/\">Follow this guide to install PiCockpit.<\/a><\/p>\n\n\n\n<p>Alternatively, you can also get a dynamic DNS service and a hostname. <a href=\"https:\/\/docs.pivpn.io\/faq\/#my-isp-doesnt-give-me-a-static-external-ip-address-and-my-server-ip-address-keeps-changing\" rel=\"nofollow\">Here&#8217;s a guide<\/a>.<\/p>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fcomo-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota%2F&text=Set%20up%20a%20VPN%20Server%20with%20Raspberry%20Pi\" title=\"Compartir en X\" aria-label=\"Compartir en X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fcomo-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota%2F\" title=\"Compartir en Facebook\" aria-label=\"Compartir en Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fcomo-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota%2F&text=Set%20up%20a%20VPN%20Server%20with%20Raspberry%20Pi\" title=\"Compartir en Telegram\" aria-label=\"Compartir en Telegram\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">compartir<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fes%2Fcomo-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota%2F\" title=\"Compartir en Reddit\" aria-label=\"Compartir en Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">compartir<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>Este art\u00edculo explica c\u00f3mo convertir tu Raspberry Pi en un servidor VPN. Me inspir\u00e9 en uno de mis amigos que se iba de viaje y quer\u00eda una VPN. La ventaja de tener una VPN, me explic\u00f3, era que le permit\u00eda acceder a su red dom\u00e9stica y a sus archivos. Es bastante est\u00e1ndar....<\/p>","protected":false},"author":2,"featured_media":2170,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[701,695,700,698,486,447,187,571,694,699,697],"class_list":["post-2114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-how-to","tag-dhcp","tag-ip-address","tag-pivpn","tag-privacy","tag-project","tag-projects","tag-raspberry-pi","tag-raspberry-pi-project","tag-router","tag-security","tag-vpn"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Set up a VPN Server with Raspberry Pi | PiCockpit<\/title>\n<meta name=\"description\" content=\"A VPN server on your Raspberry Pi can increase privacy and give you access to files on a home network. Here&#039;s how to set up yours.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/es\/como-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set up a VPN Server with Raspberry Pi | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"A VPN server on your Raspberry Pi can increase privacy and give you access to files on a home network. Here&#039;s how to set up yours.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/es\/como-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-23T20:07:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-28T09:24:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"raspi berry\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"raspi berry\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/\"},\"author\":{\"name\":\"raspi berry\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\"},\"headline\":\"Set up a VPN Server with Raspberry Pi\",\"datePublished\":\"2022-04-23T20:07:19+00:00\",\"dateModified\":\"2023-08-28T09:24:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/\"},\"wordCount\":1751,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/raspberry-pi-vpn.jpg\",\"keywords\":[\"dhcp\",\"ip address\",\"pivpn\",\"privacy\",\"project\",\"Projects\",\"Raspberry Pi\",\"Raspberry Pi project\",\"router\",\"security\",\"vpn\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/\",\"name\":\"Set up a VPN Server with Raspberry Pi | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/raspberry-pi-vpn.jpg\",\"datePublished\":\"2022-04-23T20:07:19+00:00\",\"dateModified\":\"2023-08-28T09:24:04+00:00\",\"description\":\"A VPN server on your Raspberry Pi can increase privacy and give you access to files on a home network. Here's how to set up yours.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/raspberry-pi-vpn.jpg\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/raspberry-pi-vpn.jpg\",\"width\":1000,\"height\":600,\"caption\":\"raspberry pi vpn\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/raspberry-pi-how-to\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Set up a VPN Server with Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\",\"name\":\"raspi berry\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"caption\":\"raspi berry\"},\"description\":\"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)\",\"sameAs\":[\"https:\\\/\\\/picockpit.com\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/es\\\/author\\\/raspi-berry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configurar un servidor VPN con Raspberry Pi | PiCockpit","description":"Un servidor VPN en tu Raspberry Pi puede aumentar la privacidad y darte acceso a los archivos de una red dom\u00e9stica. Aqu\u00ed te explicamos c\u00f3mo configurar el tuyo.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/es\/como-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota\/","og_locale":"es_ES","og_type":"article","og_title":"Set up a VPN Server with Raspberry Pi | PiCockpit","og_description":"A VPN server on your Raspberry Pi can increase privacy and give you access to files on a home network. Here's how to set up yours.","og_url":"https:\/\/picockpit.com\/raspberry-pi\/es\/como-configurar-una-vpn-con-raspberry-pi-para-trabajar-de-forma-remota\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2022-04-23T20:07:19+00:00","article_modified_time":"2023-08-28T09:24:04+00:00","og_image":[{"width":1000,"height":600,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg","type":"image\/jpeg"}],"author":"raspi berry","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"Escrito por":"raspi berry","Tiempo de lectura":"11 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/"},"author":{"name":"raspi berry","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee"},"headline":"Set up a VPN Server with Raspberry Pi","datePublished":"2022-04-23T20:07:19+00:00","dateModified":"2023-08-28T09:24:04+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/"},"wordCount":1751,"commentCount":4,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg","keywords":["dhcp","ip address","pivpn","privacy","project","Projects","Raspberry Pi","Raspberry Pi project","router","security","vpn"],"articleSection":["Tutorials"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/","url":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/","name":"Configurar un servidor VPN con Raspberry Pi | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg","datePublished":"2022-04-23T20:07:19+00:00","dateModified":"2023-08-28T09:24:04+00:00","description":"Un servidor VPN en tu Raspberry Pi puede aumentar la privacidad y darte acceso a los archivos de una red dom\u00e9stica. Aqu\u00ed te explicamos c\u00f3mo configurar el tuyo.","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/04\/raspberry-pi-vpn.jpg","width":1000,"height":600,"caption":"raspberry pi vpn"},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/how-to-set-up-a-vpn-with-raspberry-pi-for-remote-working\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/raspberry-pi-how-to\/"},{"@type":"ListItem","position":3,"name":"Set up a VPN Server with Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"PiCockpit","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee","name":"baya raspada","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","caption":"raspi berry"},"description":"Estoy aqu\u00ed para ayudarte con todas tus preguntas relacionadas con la Raspberry Pi y me encanta compartir sobre nuevas ideas de proyectos para la Raspberry Pi, y dar consejos r\u00e1pidos. Por supuesto, tambi\u00e9n te ayudar\u00e9 con PiCockpit y c\u00f3mo hacer que tu Raspberry Pi sea a\u00fan m\u00e1s f\u00e1cil de usar con esta soluci\u00f3n de monitoreo de la frambuesa Pi :-)","sameAs":["https:\/\/picockpit.com"],"url":"https:\/\/picockpit.com\/raspberry-pi\/es\/author\/raspi-berry\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/2114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/comments?post=2114"}],"version-history":[{"count":12,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/2114\/revisions"}],"predecessor-version":[{"id":4971,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/posts\/2114\/revisions\/4971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/media\/2170"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/media?parent=2114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/categories?post=2114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/es\/wp-json\/wp\/v2\/tags?post=2114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}