<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ vpn - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ vpn - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 30 May 2026 22:25:33 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/vpn/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ VPNs vs Proxies: What are the Differences? ]]>
                </title>
                <description>
                    <![CDATA[ In the age of online privacy, two tools are often mentioned together: VPNs and proxies. Both hide your IP address and help you browse the internet more privately, but they work in different ways and serve different purposes. From simple security to w... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/vpns-vs-proxies-what-are-the-differences/</link>
                <guid isPermaLink="false">690e629981a4964f4b12b422</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Fri, 07 Nov 2025 21:20:25 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1762549605269/165d4e53-a54e-46b7-95b6-f2b76bcdfc53.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In the age of online privacy, two tools are often mentioned together: VPNs and proxies.</p>
<p>Both hide your IP address and help you browse the internet more privately, but they work in different ways and serve different purposes. From simple security to web scraping for LLM training, both serve various purposes for businesses.</p>
<p>If you have ever wondered which one you should use, this article will help you understand how they work, their main differences, and where residential proxies fit into the picture.</p>
<h2 id="heading-what-well-cover">What We’ll Cover</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-a-vpn">What is a VPN?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-a-proxy">What is a Proxy?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-core-difference-between-vpns-and-proxies">The Core Difference Between VPNs and Proxies</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-performance-and-speed">Performance and Speed</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-use-cases-for-vpns">Use Cases for VPNs</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-use-cases-for-proxies">Use Cases for Proxies</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-combine-vpns-and-residential-proxies">How to Combine VPNs and Residential Proxies</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-which-one-should-you-choose">Which One Should You Choose?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-the-future-of-privacy-tools">The Future of Privacy Tools</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-what-is-a-vpn">What is a VPN?</h2>
<p>A <a target="_blank" href="https://en.wikipedia.org/wiki/Virtual_private_network">Virtual Private Network</a>, or VPN, is a service that creates a secure and encrypted tunnel between your device and the internet.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762778687218/416de0f8-f05e-4e2f-a52a-e6f029594dcc.png" alt="VPN Architecture" class="image--center mx-auto" width="855" height="318" loading="lazy"></p>
<p>When you connect to a VPN, all your traffic passes through a remote server operated by the VPN provider. This hides your real IP address and encrypts everything you send or receive.</p>
<p>VPNs are often used by individuals who want to protect their privacy or access content that is restricted in their region.</p>
<p>For example, someone in India can use a VPN to connect to a U.S. server and access websites that are available only in the United States. Because the connection is encrypted, internet service providers and hackers cannot see which websites you visit or what data you exchange.</p>
<h2 id="heading-what-is-a-proxy">What is a Proxy?</h2>
<p>A <a target="_blank" href="https://en.wikipedia.org/wiki/Proxy_server">proxy</a> acts as a middleman between your device and the internet.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762778705089/7b52dbba-a479-428e-843b-caea962386e8.png" alt="Proxy Architecture" class="image--center mx-auto" width="1000" height="563" loading="lazy"></p>
<p>When you connect to a proxy, your request is first sent to the proxy server, which then forwards it to the target website. The website sees the proxy’s IP address instead of your own.</p>
<p>Unlike VPNs, proxies usually do not encrypt your traffic. This means that while your IP address is hidden, the data itself can still be visible to others.</p>
<p>Proxies are often used for tasks like web scraping, managing multiple social media accounts, or accessing geo-restricted sites in a lightweight way.</p>
<p>There are different types of proxies, such as datacenter proxies, mobile proxies, and residential proxies. Among these, <a target="_blank" href="https://netnut.io/datacenter-vs-residential-proxy-the-ultimate-guide">residential proxies</a> are the most trusted because they use real IP addresses assigned by internet service providers.</p>
<h2 id="heading-the-core-difference-between-vpns-and-proxies">The Core Difference Between VPNs and Proxies</h2>
<p>The biggest difference between a VPN and a proxy lies in encryption.</p>
<p>VPNs encrypt all network traffic from your device, while most proxies do not. This means VPNs provide a higher level of security and privacy. Even if someone intercepts your data, they cannot read it.</p>
<p>Proxies, on the other hand, focus more on IP masking rather than full encryption. They are lighter, faster, and more flexible for specific use cases like automation, scraping, or content testing.</p>
<p>For example, a company that needs to collect product data from multiple e-commerce sites will use residential proxies rather than a VPN because proxies allow scalable, distributed access from different IP addresses.</p>
<p>Another key difference is the level of system-wide protection. A VPN <a target="_blank" href="https://cloud.google.com/learn/what-is-encryption">encrypts all the traffic</a> coming from your device, including background apps.</p>
<p>A proxy typically only routes traffic from specific browsers or applications. This makes VPNs better for personal privacy and proxies better for targeted tasks.</p>
<h2 id="heading-performance-and-speed">Performance and Speed</h2>
<p>Since VPNs encrypt traffic, they can reduce speed due to the extra processing involved. Proxies, by contrast, are often faster because they skip encryption and route only specific requests.</p>
<p>However, not all proxies are equal. Datacenter proxies may be fast but easier to detect, while residential proxies are slower but far more reliable for tasks that require realism. Businesses often accept this small trade-off in speed for better accuracy and reduced blocking.</p>
<p>VPNs usually have fewer IPs and servers compared to proxy networks, which can limit their flexibility. Proxies can rotate thousands of IPs automatically, which helps avoid bans and distribute requests efficiently.</p>
<h2 id="heading-use-cases-for-vpns">Use Cases for VPNs</h2>
<p>VPNs are ideal for individuals who value security and privacy. They are useful for browsing safely on public Wi-Fi, accessing restricted websites, or hiding browsing habits from internet service providers.</p>
<p>Remote workers often use VPNs to securely access corporate networks. Journalists and activists rely on them to bypass censorship or protect communication in restrictive regions.</p>
<p>For everyday users, a VPN provides a simple and effective way to browse anonymously and encrypt all data traffic.</p>
<h2 id="heading-use-cases-for-proxies">Use Cases for Proxies</h2>
<p><a target="_blank" href="https://www.freecodecamp.org/news/what-is-a-proxy-server-in-english-please/">Proxies</a> shine in automation and business scenarios. They are essential for data gathering, web scraping, and digital marketing. By using residential proxies, companies can collect information from multiple websites without getting blocked.</p>
<p>For example, a brand can track how its ads appear to users in different countries. E-commerce businesses can compare competitor prices or monitor product listings in real time. Social media managers use proxies to handle multiple accounts without triggering platform restrictions.</p>
<p>Proxies also help in large-scale <a target="_blank" href="https://netnut.io/llm-web-scraping-guide/">web scraping for LLM training</a>. They allow businesses to gather public data anonymously and at scale without getting blocked or throttled by websites.</p>
<h2 id="heading-how-to-combine-vpns-and-residential-proxies">How to Combine VPNs and Residential Proxies</h2>
<p>In some cases, professionals use both. For example, a researcher may connect to a VPN for encryption and then route specific scraping tasks through residential proxies for location diversity. This hybrid setup balances privacy and data collection efficiency.</p>
<p>Combining them also reduces the risk of IP bans. If a target site starts blocking one set of IPs, the user can switch networks seamlessly. This approach is popular in cybersecurity testing, ad verification, and large-scale monitoring.</p>
<h2 id="heading-which-one-should-you-choose">Which One Should You Choose?</h2>
<p>If your goal is privacy, use a VPN. It secures your entire connection and hides all your online activities. If your goal is automation, data collection, or region-specific testing, use proxies.</p>
<p>Residential proxies are especially effective when websites have strong anti-bot protection or region-based restrictions. They combine anonymity with authenticity, making your traffic look like that of a regular home user.</p>
<p>For individuals who need both security and flexibility, a mix of VPN and proxy can work best. You can encrypt your connection with a VPN and use residential proxies for specific tools or scripts that need rotation and scale.</p>
<h2 id="heading-the-future-of-privacy-tools">The Future of Privacy Tools</h2>
<p>As online tracking becomes more advanced, tools like VPNs and residential proxies are becoming essential for both individuals and businesses. Companies use them to access unbiased market data and protect digital assets, while individuals use them to browse safely and privately.</p>
<p>In the future, we may see hybrid solutions that blend the privacy of VPNs with the scalability of proxy networks. These systems could automatically switch between encryption and proxy routing based on the task at hand, providing a seamless balance between speed and security.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>VPNs and proxies both protect your identity online, but they serve different purposes. VPNs focus on privacy and encryption, while proxies , especially residential proxies , focus on scalability and access.</p>
<p>Understanding how each works helps you choose the right tool for your needs. Whether you want to stay anonymous, collect data safely, or test websites from different countries, using the right combination of VPN and residential proxies can give you both privacy and power in the digital world.</p>
<p><em>Hope you enjoyed this article. Find me on</em> <a target="_blank" href="https://linkedin.com/in/manishmshiva"><em>Linkedin</em></a> <em>or</em> <a target="_blank" href="https://manishshivanandhan.com/"><em>visit my website</em></a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Set Up a Home VPN Using Tailscale on a Raspberry Pi ]]>
                </title>
                <description>
                    <![CDATA[ In this article, you’ll learn how to set up a VPN which you can host on a Raspberry Pi. I am a fan of Raspberry Pis because these small form factor computers are a favourite tool for tinkerers, like me. This VPN will allow you to access your home net... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/set-up-a-home-vpn-using-tailscale-on-a-raspberry-pi/</link>
                <guid isPermaLink="false">67e6c11d423cd4f90a6350ab</guid>
                
                    <category>
                        <![CDATA[ iot ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Raspberry Pi ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                    <category>
                        <![CDATA[ networking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Homelab ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Anomfueme ]]>
                </dc:creator>
                <pubDate>Fri, 28 Mar 2025 15:32:45 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1743175949441/1a8c4705-556c-4a1f-899a-9ac8e968fdc3.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, you’ll learn how to set up a VPN which you can host on a Raspberry Pi. I am a fan of Raspberry Pis because these small form factor computers are a favourite tool for tinkerers, like me.</p>
<p>This VPN will allow you to access your home network from anywhere as if you’re still at home. So why is this useful, you might ask? Well, it allows you to use your home network IP, no matter where you are, which is a good for privacy.</p>
<p>In this article, we’ll use <a target="_blank" href="https://github.com/tailscale/tailscale">Tailscale</a>, an open-source mesh VPN (Virtual Private Network) service that streamlines connecting devices and services securely across different networks. It enables encrypted point-to-point connections using the open-source <a target="_blank" href="https://www.wireguard.com/">WireGuard</a> protocol. This means that only devices on your private network can communicate with each other.</p>
<h3 id="heading-table-of-contents">Table of Contents</h3>
<ul>
<li><p><a class="post-section-overview" href="#heading-prerequisites">Prerequisites</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-install-raspberry-pi-os-lite-32-bit">Install Raspberry Pi OS Lite (32-bit)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-boot-the-raspberry-pi">Boot The Raspberry Pi</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-ssh-into-the-raspberry-pi-and-login">SSH Into The Raspberry Pi and Login</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-install-tailscale-on-raspberry-pi">Install Tailscale on Raspberry Pi</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-key-expiry">Key Expiry</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-configuring-the-raspberry-pi-as-an-exit-node">Configuring the Raspberry Pi as an Exit Node</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h3 id="heading-prerequisites">Prerequisites</h3>
<ul>
<li><p>Raspberry Pi (I am working with a Raspberry Pi 5)</p>
</li>
<li><p><a target="_blank" href="https://www.raspberrypi.com/software/">Raspberry Pi Imager</a></p>
</li>
<li><p>A Micro SD Card (8GB is enough)</p>
</li>
<li><p>A Micro SD Card reader for your computer.</p>
</li>
<li><p>Home Router</p>
</li>
<li><p>A <a target="_blank" href="https://tailscale.com/">Tailscale</a> account</p>
</li>
</ul>
<h2 id="heading-install-raspberry-pi-os-lite-32-bit">Install Raspberry Pi OS Lite (32-bit)</h2>
<p>We’ll start this process by installing the Raspberry Pi OS Lite (32-bit) on the micro SD card we have. We will be making use of the Raspberry Pi Imager software which is available for free <a target="_blank" href="https://www.raspberrypi.com/software/">here</a>.</p>
<p>When you run the imager software, pick the Raspberry Pi Device, which for me is a Raspberry Pi 5.</p>
<p>Then in Operating System, click on Raspberry Pi OS (other), then scroll down to Raspberry Pi OS Lite (32-bit)</p>
<p>Next, select your SD card which you have inserted into the card reader, and the card reader into the computer. Your screen should look similar to what you see below. Click on next.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742929198415/b3cd3476-ed82-4db3-9472-f13df2207ca9.png" alt="A Screenshot of the Raspberry Pi Imager software start menu." class="image--center mx-auto" width="751" height="538" loading="lazy"></p>
<p>After next, you should see a pop-up asking if you would like to apply OS customisation settings.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742929274780/4482dd16-8f42-41ec-b1cd-af288180adcb.png" alt="A screenshot of the Raspberry Pi Imager software customisation prompt menu" class="image--center mx-auto" width="703" height="497" loading="lazy"></p>
<p>Next, click on edit settings. Enable set hostname and write the name you want to give the Pi. For this tutorial, I will be using <code>dapivpn</code><em>.</em> Then enable set username and password. Pick a username and a strong and secure password</p>
<p>You can enable configure wireless LAN if you plan to use Wifi, but if you are team Ethernet cable, you can skip this. I will be using WiFi in this tutorial though.</p>
<p>Now you’ll need to enable set local settings and pick your correct time zone and keyboard layout.</p>
<p>After that, go to the Services tab, then enable SSH and click on “Use password authentication”. Then click save, then yes on the apply customisation screen, and yes again. Remember this will erase all the data on the SD card, so make sure you’re using one without any important files on it.</p>
<p>This is how your Raspberry Pi Imager should look now:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742929363470/0c7663d4-a908-4be1-9865-caa665a2ee95.png" alt="A screenshot of the Raspberry Pi Imager software performing the write operation." class="image--center mx-auto" width="721" height="513" loading="lazy"></p>
<h3 id="heading-boot-the-raspberry-pi">Boot the Raspberry Pi</h3>
<p>After this is done, take the SD card and insert it into your Raspberry Pi. Then plug the power cable into the Raspberry Pi and wait some minutes for it to boot properly. You will know it is ready when the green LED light stays on.</p>
<p>Now you should go to your router and set a static IP to the Raspberry Pi. For mine, I set it to <code>192.168.8.21</code><em>.</em></p>
<h3 id="heading-ssh-into-the-raspberry-pi-and-login">SSH into the Raspberry Pi and Login</h3>
<p>Open up your command line terminal. Type “<code>ssh &lt;pi username&gt;@&lt;raspberry_pi_ip_address&gt;</code>”. For me, this would be:</p>
<pre><code class="lang-bash">ssh danpi@192.168.8.21
</code></pre>
<p>Then type in the password you used. You should see your username and the Pi hostname and this confirms you have logged in successfully to it.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1743088985613/480325b2-496c-4161-96c6-f150f4020922.png" alt="Command line interface showing a successful SSH process" class="image--center mx-auto" width="747" height="382" loading="lazy"></p>
<p>Type in:</p>
<pre><code class="lang-bash">sudo apt update &amp;&amp; sudo apt upgrade -y
</code></pre>
<p>You run this command to make sure everything is up to date locally.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742929744252/6200841f-98bb-4bfa-8c30-38159a963e2b.png" alt="Command line interface showing the update command running" class="image--center mx-auto" width="748" height="226" loading="lazy"></p>
<p>Now reboot your Pi after this by typing:</p>
<pre><code class="lang-bash">sudo reboot
</code></pre>
<h2 id="heading-install-tailscale-on-raspberry-pi">Install Tailscale on Raspberry Pi</h2>
<p>Now you’re going to add Tailscale’s package signing key and repository.</p>
<pre><code class="lang-bash">curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg &gt;/dev/null 
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
</code></pre>
<p>Install Tailscale using these commands:</p>
<pre><code class="lang-bash">sudo apt-get update
sudo apt-get install tailscale
</code></pre>
<p>Next, you need to connect your Pi to your Tailscale network and authenticate. You can do that with the following command:</p>
<pre><code class="lang-bash">sudo tailscale up
</code></pre>
<p>Your browser should look like this.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1742929786462/4d17cfae-0e87-449f-ac13-413a65f3f338.png" alt="Screenshot of the browser showing the authentication screen" class="image--center mx-auto" width="695" height="262" loading="lazy"></p>
<p>To locate the Tailscale IPv4 address for the Raspberry Pi, run this command:</p>
<pre><code class="lang-bash">tailscale ip -4
</code></pre>
<p>You can also see it on the Tailscale dashboard in your browser.</p>
<p>At this point, you’re done installing Tailsacle and you just need to do some finishing touches.</p>
<h2 id="heading-key-expiry">Key Expiry</h2>
<p>There is something you need to know when it comes to adding a device to Tailsacle. By default, and as a security feature, Tailscale requires devices to re-authenticate after a certain period of time has elapsed, usually 180 days.</p>
<p>If the re-authentication does not occur, keys expire and the connection stops working. It’s up to you to choose what you prefer, as this is a security feature that comes with some inconvenience.</p>
<p>I will be disabling the key expiry on the Raspberry Pi, as I fully trust it. To do this, you need to:</p>
<ul>
<li><p>Open the <a target="_blank" href="https://login.tailscale.com/admin/machines">Machines</a> page of the Tailscale admin console.</p>
</li>
<li><p>Find the Raspberry Pi on the row and select the option menu there.</p>
</li>
<li><p>Click on the Disable Key Expiry option. You should see an Expiry Disable label below the machine name.</p>
</li>
</ul>
<h2 id="heading-how-to-configure-the-raspberry-pi-as-an-exit-node">How to Configure the Raspberry Pi as an Exit Node</h2>
<p>Another thing you’ll need to know about when it comes to Tailscale is what an exit node is. A Tailscale exit node is a designated device in your Tailscale network that routes all of your internet traffic through it. No matter where you are, once you have this device activated as an exit node, when you turn on Tailscale, it routes your internet traffic through the device.</p>
<p>Ideally, you want a device that is powered on 24/7 to serve as your exit node. That’s why we are picking the Raspberry Pi, as it is a low-powered computer.</p>
<p>We are already 90% of the way, as we have Tailscale running on our Pi. Remember to also have Tailscale installed on as many devices on your local network as possible. What’s left is to allow your Pi to act as an exit node, so all your internet traffic or LAN traffic routes through it, giving you access to:</p>
<ul>
<li><p>Local network devices at home</p>
</li>
<li><p>Your home public IP</p>
</li>
<li><p>Internal services like NAS, printers, cameras, and so on</p>
</li>
</ul>
<p>To do this, SSH into your Raspberry Pi and follow these steps:</p>
<ul>
<li><p>Enable IP Forwarding. IP forwarding allows your Raspberry Pi to pass traffic between its network interfaces. Run the commands below line by line:</p>
<pre><code class="lang-bash">  <span class="hljs-built_in">echo</span> <span class="hljs-string">"net.ipv4.ip_forward=1"</span> | sudo tee -a /etc/sysctl.conf

  <span class="hljs-built_in">echo</span> <span class="hljs-string">"net.ipv6.conf.all.forwarding=1"</span> | sudo tee -a /etc/sysctl.conf

  sudo sysctl -p /etc/sysctl.conf
</code></pre>
</li>
<li><p>Advertise the Raspberry Pi as an exit node:</p>
<pre><code class="lang-bash">  sudo tailscale up --advertise-exit-node
</code></pre>
</li>
<li><p>Open the <a target="_blank" href="https://login.tailscale.com/admin/machines">Machines</a> page of the Tailscale admin console.</p>
</li>
<li><p>Find the Raspberry Pi on the row. You should see an Exit Node label on its name.</p>
</li>
<li><p>Click on the options menu there and select Edit Route Settings.</p>
</li>
<li><p>Check the box for Use as an exit node, then save.</p>
</li>
</ul>
<p>Now you should see the option of routing the internet through an exit node when you open up your Tailscale app on mobile or PC or anywhere you have it installed. When you see that option, you will also see the Raspberry Pi as an exit node option. You can also add more devices as an exit node if you want more options.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Using the Tailscale app on other devices, you can now route traffic securely through the Raspberry Pi by selecting it as an exit node. Tailscale also provides clear, <a target="_blank" href="https://tailscale.com/kb/1408/quick-guide-exit-nodes#use-an-exit-node">step-by-step guides</a> tailored to each device type for setting up and using an exit node.</p>
<p>You can now be away from your home internet but still connect to the internet as if you were home. See you next time.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Does a VPN Work? Tutorial for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ Do you worry about online security while using public Wi-Fi? Or has someone told you that you might get hacked when using an insecure connection and someone will steal all your details? Well, you might have also heard that you should use a VPN to pro... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-does-a-vpn-work/</link>
                <guid isPermaLink="false">66ba2a44c346e93df556afea</guid>
                
                    <category>
                        <![CDATA[ encryption ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ privacy ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tejan Singh ]]>
                </dc:creator>
                <pubDate>Tue, 24 Jan 2023 00:08:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/01/privecstasy-CXlqHmQy3MY-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Do you worry about online security while using public Wi-Fi? Or has someone told you that you might get hacked when using an insecure connection and someone will steal all your details?</p>
<p>Well, you might have also heard that you should use a VPN to protect your online privacy. But do you have any idea what it is and how it works?</p>
<p>Don’t worry – in this article, we will go through everything that you need to know to about what and when to use a VPN and when to avoid using it. So, without any further delay, let’s get started.</p>
<h2 id="heading-what-is-a-vpn">What is a VPN?</h2>
<p>VPN stands for Virtual Private Network. It is a type of network you can connect to which will help you protect your online security and privacy.</p>
<p>A VPN acts as a tunnel through which all your data goes from your location to your destination. It's all properly encrypted and secure so that any outside party can’t see what data you are transferring.</p>
<p>There are many advantages to using VPNs, such as:</p>
<ul>
<li>Privacy</li>
<li>Anonymity</li>
<li>Security</li>
<li>Encryption</li>
<li>Masking or changing your original IP address, so others can’t track you</li>
</ul>
<p>We'll discuss these advantages and more further down in this article, but first you need to understand how a VPN works so you can use it properly.</p>
<h2 id="heading-how-does-a-vpn-work">How Does a VPN Work?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/01/image-223.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.cactusvpn.com/beginners-guide-to-vpn/vpn-encryption/">Image source</a></em></p>
<p>A VPN works by routing / forwarding all your data from your laptop or phone through your VPN to the internet, rather than directly through your ISP. </p>
<p>When you use a VPN, it encrypts all your data on the client side. Then after the data is encrypted, it's passed through a VPN tunnel which others can’t access, and then it reaches the internet.</p>
<p>But before going through the VPN tunnel, the request is first sent to your ISP, but as it's encrypted, ISP can’t figure out what you are trying to access. So it forwards your request to your VPN server. Then the VPN sends the request to your desired IP address or website.</p>
<h2 id="heading-advantages-of-using-a-vpn">Advantages of Using a VPN</h2>
<p>Now let's discuss some of the advantages in more detail.</p>
<h3 id="heading-unblock-websites-amp-bypass-filters">Unblock websites &amp; bypass filters</h3>
<p>There might be scenarios where you won’t be able to access certain websites which are blocked by your office or school or college department, but you still want or need to access them. </p>
<p>These websites may include social networking sites, movie downloading websites, or any kind of media streaming websites. </p>
<p>In these cases, a VPN will help you bypass all the blocking filters and let you access the websites that you wish to access without anyone’s help and others will have no idea what you're accessing.</p>
<h3 id="heading-bypass-regional-restrictions">Bypass regional restrictions</h3>
<p>People in certain countries cannot access any websites outside their country like YouTube or Google because their government doesn't want them to use any other websites. </p>
<p>If you're in one of these places and still want to access these blocked websites, then a VPN can help by bypassing all the regional restrictions. You'll be able to access all the restricted or blocked content without letting the government know about your activity.</p>
<h3 id="heading-access-geo-blocked-websites">Access geo-blocked websites</h3>
<p>There are several websites, special offers, and services which are available for specific countries or regions. But what if you also want to take advantage of that opportunity, but it’s not accessible in your region?</p>
<p>A VPN can help you by changing your IP address which will change your location on the internet. Then you will seem to be a user from that country and you can also have all the benefits that people in that particular region are enjoying.</p>
<h3 id="heading-change-your-ip-address">Change your IP address</h3>
<p>Your ISP is tracking your every move on the internet – which websites you are visiting, the amount of time you are spending there, and when you log in and log out from a website. </p>
<p>But sometimes you may need to hide your browsing history/activity from your local network/ISP. In that case, using a VPN can help you keep all your records encrypted, and your ISP will have no idea what you are doing with your internet. All your internet browsing activity will be masked by the VPN.</p>
<h3 id="heading-online-anonymity-and-privacy">Online anonymity and privacy</h3>
<p>Everything on the internet is tracking you. Website and web servers that you use or visit know your IP and location. That can be used to their advantage and every time you visit the same website, they will know that it’s you, and they will track your usage and your behavior. This isn't necessarily a good thing since you are giving them a lot of information without knowing what. </p>
<p>A VPN can help keep your identity anonymous so you don't need to worry about identity leakage or any kind of tracking activity.</p>
<h3 id="heading-enhanced-security">Enhanced security</h3>
<p>As discussed above, using VPN can keep your identity safe and also keeps your data encrypted while you browse the internet. As a result, it enhances security and the chances that someone might hack you will be lower. </p>
<p>So, using VPN will keep you safe when you are using any public Wi-Fi or browsing websites which are not secure.</p>
<h2 id="heading-disadvantages-of-vpn">Disadvantages of VPN</h2>
<p>There are some downsides to using a VPN as well:</p>
<h3 id="heading-slows-your-connections">Slows your connections</h3>
<p>VPNs tend to slow your internet connection. As the VPN servers might be located far away from you (might be in some other geographic location or country), your data will need to travel farther across the internet and will slow your connection speed.</p>
<h3 id="heading-vpns-log-your-activities">VPNs log your activities</h3>
<p>VPNs keep logs of your activities. You heard right. Regardless of what policies they have, even if they say that they don’t keep any logs, they do. Governments have taken action against VPNs, and the VPN companies tend to deliver all the activity logs of a user in cases of international crime, terrorist activity, or hacking. </p>
<p>So – it goes without saying – make sure you don’t use VPNs for any illegal activities. Use it instead to protect yourself and your identity from malicious hackers.</p>
<h3 id="heading-specific-blockades-of-vpn-services">Specific blockades of VPN services</h3>
<p>There are many websites and streaming services like Netflix which will not allow any unusual VPN users to access their content. So, there might be many cases where your VPN will help, but there are many websites and servers which won't allow you to access them using a VPN.</p>
<h3 id="heading-cost">Cost</h3>
<p>Although there are many free VPN services which you can use, if you are planning to use VPN on regular basis then you might need to purchase a paid version. Free VPNs don’t provide good speed and the amount of data usage is also limited on a daily basis. VPNs cost around $10 to $15 per month for the premium services.</p>
<h2 id="heading-how-a-vpn-can-help-you-protect-your-online-identity">How a VPN Can Help You Protect Your Online Identity</h2>
<p>When you use the internet, the data you send or request through a web browser to any server (for example, when Google searching), along with your request, IP address (for example, your laptop or mobile) and destination IP address (like Google) first reaches your ISP. </p>
<p>The ISP monitors all your activity and then forwards your request to the destination IP address and also gets back the information in the same way.</p>
<p>All your information travels through a middle station, your ISP. They have all your history of using the internet and how you are using the internet. But when you are using a VPN, that's not the case.</p>
<p>Whenever you send any request to any website or server, instead of connecting directly to the server, it first reaches the VPN server. There, all your requests and information are encrypted and then sent forward to your desired website.</p>
<p>Your ISP is still there to monitor things. But if you're using VPN, it will automatically change the IP address of your destination to a different IP address and encrypt the destination IP address. This way, your ISP won’t be able to read it and will assume that all your requests were going to the IP address of the VPN. So it will forward all your requests to the VPN.</p>
<p>When your request or information reaches your VPN, it will be decrypted, and it will forward your request to the website you wish to access. The website or server will get the VPN request and will assume that the request is coming from that VPN server. It will allow the VPN to access the website and you'll be able to visit the website without letting your ISP know.</p>
<p>Similarly, when you download a file, all the traffic or information flows from a web server to the VPN. The VNP encrypts all the information and then forwards it to your ISP – which will still have no idea what’s going on, as the information is encrypted.</p>
<p>Finally, the info gets forwarded to your laptop or mobile. When it reaches your device, it will be decrypted, and you will be able to view the website as it's available to others.</p>
<h2 id="heading-frequently-asked-vpn-questions">Frequently Asked VPN Questions</h2>
<h3 id="heading-is-vpn-traffic-encrypted">Is VPN traffic encrypted?</h3>
<p>YES! As explained above, all the traffic passed through VPN is encrypted through various encryption algorithms like the RSA (Rivest–Shamir–Adleman) algorithm, AES (Advanced Encryption Standard), and others.</p>
<h3 id="heading-what-is-an-always-on-vpn-what-is-a-kill-switch">What is an always-on VPN? What is a kill switch?</h3>
<p>I will try to explain this concept in approachable terms. Always on VPN is a service which allows you to automatically connect to a VPN whenever you are connected to the internet. These kinds of services are used by companies which don’t want outside users to access their data and only want their employees to access their data from an outside, remote location.</p>
<p>Whenever an employee, company, or user who has access to the resources tries to access, then they need to enter valid credentials to automatically connect to the VPN. This also allows them to access all their work and resources present inside the company from an outside or remote location.</p>
<p>A VPN kill switch is another major feature offered by VPN service providers. Whenever there is a sudden or accidental loss of a VPN connection, in that case, your information might get exposed.</p>
<p>To deal with that, a VPN kill switch is used to terminate your internet connection when there is no VPN connection. This is a very useful feature for protecting your data from outside users.</p>
<p>So, when the kill switch is ON, internet connections will be terminated. But when the kill switch is OFF, then the internet will not be terminated when there is a loss of VPN connection.</p>
<h3 id="heading-is-a-vpn-necessary">Is a VPN necessary?</h3>
<p>A VPN is not strictly necessary depending on your needs and activities, but it's useful. </p>
<p>Using VPN helps protect your online security, privacy, and anonymity. It will also protect you from malicious threats and trackers when you are using an unsecured website or using any unknown wi-fi connection which might be public.</p>
<h3 id="heading-is-a-vpn-100-safe">Is a VPN 100% safe?</h3>
<p>Nothing on the internet is 100% secure. There are and will always be ways to expose services like VPNs. But using a VPN will typically help you more than it'll harm you.</p>
<h3 id="heading-is-vpn-legal-in-india">Is VPN legal in India?</h3>
<p>Yes! VPNs are legal in India and can be used freely to access any content on the internet without any restrictions. Just remember that you should not use it for any illegal activity, as there are always ways to track you regardless of what VPN service you use.</p>
<h3 id="heading-do-vpns-log-or-store-my-data">Do VPNs log or store my data?</h3>
<p>VPNs log all your data and store all information, and it might be able to share your data with government authorities. There have been many cases where VPNs say they have a no logs policy but still keep logs of users and shared them with authorities.</p>
<h3 id="heading-what-is-the-main-difference-between-a-firewall-and-a-vpn">What is the main difference between a firewall and a VPN?</h3>
<table>
 <tbody><tr>
  <td>
  <p><span>&nbsp;&nbsp;Firewall</span></p>
  </td>
  <td>
  <p><span>VPN</span></p>
  </td>
 </tr>
 <tr>
  <td>
  <ul>
   <li><span>&nbsp;&nbsp;Software or hardware
       device&nbsp;</span></li>
  </ul>
  <p><span>&nbsp;</span></p>
  </td>
  <td>
  <ul>
   <li><span>Service or Server</span></li>
  </ul>
  <p><span>&nbsp;</span></p>
  </td>
 </tr>
 <tr>
  <td>
  <ul>
   <li><span>&nbsp;&nbsp;acts as a filter to allow
       and block websites and users to access a particular website</span></li>
  </ul>
  </td>
  <td>
  <ul>
   <li><span>it encrypts the IP address and
       information from both source and destination and allows users to access
       all blocked or restricted websites and even private network information.</span></li>
  </ul>
  </td>
 </tr>
</tbody></table>

<h2 id="heading-conclusion">Conclusion</h2>
<p>VPNs definitely have their advantages and disadvantages. Organizations use them to protect their private networks and information. You can also use one to access blocked content, and to protect your privacy, anonymity and security. Using a VPN for legal activities is beneficial and adds extra security.</p>
<p>When you are not sure about using or accessing any unknown (public/private) wi-fi or unsecured untrusted website, then you should always use a VPN (free/paid). Although paid VPNs have their advantages, occasionally using free VPNs won’t harm you and will still serve the purpose.</p>
<p>And just remember – don't ever try to use a VPN to perform any illegal activities.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build Your Own Wireguard VPN in Five Minutes ]]>
                </title>
                <description>
                    <![CDATA[ You may already understand how important a good VPN can be for maintaining the security and privacy of your mobile communications.  Whether you need to use your phone for banking over a public airport or coffee shop WiFi connection, or you're worried... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-your-own-wireguard-vpn-in-five-minutes/</link>
                <guid isPermaLink="false">66b995c2489480391dfe7a0c</guid>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ privacy ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ David Clinton ]]>
                </dc:creator>
                <pubDate>Mon, 19 Dec 2022 20:46:15 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/12/pexels-ibrahim-boran-339814.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>You may already understand how important a good VPN can be for maintaining the security and privacy of your mobile communications. </p>
<p>Whether you need to use your phone for banking over a public airport or coffee shop WiFi connection, or you're worried about the wrong people listening in on your online interactions, the tunneled encryption a good VPN gives you can be invaluable. </p>
<p>The trick, however, is finding a VPN that really is "good" – and one that's both convenient and affordable.</p>
<p>There are plenty of commercial VPN services out there, and configuring one of those for your phone or laptop is usually simple enough. </p>
<p>But such services come with two potential down-sides: they're often expensive, with payments averaging around $10 monthly, and you can never be quite 100% sure that they aren't (accidentally or on purpose) leaking or misusing your data. </p>
<p>Also, cheaper VPNs often limit your data use and the number of devices you can connect.</p>
<p>If you like watching video versions of tutorials to supplement your learning, feel free to follow along here:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/kxj8GMvnASE" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-what-wireguard-delivers">What WireGuard Delivers</h2>
<p>But if you happen to have a cloud-based Linux server running anyway, building a WireGuard VPN can be a simple and free way to add some serious, compromise-free security and privacy to your life. </p>
<p>If you plan to limit the VPN to just devices owned by you and a few friends, you'll probably never even notice any extra resource load on your server. Even if you had to fire up and pay for a dedicated AWS EC2 t2.micro reserved instance, the annual costs should still come out significantly cheaper than most commercial VPNs. And, as a bonus, you'll get complete control over your data.</p>
<p>Right now I'm going to show you how all that would work using the open source WireGuard software on an Ubuntu Linux server. </p>
<p>Why WireGuard? Because it's really easy to use, is designed to be particularly attack resistant, and it's so good at what it does that it was recently incorporated into the Linux kernel itself. </p>
<p>The actual work to make this happen <em>really will</em> take only five minutes - or less. Having said that, planning things out, troubleshooting for unexpected problems and, if necessary, launching a new server might add significant time to the project.</p>
<h2 id="heading-how-to-set-up-your-environment">How to Set Up Your Environment</h2>
<p>First off, you'll need to open the UDP port 51820 in whatever firewall you're using. Here's how that would look for the security group associated with an AWS EC2 instance:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/SG_rule-2.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now, on the Linux server, using a sudo shell, we'll begin by installing the WireGuard and resolvconf packages. </p>
<p>Technically, we probably won't need resolvconf here, but since that's what you'd need if you wanted to set up a Linux machine as a WireGuard <em>client</em> I thought I'd throw that in here, too.</p>
<pre><code>apt install wireguard resolvconf
</code></pre><h2 id="heading-how-to-generate-encryption-keys">How to Generate Encryption Keys</h2>
<p>The <code>wg genkey</code> command generates a new private encryption key and saves it as a file in the /etc/wireguard directory. This directory was automatically created when we installed WireGuard. </p>
<p>The <code>chmod</code> command sets the appropriate restrictive permissions for that private key file. </p>
<p>Like everything in Linux, there are other ways to get this done, but just make sure you do it right.</p>
<pre><code>wg genkey | sudo tee /etc/wireguard/private.key
chmod go= <span class="hljs-regexp">/etc/</span>wireguard/private.key
</code></pre><p>Next, we'll use the value of our private key to generate a matching public key – which will also be saved to the /etc/wireguard directory. The goal is to add the server's <em>public</em> key to the WireGuard configuration on all the client devices we'll be using, and then to add those clients' public keys to the server configuration here. </p>
<p>Private keys should never leave the machines for which they're created – and should always be carefully protected.</p>
<pre><code>cat /etc/wireguard/private.key | wg pubkey | sudo tee
</code></pre><h2 id="heading-how-to-configure-the-wireguard-server">How to Configure the WireGuard Server</h2>
<p>We're now ready to create a server configuration file. Following convention, I'll name the file wg0.conf, but you can give it any name you'd like. You can also have multiple configurations (with different filenames) existing at the same time.</p>
<p>Here's what our configuration will look like:</p>
<pre><code>[Interface]
Address = <span class="hljs-number">10.5</span><span class="hljs-number">.5</span><span class="hljs-number">.1</span>/<span class="hljs-number">24</span>
ListenPort = <span class="hljs-number">51820</span>
# Use your own private key, <span class="hljs-keyword">from</span> /etc/wireguard/privatekey
PrivateKey = your_key

[Peer]
# Workstation public key
PublicKey = your_key
# VPN client<span class="hljs-string">'s IP address in the VPN
AllowedIPs = 10.5.5.2/32

[Peer]
# laptop public key
PublicKey = your_key
# VPN client'</span>s IP address <span class="hljs-keyword">in</span> the VPN
AllowedIPs = <span class="hljs-number">10.5</span><span class="hljs-number">.5</span><span class="hljs-number">.3</span>/<span class="hljs-number">32</span>
</code></pre><p>Notice that this file has three sections: an Interface, and two peers. The Interface section defines the private NAT network address that our server will use. That's the private address the clients will connect to – after first requesting access through the server's public IP address, of course. </p>
<p>You don't have to follow my addressing, as long as you use a valid private IP range that doesn't overlap on any network blocks being used by either your server or client. </p>
<p>Matching the UDP security group rule I set up earlier in AWS, I'm defining the ListenPort as 51820. But I could choose a different address to add a tiny bit more security if I want. </p>
<p>Finally, I would paste the server's Private Key as the value of <code>PrivateKey</code> so WireGuard will be able to authenticate incoming client requests.</p>
<p>The first <code>peer</code> section contains nothing more than the <em>public</em> key and assigned private IP address of one client. The second <code>peer</code> section does the same for a second client machine. </p>
<p>Getting those public keys from the client is the most manual task involved in this whole setup. But, since this is your own VPN, you can usually find a way to copy and paste directly into your server configuration so you don't need to painfully type the whole thing in.</p>
<p>That should be everything. I'll use the <code>wg-quick</code> command to bring the VPN to life. <code>up</code> tells WireGuard to read the wg0.conf configuration we just made and use it to build a new VPN interface. </p>
<pre><code>wg-quick up wg0
</code></pre><p>Running <code>wg</code> will show us that it worked. Finally, I'll run <code>systemctl enable</code> to tell Linux to load this WireGuard interface automatically each time the server reboots.</p>
<pre><code>systemctl enable wg-quick@wg0
</code></pre><h2 id="heading-how-to-configure-wireguard-clients">How to Configure WireGuard Clients</h2>
<p>That's all we'll need from the server end of things. Getting your client device set up with WireGuard is either going to be much easier or more or less the same. </p>
<p>What does <em>that</em> mean? Well, if you're working with Windows, macOS, Android or iOS, then there are links to GUI apps available from <a target="_blank" href="https://www.wireguard.com/install/">this wireguard.com/install page</a>. Those apps will generate key pairs <em>for</em> you. You'll only need to enter the server's IP address or domain and its public key. You'll then take the client's public key and add it to the server wg0.conf file the way I showed you earlier.</p>
<p>However, if it's a Linux PC or laptop client you want to add, then it's a bit more complicated. You'll basically follow all the steps you saw for the server configuration, including the key generation. You'll even create a configuration file named wg0-conf (if that's the name you like). But here's how that config file should look:</p>
<pre><code>[Interface]
# The address your computer will use on the VPN
Address = <span class="hljs-number">10.5</span><span class="hljs-number">.5</span><span class="hljs-number">.2</span>/<span class="hljs-number">32</span>
DNS = <span class="hljs-number">8.8</span><span class="hljs-number">.8</span><span class="hljs-number">.8</span>
# Load your privatekey <span class="hljs-keyword">from</span> file
PostUp = wg set %i private-key /etc/wireguard/privatekey
# Also ping the vpn server to ensure the tunnel is initialized
PostUp = ping -c1 <span class="hljs-number">10.47</span><span class="hljs-number">.47</span><span class="hljs-number">.1</span>
[Peer]
# VPN server<span class="hljs-string">'s wireguard public key
PublicKey = your_key
# Public IP address of your VPN server (USE YOURS!)
Endpoint = 54.160.21.183:51820
# 10.0.0.0/24 is the VPN subnet
AllowedIPs = 10.47.47.0/24
# PersistentKeepalive = 25</span>
</code></pre><p>The <code>Interface</code> section represents the client machine this time, while the <code>Peer</code> section down below refers to the server. Let's begin with <code>Interface</code>. The private IP address should match the address you give this particular client in the configuration on the server. </p>
<p>If you need your client to by-pass a local DNS server, you can specify a custom DNS server here. This one is the one provided by Google.</p>
<p>Instead of hard-coding your local private key into your configuration file the way we did on the server, you could tell WireGuard to read the privatekey file whenever it loads. This is probably a bit of a security best-practice – and we could just as easily have done it on the server, too. Finally, the configuration script will test our connection with the <code>PostUp</code> ping command.</p>
<p>The <code>Peer</code> – or server – configuration requires the server's <em>public</em> key, which is added here. </p>
<p>The <code>Endpoint</code> is where you tell WireGuard where to find the server. Nothing will work without this one! That would require the server's public IP – or it's domain name – followed by the port you've chosen. Again, 51820 is the WireGuard default. </p>
<p>Finally, the <code>AllowedIPs</code> setting defines the network address range you'll be using, and the optional <code>PersistentKeepalive</code> value can prevent dropped connections.</p>
<p>You launch WireGuard on the client exactly the same why you did on the server, using <code>wg-quick up wg0</code>. Again, though, all those steps will only be necessary for Linux clients. You can use the apps for other platforms.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>So that's that. Just as I said, a working VPN in around five minute's work. You've now got one less excuse for protecting your online privacy and securing your communications.</p>
<p><em>For more technology goodness, please do subscribe to <a target="_blank" href="https://www.youtube.com/@davidbclinton">my YouTube channel</a> and, when you've got a moment, check out the many Linux, security, data analytics, and AWS books and courses available through <a target="_blank" href="https://bootstrap-it.com">my bootstrap-it.com website</a>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Set Up a VPN Server at Home for Free ]]>
                </title>
                <description>
                    <![CDATA[ By Yehuda Clinton In this article, I'm going to guide you, step-by-step, through the process of setting up a WireGuard VPN on a Linux server. It will let you access secure internet resources from insecure places like coffee shops. But why a VPN? And ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-set-up-a-vpn-server-at-home/</link>
                <guid isPermaLink="false">66d4617373634435aafceff3</guid>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self hosting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 15 Jul 2020 20:19:46 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/07/grey-and-black-macbook-pro-showing-vpn-2064586--1-.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Yehuda Clinton</p>
<p>In this article, I'm going to guide you, step-by-step, through the process of setting up a WireGuard VPN on a Linux server. It will let you access secure internet resources from insecure places like coffee shops.</p>
<h2 id="heading-but-why-a-vpn-and-why-wireguard">But why a VPN? And why WireGuard?</h2>
<p>Whenever you connect to, say, your bank's website from a remote location, you risk exposing password and other sensitive information to anyone listening on the network. </p>
<p>Hopefully, of course, the bank website itself will be encrypted, which means that the key data flowing between the bank and your PC or smartphone will be unreadable to anyone listening along the way. </p>
<p>And what about if you're connecting from your home or office? With a VPN, you can be reasonably sure that those data elements not obscured by regular encryption won't be seen by the wrong people.</p>
<p>But what if you're connecting through a public WiFi router at an airport or coffee shop? Are you sure the network hasn't been compromised or that there aren't hackers watching unnoticed?</p>
<p>To counter this very real threat, you can open a connection on your laptop or phone to a VPN server. This way all your data transfers take place through a virtual tunnel. Every part of your sensitive connections will be invisible to anyone on the local network you're connecting from.</p>
<p>WireGuard is the newest of the three big players in the open source VPN world, with the other two being IPsec and OpenVPN. </p>
<p>WireGuard is built to be simpler, faster, and more flexible than the others. It's the new kid on the block, but it's quickly picked up some important friends. At the urging of Linux creator Linus Torvalds himself, WireGuard was recently incorporated into the Linux kernel.</p>
<h1 id="heading-where-to-build-your-vpn-server">Where to build your VPN server?</h1>
<p>Sure, you can always put together a VPN server at home and configure port forwarding through your ISP's router. But it'll often make more practical sense to run it in the cloud. </p>
<p>Don't worry. I assure you that this way will be a lot closer to a quick and painless "set it and forget it" configuration. And it's highly unlikely that whatever you build at home would be as reliable – or secure – as the infrastructure provided by the big cloud providers like AWS. </p>
<p>However, if you do happen to have a professionally secured internet server lying around the house (or you're willing to take a chance with a spare Raspberry Pi you've got lying around) then it'll work just about the same way.</p>
<p>Thanks to WireGuard, whether in the cloud or on a physical server, making your own home VPN has never been easier. The whole setup can be done in half an hour.</p>
<h1 id="heading-getting-ready">Getting ready</h1>
<p>Get your cloud instance up and running, perhaps using a <a target="_blank" href="https://www.freecodecamp.org/news/administrating-aws-resources-productively-using-the-aws-cli/">tutorial from here</a>.</p>
<p>Make sure port <strong>51820</strong> is open to your server. This is done with <em>Security groups</em> on AWS and a <em>VPC network firewall</em> on Google Cloud.</p>
<p>With modern Debian/Ubuntu releases, Wireguard is available to be installed from the package managers like this:</p>
<pre><code>sudo apt install wireguard
</code></pre><p>Or with yum, from the EPEL repository:</p>
<pre><code>sudo yum install kmod-wireguard wireguard-tools
</code></pre><h1 id="heading-step-one-create-the-encryption-keys">Step one: create the encryption keys</h1>
<p>In any directory on the server where you want to create files containing the public and private keys, use this command:</p>
<pre><code>umask <span class="hljs-number">077</span>; wg genkey | tee privatekey | wg pubkey &gt; publickey
</code></pre><p>Do the same for the client in a different directory or on your local machine. Just make sure you will be able to distinguish between the different key sets later. </p>
<p>For quick setup you can use an <a target="_blank" href="https://www.wireguardconfig.com">online key generator</a>. However I suggest doing it manually the first time. Make sure that files were created with key hashes in them as you will be using them in the next step.</p>
<h1 id="heading-step-two-create-the-server-config">Step two: create the server config</h1>
<p>You need to make a <em>.conf</em> file in the /etc/wireguard directory. You can even have multiple VPNs running at the same time using different ports. </p>
<p>Paste the following code in to the new file:</p>
<pre><code>sudo nano /etc/wireguard/wg0.conf
</code></pre><pre><code>[Interface]
Address = <span class="hljs-number">10.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>/<span class="hljs-number">24</span>
ListenPort = <span class="hljs-number">51820</span>
# use the server PrivateKey
PrivateKey = GPAtRSECRETLONGPRIVATEKEYB0J/GDbNQg6V0s=

# you can have <span class="hljs-keyword">as</span> many peers <span class="hljs-keyword">as</span> you wish
# remember to replace the values below <span class="hljs-keyword">with</span> the PublicKey <span class="hljs-keyword">of</span> the peer

[Peer]
PublicKey = NwsVexamples4sBURwFl6HVchellou6o63r2B0s=
AllowedIPs = <span class="hljs-number">10.0</span><span class="hljs-number">.0</span><span class="hljs-number">.2</span>/<span class="hljs-number">32</span>

[Peer]
PublicKey = NwsexampleNbw+s4sBnotFl6HrealxExu6o63r2B0s=
AllowedIPs = <span class="hljs-number">10.0</span><span class="hljs-number">.0</span><span class="hljs-number">.3</span>/<span class="hljs-number">32</span>
</code></pre><h3 id="heading-start-up-the-vpn">Start up the VPN</h3>
<pre><code>sudo systemctl start wg-quick@wg0
</code></pre><p>If you don't have systemd (which might be true if your instance is running Amazon Linux) you could use <code>sudo wg-quick up wg0</code>.</p>
<h1 id="heading-step-three-create-the-client-config">Step three: create the client config</h1>
<p>First install Wireguard on your client machine, either the same way on Linux or through an app store if you're using Windows, macOS, Android, or iPhone. </p>
<p>If you used an online-key-generator or QR script in Step One, then you can connect your phone by taking a picture of the QR code.</p>
<p>Once WireGuard is installed on the client, configure it using these values:</p>
<pre><code># Replace the PrivateKey value <span class="hljs-keyword">with</span> the one <span class="hljs-keyword">from</span> your client interface
[Interface]
Address = <span class="hljs-number">10.0</span><span class="hljs-number">.0</span><span class="hljs-number">.2</span>/<span class="hljs-number">24</span>
ListenPort = <span class="hljs-number">51820</span>
PrivateKey = CNNjIexAmple4A6NMkrDt4iyKeYD1BxSstzer49b8EI=

#use the VPN server<span class="hljs-string">'s PublicKey and the Endpoint IP of the cloud instance
[Peer]
PublicKey = WbdIAnOTher1208Uwu9P17ckEYxI1OFAPZ8Ftu9kRQw=
AllowedIPs = 0.0.0.0/0
Endpoint = 34.69.57.99:51820</span>
</code></pre><p>There are many optional add-ons that you might want depending on your use-case, such as specifying DNS or pre-shared keys for an extra layer of security.</p>
<p>Start up the client in same way as the server if you are on Linux or through the application itself on other systems.</p>
<h1 id="heading-test-your-vpn">Test your VPN</h1>
<p>Type "my ip" in your browser to discover your public IP address. If the IP you get is different from the address your computer had before starting the VPN, then you were successful!</p>
<p>(And if you forgot what it was before, try <code>sudo systemctl stop wg-quick@wg0</code>, checking and starting it again.)</p>
<h1 id="heading-troubleshooting-guide">Troubleshooting Guide</h1>
<p>Make sure your server is configured for IP forwarding. Check the /etc/sysctl.conf file, or run:</p>
<pre><code>echo <span class="hljs-number">1</span> &gt; <span class="hljs-regexp">/proc/</span>sys/net/ipv4/ip_forward
</code></pre><p>Your connection dies often? Add this to the peer section of the client configuration:</p>
<pre><code>PersistentKeepalive = <span class="hljs-number">25</span>
</code></pre><p>Not sure why it's not working? Try <code>sudo tcpdump -i eth</code> on the server while trying to use the client.</p>
<h2 id="heading-thanks-for-reading-this-guide">Thanks for reading this guide.</h2>
<p>If you want to dive deeper, consider taking <a target="_blank" href="https://www.manning.com/liveproject/secure-business-infrastructure-with-a-custom-vpn?a_aid=bootstrap-it&amp;a_bid=b9d7d398&amp;chan=VPN">my paid Manning course on WireGuard VPN</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What does a VPN do and how does it work? A Guide to Virtual Private Networks ]]>
                </title>
                <description>
                    <![CDATA[ Security should be a top priority for you when you're surfing the web, especially if you're not at home on your own wifi network.  If you travel a lot, work in coffee shops with public wifi, or deal with sensitive data - or even if you use online ban... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-does-a-vpn-do-and-how-does-it-work-a-guide-to-virtual-private-networks/</link>
                <guid isPermaLink="false">66b1fa859a6b87531e8fe7d2</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ privacy ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abigail Rennemeyer ]]>
                </dc:creator>
                <pubDate>Fri, 15 Nov 2019 18:01:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/vpn-image.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Security should be a top priority for you when you're surfing the web, especially if you're not at home on your own wifi network. </p>
<p>If you travel a lot, work in coffee shops with public wifi, or deal with sensitive data - or even if you use online banking, for example - you should consider taking some extra precautions.</p>
<p>One good way to help protect your personal data, and any sensitive info you might send through the interwebs, is getting a VPN. A Virtual Private Network adds an important layer of security when you're using the internet, and it's not hard to get one and set it up in a few minutes.</p>
<p>Let's look at what a VPN is, how it works to protect you, and what you can expect when you use one.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-205.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@kenziem?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Mackenzie Marco / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<h2 id="heading-what-is-a-vpn">What is a VPN?</h2>
<p>A VPN is a service that allows you to browse the web more safely and anonymously. It's a connection method that essentially places your own private network on top of a public network so that your computer or device can connect to its destination as if connected directly through that private network.</p>
<h2 id="heading-how-does-it-work">How does it work?</h2>
<p>A VPN takes the data that you send through the internet, encrypts it, passes it through its own server, and sends it to its destination.</p>
<p>A couple important things are going on here.</p>
<h3 id="heading-the-vpn-encrypts-your-data">The VPN encrypts your data.</h3>
<p>This means that hackers, the government, or your ISP (Internet Service Provider) can't see what you're sending or receiving. And yes, all of those entities can potentially gain access to your data with varying degrees of ease.</p>
<p>Basically, the VPN takes the data packets to be sent, wraps them in an extra layer of security (=encryption) and sends the encrypted packets on their way through an encrypted tunnel. And there's only one way to decrypt that data: with the unique key in the pair provided by the VPN.</p>
<p>So if someone intercepts that data, all they'll see is garbled nonsense that would take a supercomputer many, many years to decrypt without the key.</p>
<h3 id="heading-the-vpn-uses-its-own-servers">The VPN uses its own servers</h3>
<p>In addition to making your data unreadable to hackers and others, the VPN passes that data through its own server before sending it to its destination. This makes it look like that data came from that server, and makes it virtually impossible to connect it to you. </p>
<p>Why is this important? Well, folks trying to steal your data can get a lot of info just from your IP address (which is unique to your computer). But if that's hidden (and a hacker just sees the VPN's IP address instead), a hacker can't get much info about you out of that.</p>
<h2 id="heading-why-should-you-get-a-vpn">Why should you get a VPN?</h2>
<p>You might think you don't often find yourself in a situation where you need to be <strong>that</strong> concerned with online security. But a VPN can be helpful in numerous situations.</p>
<h3 id="heading-frequent-fliers">Frequent fliers</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-206.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@margobr?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Margo Brodowicz / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>If you travel a lot (or even a little) you'll likely encounter some sketchy or insecure wifi networks. This means that hackers could take advantage of that fact and snoop on your online activity.</p>
<p>If you get online via an insecure network, your data is even less safe than usual. But if you're using a VPN, your data is encrypted and ready to roll securely. </p>
<h3 id="heading-dealing-with-sensitive-info">Dealing with sensitive info</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-207.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@blankerwahnsinn?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Fabian Blank / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>Do you bank online? Maybe you need to check your account balance. What about setting up doctor's visits or emailing a colleague about important research? </p>
<p>There are many instances where you might not want anyone else to see the data you're dealing with online. And using a VPN makes sure that no one (your employer, government agencies, malicious hackers) can capture those private details and use them to harm you.</p>
<h3 id="heading-concealingchanging-your-location">Concealing/changing your location</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-208.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@dead____artist?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Capturing the human heart. / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>Certain countries restrict certain websites (like China banning Facebook, for example - but there are many others) and this might prove frustrating if you're traveling or have relocated to such a place.</p>
<p>If you have a VPN based in, for example, the USA where those restrictions don't apply, you should be able to bypass those restrictions and visit your favorite websites and use your favorite streaming services. </p>
<p>Remember why? Because a VPN uses its own servers (based in the USA or wherever the company is located) and websites identify those servers as the source of the device. So you could be in China surfing away via your Connecticut-based VPN.</p>
<h3 id="heading-protecting-your-browsing">Protecting your browsing</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-209.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@plushdesignstudio?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Plush Design Studio / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>Say you'd like to buy your daughter a birthday gift, but you don't want ads for that gift showing up on your family desktop. If you use a VPN, especially one with a no-logs policy (more on that below), that data won't be stored.</p>
<p>Note: If you need more info on private browsing, check out <a target="_blank" href="https://www.freecodecamp.org/news/private-browser-how-to-use-incognito-mode-in-chrome-and-safari/">this article on incognito mode</a>.</p>
<h2 id="heading-different-protocols-different-levels-of-security">Different protocols, different levels of security</h2>
<p>Different VPN services offer different features and use different protocols. This is definitely something you want to review before choosing a VPN.</p>
<p>Here are a few things to look for and keep in mind:</p>
<h3 id="heading-choose-a-vpn-that-uses-openvpn-or-ikev2ipsec">Choose a VPN that uses OpenVPN or IKEv2/IPSec</h3>
<p>There are a number of protocols used by VPNs, but OpenVPN and IKEv2 are the best and most common.</p>
<p><strong>OpenVPN</strong> is the most widely used protocol. It's safe, quite fast, and open source. So what's not to love?</p>
<p>IKEv2/IPSec isn't as common yet, but its security, speed, and responsiveness make it a really good choice.</p>
<h3 id="heading-check-the-vpns-logging-policy">Check the VPN's logging policy</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-210.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@mvdheuvel?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Maarten van den Heuvel / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>When you're choosing a VPN, check what they say about logs. Logs refer to the data the VPN keeps about you and your browsing sessions. It could be things like:</p>
<ul>
<li>Your activity</li>
<li>Your IP address</li>
<li>When you get on/offline</li>
<li>What devices you're using</li>
<li>Payment history</li>
</ul>
<p>Some of these things may not be super private, but they can pretty much all be used to learn more about you, which you don't want.</p>
<p>Some VPNs keep some logs. Some don't keep any (which you should definitely prefer). Bottom line: the more info a VPN stores about you, the more some other individual/agency can potentially find out. So look for a "no logs" policy in your VPN's privacy statement.</p>
<h3 id="heading-a-vpn-doesnt-make-you-invincible">A VPN doesn't make you invincible</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-211.png" alt="Image" width="600" height="400" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@yogipurnama?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit"&gt;Yogi Purnama / &lt;a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm<em>campaign=api-credit)</em></p>
<p>You may think that using a VPN makes you completely invulnerable to online attacks. Unfortunately, this isn't the case.</p>
<p>A VPN is only as secure as its parts. So before you choose one, make sure you check for all features discussed in this article, like:</p>
<ul>
<li>A solid, secure protocol (OpenVPN or IKEv2/IPSec when possible)</li>
<li>A no logging policy</li>
<li>The level of encryption the VPN uses</li>
<li>Whether they keep logs of your payment history (and potentially identifying info)</li>
<li>The rules of the country where the VPN is based (some countries may force VPNs to keep/hand over certain info)</li>
</ul>
<p>Now that you have a bit more information about VPNs, you should be able to make an informed decision about whether to get one and how to choose the right one for you.</p>
<p>Happy safe browsing!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to strengthen your personal cybersecurity posture for when you're just this guy, you know? ]]>
                </title>
                <description>
                    <![CDATA[ “Zaphod’s just this guy, you know?” – Halfrunt, Hitchhiker’s Guide to the Galaxy by Douglas Adams. The book, not the movie. Definitely not the movie. Some people (??‍) are really into cybersecurity, end-to-end encryption, and totally geeked out when... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/personal-cybersecurity-posture/</link>
                <guid isPermaLink="false">66bd8f6dabf0ccf74f1ce993</guid>
                
                    <category>
                        <![CDATA[ authentication ]]>
                    </category>
                
                    <category>
                        <![CDATA[ biometric authentication ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ internet ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Victoria Drake ]]>
                </dc:creator>
                <pubDate>Tue, 08 Oct 2019 13:05:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/10/cover.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <blockquote>
<p><em>“Zaphod’s just this guy, you know?”</em></p>
<p>– Halfrunt, Hitchhiker’s Guide to the Galaxy by Douglas Adams. The book, not the movie. Definitely not the movie.</p>
</blockquote>
<p>Some people (??‍) are really into cybersecurity, end-to-end encryption, and totally geeked out when they first learned how the <a target="_blank" href="https://en.wikipedia.org/wiki/Enigma_machine">Enigma</a> worked. These people are likely to have an innate interest in building a less-than-laughable personal cybersecurity posture.</p>
<p>Most people, unfortunately, consider cybersecurity optional. Most people say things like:</p>
<p><em>“There’s no one targeting lil ol’ me.”</em><br> <em>“I have nothing to hide, anyway.”</em><br> <em>“I’m too busy to learn all this stuff. Why can’t someone just give me a simple summary of best practices that I can skim in approximately seven minutes?”</em></p>
<p>To those people, I say, hello, hypothetical incorporeal reader! Here is a simple summary of best practices that you can skim in approximately seven minutes.</p>
<h4 id="heading-wait-why-do-i-care">Wait why do I care</h4>
<p>You may have a hard time understanding why cybersecurity matters when you’re just an average person. Sure, you don’t want your devices hacked or your personal data stolen, but it’s not like anyone is coming after <em>you</em>, specifically, right?</p>
<p>Hey Alex, I’ll take “right,” for $400. It’s unlikely anyone is attempting to steal your <em>particular</em> stuff, although I must admit that Persian rug of yours would really tie the room together. Instead, it can help to understand cybersecurity if you think of it in terms of low-hanging fruit.</p>
<p>You’ve got some fruit, I’ve got some fruit. Joe from down the block has a 1.21 gigawatt flux-capacitor-powered fruit-snatching robot. Joe doesn’t know either of us exist, but his robot goes (very quickly) from door to door, all the way around the block, looking for fruit. If my front door is locked and yours is standing open, whose fruit is Joe’s robot going to snatch?</p>
<p>If that sounds like boring, old, <em>regular</em> security, you’re correct! Cybersecurity isn’t about finding some magic spell that makes your fruit maximally secure. It’s about making your fruit more secure than the fruit next to you. You do this by employing some thoughtful habits, in much the same way as you learned to lock your front door to guard against fruit-snatching robots.</p>
<p>Security breaches and incidents happen every day. Most of them occur because an automated scanner cast a wide net and found a person or company with lax security that a hacker could then exploit. Don’t be that guy.</p>
<h4 id="heading-wait-whats-a-security-posture-anyway">Wait what's a security posture anyway</h4>
<p>Here is how the National Institute of Standards and Technology defines security posture:</p>
<blockquote>
<p><em>The security status of an enterprise’s networks, information, and systems based on information assurance resources (e.g., people, hardware, software, policies) and capabilities in place to manage the defense of the enterprise and to react as the situation changes.</em> (<a target="_blank" href="https://csrc.nist.gov/publications/detail/sp/800-30/rev-1/final#pubs-topics">NIST Special Publication 800–30, B-11</a>)</p>
</blockquote>
<p>The important bit above is, <em>“capabilities in place to manage the defense of the enterprise.”</em> In the context of personal security, you are the enterprise. Congratulations. May you boldly go where no man has gone before.</p>
<p>Before you explore strange new worlds (it <em>is</em> the Internet, after all), there are steps you can take to manage your defenses. The word “capabilities” is apt, as having certain things in place will pretty much give you cybersecurity superpowers. Here are the three steps I consider most important and beneficial:</p>
<ol>
<li>Use multifactor authentication</li>
<li>Use a VPN</li>
<li>Develop healthy skepticism</li>
</ol>
<p>With these three keys in hand, your cybersecurity posture goes from being robot lunch to War Games — where the winning move for an attacker is not to play.</p>
<h4 id="heading-1-use-multifactor-authentication">1. Use multifactor authentication</h4>
<p>Passwords are dead. Computationally, they are a solved problem, and cracking passwords is just <a target="_blank" href="https://howsecureismypassword.net/">a matter of time</a>. Unfortunately, many people still help to speed up the process by using the same <a target="_blank" href="https://haveibeenpwned.com/Passwords">compromised passwords</a> for multiple accounts, putting themselves at risk for inconceivable benefit. <a target="_blank" href="https://pages.nist.gov/800-63-3/sp800-63b.html#a2-length">Pass phrases</a> are longer and more complicated, and would take a lot more time to crack. I highly recommend them; even so, <a target="_blank" href="https://techcommunity.microsoft.com/t5/Azure-Active-Directory-Identity/Your-Pa-word-doesn-t-matter/ba-p/731984">your password ultimately doesn’t matter</a>.</p>
<p>The answer, at least for now, is <a target="_blank" href="https://en.wikipedia.org/wiki/Multi-factor_authentication">multifactor authentication</a> (MFA). MFA is made up of three kinds of authentication factors:</p>
<ol>
<li>Something you know, like a pass phrase;</li>
<li>Something you have, like a chip pin card or phone; and</li>
<li>Something that you are, like your face or fingerprint.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/mfa.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Two or more of these factors are infinitely better than a password alone, especially if <a target="_blank" href="https://en.wikipedia.org/wiki/List_of_the_most_common_passwords">your password is on this list</a>.</p>
<p>Multiple authentication factors are now widely supported by account providers and social media sites. If you have the choice, avoid using text messages as a way of receiving authentication codes. SMS authentication leaves you vulnerable to the <a target="_blank" href="https://en.wikipedia.org/wiki/SIM_swap_scam">SIM swap attack</a> — please direct further questions to <a target="_blank" href="https://www.nytimes.com/2019/09/05/technology/sim-swap-jack-dorsey-hack.html">Jack Dorsey</a>. Instead, use an authenticator app like <a target="_blank" href="https://google-authenticator.com/">Google Authenticator</a> to generate codes on your device. This ensures that you alone, using that particular device, will have the correct authentication code. No power in the ‘verse can stop you.</p>
<p>The Google Authenticator app works with the specific device you set it up on, so when you get a new device you will need to <a target="_blank" href="https://support.google.com/accounts/troubleshooter/4430955?hl=en#ts=4430956">move Google Authenticator to your new phone</a>. Hardware authentication keys such as the <a target="_blank" href="https://www.yubico.com/">YubiKey</a> may present less hassle when switching devices, but aren’t yet as widely supported as authentication apps.</p>
<h4 id="heading-2-use-a-vpn">2. Use a VPN</h4>
<p>The difference between using a VPN and not using one is like how The Dark Knight Rises was really good and Batman v Superman was really, really bad. Same franchise, totally different standards.</p>
<p>Let’s say you send a lot of mail, but never bother to put your letters in envelopes or even fold them in half. Anyone who bothers to look will know that you’re not really the Dread Pirate Roberts after all. When you use a Virtual Private Network, especially if you often connect to public WiFi, it’s like putting your letters into cryptographically-sealed envelopes and sending them via a special invisible courier service. No one but the intended recipient can read your letters, and no one but you and the courier know to whom the letters are sent.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/vpnmail.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>VPNs prevent others from reading your communications, like opportunistic attackers who scan open WiFi, and even your own Internet Service Provider (ISP) who may sell your usage data for advertising dollars.</p>
<p>Choosing a trustworthy VPN provider requires some research, and is in itself material enough for a separate article. As a starting point, look for providers with firm policies against logging, and expect to pay between $5-$10 USD monthly for the service. Avoid free VPN apps and services with ambiguous privacy policies; they’ll typically cost you much more than you’ll know.</p>
<h4 id="heading-3-develop-healthy-skepticism">3. Develop healthy skepticism</h4>
<p>Ultimately, the weakest link in your cybersecurity defense is you. All the MFA and VPNs on the Internet won’t protect you if a scam or malware bot can trick you into opening the front gates. Yes, I know it’s a very nice looking wooden horse. Also free. Did you order it? No? Then it can stay outside.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/horse.png" alt="Image" width="600" height="400" loading="lazy">
<em>Always look a Trojan gift horse in the mouth.</em></p>
<p>Develop the habit of second-guessing things delivered to your virtual doorstep. Email, phone, and messaging scams range in sophistication, from rickety robot-assembled shotgun blasts to elaborate social engineering attacks that <a target="_blank" href="https://www.youtube.com/watch?v=8bAuA1isCz0">use cognitive biases very effectively</a>. Don’t assume you’re too clever for them; humans are very predictable creatures. After all, nobody expects the Spanish Inquisition.</p>
<p>Instead, ask questions. Double check communications that ask you to click on links or visit a website, even if they come from someone you know or a company you use. If you’re not certain, based on a previous in-person interaction, that your friend or bank or mother sent this email, pick up the phone and call them. Even if you think you are certain, pick up the phone and check. You don’t call your mother enough, anyway.</p>
<p>Oh, and if the person on the phone is from your local tax office or the IRS or the CRA and they’re about to freeze your accounts because a case of mistaken identity has resulted in you being criminally charged for not repaying a loan on a 600-foot yacht in Malibu, just hang up. You know better than that. Tax agencies don’t have phones.</p>
<h4 id="heading-your-personal-cybersecurity-starter-pack">Your personal cybersecurity starter pack</h4>
<p>You now have three keys to open three gates to a robust personal cybersecurity posture. If those keys have also unlocked your curiosity, there’s plenty more rabbit hole to go down. I highly recommend the <a target="_blank" href="https://securityinfive.com/">Security in Five podcast</a> for Binary Blogger’s great advice, which inspired much of this post. <a target="_blank" href="https://ssd.eff.org/">Surveillance Self Defense</a> offers the Electronic Frontier Foundation’s tips on securing online communication. Troy Hunt also has a YouTube series entitled <a target="_blank" href="https://www.troyhunt.com/get-to-grips-with-internet-security-basics-courtesy-of-varonis/">Internet Security Basics</a> that goes into more depth on how to protect yourself online.</p>
<p>For now, I hope you use your newfound cybersecurity powers for good. Mind what you have learned. Save you it can.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How you can use OpenVPN to safely access private AWS resources ]]>
                </title>
                <description>
                    <![CDATA[ This article was adapted from part of my new Pluralsight course, “Connecting On-prem Resources to your AWS Infrastructure.” Do you sometimes need to connect to resources you’ve got running on Amazon Web Services? Accessing your public EC2 instances u... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-you-can-use-openvpn-to-safely-access-private-aws-resources-f904cd24f890/</link>
                <guid isPermaLink="false">66b995f73cd81de09c96b28c</guid>
                
                    <category>
                        <![CDATA[ AWS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ David Clinton ]]>
                </dc:creator>
                <pubDate>Tue, 12 Jun 2018 22:49:42 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*MgRSD6yOMt1f4JpfGBrfOg.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p><em>This article was adapted from part of my new Pluralsight course, “<a target="_blank" href="http://pluralsight.pxf.io/c/1191769/424552/7490?subId1=solving&amp;u=https%3A%2F%2Fapp.pluralsight.com%2Fprofile%2Fauthor%2Fdavid-clinton">Connecting On-prem Resources to your AWS Infrastructure</a>.”</em></p>
<p>Do you sometimes need to connect to resources you’ve got running on Amazon Web Services? Accessing your public EC2 instances using SSH and encrypting your S3 data is, for all intents and purposes, secure enough. But what about getting into a back-end RDS database instance or working with AWS-based data that’s not public? There are all kinds of reasons why admins keep such resources out of reach of the general public. But if you can’t get at them when you need, what good are they likely to do you?</p>
<p>So you’ll need to find a safe and reliable way around the ACLs and security groups protecting your stuff. One solution I cover in <a target="_blank" href="http://pluralsight.pxf.io/c/1191769/424552/7490?subId1=solving&amp;u=https%3A%2F%2Fapp.pluralsight.com%2Fprofile%2Fauthor%2Fdavid-clinton">my “Connecting On-prem Resources to your AWS Infrastructure” course on Pluralsight</a> is Direct Connect. But if Direct Connect’s price tag is a budget-buster for your company, then some kind of VPN tunnel might do the trick.</p>
<h3 id="heading-whats-a-virtual-private-network">What’s a Virtual Private Network?</h3>
<p>Virtual Private Networks (VPNs) are often used to allow otherwise restricted network activity or anonymous browsing. But that’s not what this article is about.</p>
<p>A VPN is a point-to-point connection that lets you move data securely between two sites across a public network. Effectively, a tunnel can be designed to combine two geographically separated private sites into one single private network. In our context, that would mean connecting your local office network with the AWS VPC that’s hosting your private resources.</p>
<p>There are two ways to do this:</p>
<ul>
<li>A managed VPN Connection built on top of an AWS Virtual Private Gateway</li>
<li>Using your own VPN.</li>
</ul>
<p>This article will focus on the do it yourself method.</p>
<h4 id="heading-the-openvpn-access-server">The OpenVPN Access Server</h4>
<p>As the name suggests, <a target="_blank" href="https://openvpn.net/">OpenVPN</a> is an open source project, and you’re always able to download the free community edition and set things up on your own VPN server. But the OpenVPN company also provides a <a target="_blank" href="https://openvpn.net/index.php/access-server/on-amazon-cloud.html">purpose-built OpenVPN Access Server as an EC2 AMI</a> which comes out of the box with AWS-friendly integration and automated configuration tools.</p>
<p>From what I can see, launching the AMI within your AWS VPC and opening it up for controlled remote connections has pretty much become the “right” way to get this job done.</p>
<p>What does it cost? If you’re only testing things out and don’t plan to access the VPN using more than two connections at a time, then the AMI itself is free. You’ll still be on the hook for the regular costs of an EC2 instance, but if your account is still eligible for the Free Tier, then you can get that for free, too.</p>
<p>Once you put your VPN into active production, the license you purchase will depend on how many concurrent connections you’ll need. <a target="_blank" href="https://docs.openvpn.net/getting-started/software-license-pricing/">This page</a> has the details you’ll need.</p>
<p>Here’s what we’re going to do in this guide:</p>
<ul>
<li>Select, provision, and launch an Ubuntu AMI with OpenVPN Access Server pre-installed into my VPC</li>
<li>Access the server using SSH and configure the VPN</li>
<li>Set up an admin user</li>
<li>Set up a local machine as an OpenVPN client and connect to a private instance in my AWS VPC</li>
</ul>
<p>Ready?</p>
<h3 id="heading-launching-an-openvpn-access-server">Launching an OpenVPN Access Server</h3>
<p>From the EC2 dashboard — and making sure we’re in the right AWS region — launch an instance to act as our VPN server. Rather than using one of the Quick Start AMIs, I’ll click on the AWS Marketplace tab and search for “openvpn access server”. OpenVPN provides a number of official images that are tied to licenses offering escalating numbers of connected clients.</p>
<p>I’m going to go with this Ubuntu image that works through a “Bring Your Own License” arrangement. As I wrote earlier, we won’t actually need a license for what we’re going to be doing.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/XTboqBVguN8FTVoSwQrnrGZuCkC97Y0vtyUu" alt="Image" width="800" height="450" loading="lazy">
<em>OpenVPN Access Server AMIs available from the AWS Marketplace</em></p>
<p>Selecting the AMI opens a popup telling us how much this image will cost us per hour using various instance types and EBS storage choices. Those are only regular AWS infrastructure costs, however, and don’t include license fees.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/HRL623PHVls25j6yVZW80nurh7rWJIDv3mSq" alt="Image" width="800" height="450" loading="lazy">
<em>OpenVPN Access Server AMI costs — billed directly by AWS</em></p>
<p>When it comes to instance type, I’ll downgrade to a t2.micro to keep it within the free tier. A busy production server might require a bit more power.</p>
<p>Because I’m going to want to start up a second instance in the same subnet in a few minutes, I’ll select, say, “us-east-1b” from the Configure Instance Details page, and make a note for later.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/6R-q7kO9yezjWvSf99cER4Xh4bA3zs5azISg" alt="Image" width="800" height="450" loading="lazy">
<em>Choose a subnet and note for later</em></p>
<p>Now the Security Group page is where the OpenVPN AMI settings really shine. We’re presented with a security group that opens up everything we’ll need. Port 22 is for SSH traffic into the server, 943 is the port we’ll use to access the admin GUI, 443 is TLS-encrypted HTTP traffic, and OpenVPN will listen for incoming client connections on port 1194.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/-h1D6QojwaZIVezNitxZDgaZqiLCbwFJ3FjS" alt="Image" width="800" height="450" loading="lazy">
<em>The Security Group that comes with the OpenVPN AMI</em></p>
<p><strong>Note</strong>: If practical, it would normally be a good idea to tighten those rules so only requests from valid company IP address ranges are accepted, but this will be fine for short-term testing.</p>
<p>From here, I’ll review my settings, confirm that I’ve got the listed SSH encryption key, and pull the trigger.</p>
<p>Once the instance is launched, I’ll be shown important login information — including the fact that the user account we’ll use to SSH into the server is called openvpnas — and a Quick Start guide. I’ll also receive an email containing links to the same information.</p>
<p>Back in the EC2 instances console, while the new machine finishes booting, we’re shown our public IP address. If we would ever need to reboot the instance, there’s no guarantee that we’d get that same IP again, which could cause a reasonable amount of mayhem. So it’s a good idea to assign the instance an Elastic IP.</p>
<p>To do that, I’ll click Elastic IPs and then Allocate new address. Note the new address and close the page. Now, with that address selected, click Actions, and “Associate Address”. I’ll click once in the Instance box and my OpenVPN instance — with its helpful tag — is listed. I only need to select it, click “Associate” and I’m done. From now on, that will be the permanent public IP for accessing our server.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/rQJ5leTI2CTmKdeHxJ8dacPyBz4ueo19IiFe" alt="Image" width="800" height="450" loading="lazy">
<em>Associate your new Elastic IP address with your instance</em></p>
<h3 id="heading-accessing-the-server">Accessing the server</h3>
<p>I’ll paste the public IP address into the terminal as part of my SSH command that calls the key pair I set for this instance.</p>
<pre><code>ssh -i KeyPairName.pem openvpnas@&lt;PublicIPAddress&gt;
</code></pre><p>If you’re accessing from a Windows or macOS machine, things might work a bit differently, but the documentation will give you all the help you’ll need.</p>
<p>Before I leave the Instances console, however, I’ll perform one more important function. With the OpenVPN instance selected, I’ll click Actions and then Networking and then “Change Source/Dest checking”. I’ll make sure that checking is disabled. Nothing much will be possible unless I do this.</p>
<p>Now over to my SSH session. As soon as it begins, I’m confronted by the OpenVPN EULA license agreement, and then the setup wizard. If you need to change a setting later you can always run the wizard again using this command:</p>
<pre><code>sudo ovpn-init — ec2.
</code></pre><p>Most of the wizard’s defaults will work fine, but it’s worth quickly explaining what’s happening. Here are the questions and some color commentary where necessary:</p>
<pre><code>primary Access Server node? yes [You’d answer no <span class="hljs-keyword">if</span> you were setting up a backup or failover node.]
specify the network interface and IP address to be used by the Admin Web UI [<span class="hljs-number">1</span> — For all interfaces; can be changed to <span class="hljs-keyword">static</span> later.]
specify the port number <span class="hljs-keyword">for</span> the Admin Web UI [<span class="hljs-keyword">default</span>]
specify the TCP port number <span class="hljs-keyword">for</span> the OpenVPN Daemon [<span class="hljs-keyword">default</span>]
Should client traffic be routed by <span class="hljs-keyword">default</span> through the VPN? [no--That’s   not the kind <span class="hljs-keyword">of</span> VPN we’re building here. What we’re doing is only about getting remote clients safely and securely into our VPC. The same applies to client DNS traffic.]
Should client DNS traffic be routed by <span class="hljs-keyword">default</span> through the VPN? [no] 
Use local authentication via internal DB? [no — can be useful, but we’ll use Linux/AWS authentication <span class="hljs-keyword">for</span> simplicity.]
Should private subnets be accessible to clients by <span class="hljs-keyword">default</span>? [yes — that’s the whole point <span class="hljs-keyword">of</span> the VPN, after all.]
login to the Admin UI <span class="hljs-keyword">as</span> “openvpn”? [yes]
Provide OpenVPN Access Server license key [Unnecessary <span class="hljs-keyword">for</span> testing.]
</code></pre><p>When the wizard completes, I’m shown some connection information and advised to install the network time daemon NTP. That won’t be necessary on this Ubuntu box, as it’s already installed and running by default.</p>
<p>As I mentioned earlier, I will need to give the openvpn user a password so I can use it to log into the web GUI. I do that as sudo with the passwd command.</p>
<pre><code>sudo passwd openvpn
</code></pre><p>That’s all the server-side stuff we’ll need. Now I’m going to use a browser to log into the web GUI. I use our server’s public IP address with the secure https prefix, followed by slash and admin.</p>
<pre><code>https:<span class="hljs-comment">//&lt;PublicIPAddress&gt;/admin</span>
</code></pre><p>You’ll get a “Your connection is not private” warning because we’re using a self-signed certificate rather than one provided by a Certificate Authority.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/s-fDsz3rKP9Pf7JqKYbPfyAlhUl4YHfSBz1m" alt="Image" width="800" height="450" loading="lazy">
<em>This is normal when using self-signing certificates</em></p>
<p>That’s not a problem for us, since we’re only exposing our VPN to select users from within our company, and they should be able to trust our certificate. So I’ll click through the warning, sign in, and agree to the EULA .</p>
<p>Feel free to spend some time exploring the features provided by the OpenVPN admin console on your own.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/VtQgAuVOfhbLTYII1HOdxO5cJiyQo44JSomR" alt="Image" width="800" height="450" loading="lazy">
<em>The OpenVPN admin console</em></p>
<h3 id="heading-setting-up-a-vpn-client">Setting up a VPN client</h3>
<p>Right now, however, I’m going to open the client UI page using the web access address we were shown before, but this time without the slash admin. This is nothing more than a login screen where you can authenticate using the same openvpn user as before. (You can always create new users back in the admin console.)</p>
<p>Behind the login screen, there’s just this set of links with directions for installing the OpenVPN client app on any of those platforms. The final link, however, is called “Yourself.”</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/GFJB-8yTJ0xVtQ1AXnsD1W0DApG3I6JVVXgz" alt="Image" width="800" height="450" loading="lazy">
<em>The OpenVPN client page</em></p>
<p>Clicking it will prompt you to download and save a file called client.ovpn. This file contains the configuration settings to match the server and the actual keys we’ll use to authenticate. You definitely want to treat this file with care so it doesn’t fall into the wrong hands. That would include not sending it through plain email across unencrypted connections.</p>
<p>I’ll open the file locally and copy the contents. Then, in a shell within a Linux virtual machine running in my local network, I’ll create a new file called client.ovpn and paste the contents in. If you had clicked through to the “OpenVPN for Linux” link in the client UI earlier, you would have seen that the only additional step necessary was to install OpenVPN using the Apt package manager — or Yum if you’re on a CentOS or Red Hat machine. Well that’ll take just one command. When it’s done its job, we’ll be all set.</p>
<pre><code>nano client.ovpnsudo apt updatesudo apt install openvpn
</code></pre><p>Next we’ll open the VPN connection. As root — using sudo — I’ll type openvpn with the config flag pointing to the client.ovpn configuration file I just created.</p>
<pre><code>sudo openvpn — config client.ovpn
</code></pre><p>When prompted to authenticate, use the openvpn account along with the password you created for it back on the server.</p>
<p>Now I’ll open a second shell session on my local client so I can try to ssh in to the OpenVPN server using its <em>local</em> IP address — something that would be impossible without a working VPN connection.</p>
<p>First though, run ip a to list all the network interfaces active on this machine.</p>
<pre><code>ip a
</code></pre><p>Besides your local network, you should also see one called tun0. This interface was created by OpenVPN and will usually lie within the 172.16.x.x range.</p>
<p>I’ll ssh into the remote server using my private key — which, of course, needs to exist locally — and the server’s <em>private</em> IP address. If it works, you’ll have yourself a VPN!</p>
<pre><code>ssh -i KeyPairName.pem openvpnas@&lt;PrivateIPAddress&gt;
</code></pre><p>Finally, I’ll demonstrate that the VPN, as it’s currently configured, will allow us access to other private resources within our Amazon VPC. This could be useful if, for instance, you’ve got a database instance running in the VPC that you can’t expose to the public network.</p>
<p>I’m going to launch a standard Ubuntu EC2 instance but I <em>won’t</em> give it a public IP. I’ll specify the same us-east-1b subnet we used for the OpenVPN server to keep things simple. The security group I’ll use will permit SSH access through port 22 but nothing else.</p>
<p>Once that’s running, I’ll note its private IP address and head back to my local client. Once I’m sure the instance is fully launched, I’ll ssh in using the same private key, the “ubuntu” username — since that’s the default for normal Ubuntu EC2 instances — and the private address I just copied.</p>
<p>Again. If it works, you’ll have a fully-configured VPN connection into your AWS private resources. Savor the moment.</p>
<p>Don’t forget to shut down all your servers and release your Elastic IP address when you’re done using them. You don’t want to incur costs unnecessarily.</p>
<p>_This article was adapted from part of my new Pluralsight course, “<a target="_blank" href="http://pluralsight.pxf.io/c/1191769/424552/7490?subId1=solving&amp;u=https%3A%2F%2Fapp.pluralsight.com%2Fprofile%2Fauthor%2Fdavid-clinton">Connecting On-prem Resources to your AWS Infrastructure</a>.” There’s lots more where that came from at my <a target="_blank" href="https://bootstrap-it.com">Bootstrap IT site</a>, including links to my book, Linux in Action, and a hybrid course called <a target="_blank" href="https://www.manning.com/livevideo/linux-in-motion?a_aid=bootstrap-it&amp;a_bid=0c56986f&amp;chan=motion1">Linux in Motion</a> that’s made up of more than two hours of video and around 40% of the text of Linux in Action._</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to run your own OpenVPN server on a Raspberry PI ]]>
                </title>
                <description>
                    <![CDATA[ By Denis Nuțiu My Raspberry, serving as an OpenVPN server Hello everyone! In this short article I will explain how to setup your own VPN (Virtual Private Network) server on a Raspberry PI with OpenVPN. After we setup the server, we will setup an obf... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/running-your-own-openvpn-server-on-a-raspberry-pi-8b78043ccdea/</link>
                <guid isPermaLink="false">66c35e2c56e6b06442afd86d</guid>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Raspberry Pi ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vpn ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 22 Apr 2018 10:14:17 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*WEXV6clyYAztJhQ97TtYNw.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Denis Nuțiu</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/aShx3zgBveeNtJo-SyE1AF5Zs4UquT2lNpR6" alt="Image" width="800" height="600" loading="lazy">
<em>My Raspberry, serving as an OpenVPN server</em></p>
<p>Hello everyone!</p>
<p>In this short article I will explain how to setup your own VPN (Virtual Private Network) server on a Raspberry PI with OpenVPN. After we setup the server, we will setup an obfuscation server in order to disguise our traffic indicating that we’re using a VPN. This will help us evade some form of censorship.</p>
<h3 id="heading-why-use-a-vpn">Why use a VPN?</h3>
<p>First, let’s talk about why you may want to use a VPN server:</p>
<ol>
<li>Avoid man in the middle attacks. If you have a malicious user on your local network — even your roommate — that person is able to monitor your unencrypted traffic and tamper with it.</li>
<li>Hide your internet activity from your ISP (Internet Service Provider) or University, in my case.</li>
<li>Unblock services. My University blocks all UDP (User Datagram Protocol) packets. This means that I cannot use any application that communicates via UDP. I can’t use my email client, play games, or even use Git!</li>
</ol>
<p>I decided to setup a VPN on my home internet using a Raspberry Pi. This way I can connect to my home network while I’m at the University. If you need a VPN server in another country, you can buy a 5$/month virtual private server from <a target="_blank" href="https://m.do.co/c/22f012126c25">DigitalOcean</a>. You can use my referral link in order to get $10 off — that’s two months of free VPN. But you don’t have to use it if you don’t want to.</p>
<h3 id="heading-installing-openvpn">Installing OpenVPN</h3>
<p>This step is really easy, because we will use a shell script to do it for you. So you just have to “press” next and finish.</p>
<p>The installation will take a long time, depending on the key-size you chose. On my Raspberry Pi 3 Model B, it took about 3 hours.</p>
<p>Please go this repository and then follow the instructions</p>
<p><a target="_blank" href="https://github.com/Angristan/OpenVPN-install"><strong>Angristan/OpenVPN-install</strong></a><br><a target="_blank" href="https://github.com/Angristan/OpenVPN-install">_OpenVPN-install - Set up your own OpenVPN server on Debian, Ubuntu, Fedora CentOS, and Arch Linux_github.com</a></p>
<p>If you don’t know the IP address of your server, just put <code>0.0.0.0</code> . I’ve chosen <code>443</code> for the port and <strong>TCP</strong> (Transmission Control Protocol) for the protocol.</p>
<p><strong>Note</strong>: This is very important because my university only allows <strong>TCP/80</strong> and <strong>TCP/443</strong> ports, the rest are pretty much blocked. Also Obfsproxy only works with TCP, so make sure you chose <strong>TCP</strong>!</p>
<p>After the script has finished, you’ll get an <strong>.ovpn</strong> file. It can be imported in your favourite VPN client, and everything should work out of the box.</p>
<h4 id="heading-testing-the-connection">Testing the connection</h4>
<p>Import the .ovpn file in your VPN client and change the ip <code>0.0.0.0</code> to the local ip of your Raspberry PI. Depending on your network configuration it may be of the form<code>192.168.*.*</code> .</p>
<p><em>Note: This will only work if you are connected to the same WiFi as the Pi is.</em></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/RwesiNeDbzJfYs6cuC7KtJ0IWIuHExaale8S" alt="Image" width="405" height="447" loading="lazy">
<em>Viscosity successfully connected to my VPN server.</em></p>
<p><strong>I’ve configured my router so the PI always gets a reserved IP address. You may have to check out your router settings if you want to do something similar.</strong></p>
<p>If the connection is successful, congratulations, you now have a VPN server! But, you cannot access it from outside… yet.</p>
<p>If you only want an OpenVPN server without the obfuscation proxy, then you can skip to <strong>Port Forwarding</strong>.</p>
<h3 id="heading-obfuscation-proxy-install">Obfuscation <strong>Proxy Install</strong></h3>
<p>Obfs4 is a scrambling proxy. It disguises your internet traffic to look like noise. Somebody who snoops on your traffic won’t actually know what you’re doing, and it will protect you from active probing attacks which are used by the Great Firewall of China.</p>
<p><em>Note: This method won’t work if your adversary allows only whitelisted traffic :(</em></p>
<h4 id="heading-lets-install-the-proxy-server-now">Let’s install the proxy server now.</h4>
<ol start="0">
<li>Install the required package:</li>
</ol>
<pre><code>apt-get update &amp;&amp; apt-get install obfs4proxy
</code></pre><ol>
<li>Create a directory that will hold the configuration.</li>
</ol>
<pre><code>sudo mkdir -p /<span class="hljs-keyword">var</span>/lib/tor/pt_state/obfs4
</code></pre><ol start="2">
<li>Create the configuration file.</li>
</ol>
<pre><code>sudo nano /<span class="hljs-keyword">var</span>/lib/tor/pt_state/obfs4/obfs4.config
</code></pre><p>In the configuration file, you will paste the following things:</p>
<pre><code>TOR_PT_MANAGED_TRANSPORT_VER=<span class="hljs-number">1</span>TOR_PT_STATE_LOCATION=<span class="hljs-regexp">/var/</span>lib/tor/pt_state/obfs4TOR_PT_SERVER_TRANSPORTS=obfs4TOR_PT_SERVER_BINDADDR=obfs4<span class="hljs-number">-0.0</span><span class="hljs-number">.0</span><span class="hljs-number">.0</span>:<span class="hljs-number">444</span>TOR_PT_ORPORT=<span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>:<span class="hljs-number">443</span>
</code></pre><p><strong>TOR_PT_SERVER_BINDADDR</strong> is the address on which the proxy will listen for new connections. In my case it is it <code>0.0.0.0:444</code> — why 444 and not 443? Well, because I don’t want to change the OpenVPN server configuration which is currently listening on 443. Also, I will map this address later to 443 using Port Forwarding.</p>
<p><strong>TOR_PT_ORPORT</strong> should point to the OpenVPN server. In my case, my server runs on <code>127.0.0.1:443</code></p>
<ol start="3">
<li>Create a SystemD service file.</li>
</ol>
<pre><code>sudo nano /etc/systemd/system/obfs4proxy.service
</code></pre><p>Then paste the following contents into it:</p>
<pre><code>[Unit]Description=Obfsproxy Server[Service]EnvironmentFile=<span class="hljs-regexp">/var/</span>lib/tor/pt_state/obfs4/obfs4.configExecStart=<span class="hljs-regexp">/usr/</span>bin/obfs4proxy -enableLogging <span class="hljs-literal">true</span> -logLevelStr INFO[Install]WantedBy=multi-user.target
</code></pre><ol start="4">
<li>Start the Obfuscation proxy.</li>
</ol>
<p>Now, make sure that OpenVPN is running and run the following commands in order to start the proxy and enable it to start on boot.</p>
<pre><code>sudo systemctl start obfs4proxysudo systemctl enable obfs4proxy
</code></pre><ol start="5">
<li>Save the cert KEY</li>
</ol>
<p>After the service has started, run the following command and save the cert KEY.</p>
<pre><code>cat /<span class="hljs-keyword">var</span>/lib/tor/pt_state/obfs4/obfs4_bridgeline.txt
</code></pre><p>The key is of the form <code>Bridge obfs4 &lt;IP ADDRESS&gt;:&lt;PORT&gt; &lt;FIN**GER**PRINT&gt; c</code>ert=KEY iat-mode=0 . You will need it when you’re connecting to the VPN.</p>
<ol start="6">
<li>Testing the connections.</li>
</ol>
<p>Open up your VPN client and change the ip from 443 to 444 in order to connect to the proxy instead of the OpenVPN server.</p>
<p>After that, find the Pluggable Transport option in your OpenVPN client and see if it supports <strong>obfs4</strong>.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/k2ce9ab0OAcKCXASAkmIU6GyYVKLr7L1odm1" alt="Image" width="711" height="519" loading="lazy">
<em>Viscosity supports different Obfuscation methods such as: obfs2, obfs3, obfs4 and ScrambleSuit</em></p>
<p>If everything works, then you’re all set! Congratulations! Only a few more things to tweak before using this VPN from the outside world.</p>
<h3 id="heading-port-forwarding"><strong>Port Forwarding</strong></h3>
<p>In order to access the OpenVPN server from the outside world we need to unblock the ports, because they are most likely blocked. As you remember, I have reserved my PI’s IP address on my router to always be <code>192.168.1.125</code> so it doesn’t change if the PI disconnects or if the router reboots.</p>
<p>This way I have defined the following rules in my Port Forwarding table:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/NqZZFwzTrUAyzVuAHAHDly0Dpoe3zSO24N-i" alt="Image" width="712" height="201" loading="lazy">
<em>TL-WR841N’s Port Forwarding settings page.</em></p>
<p>The outside port <strong>443</strong> will point to the obfuscation’s server port <strong>444.</strong> If you don’t have an obfuscation server, then leave <strong>443-&gt;4</strong>43.</p>
<p>The port 25 will point to the PI’s SSH port 22. This is only for my own convenience.</p>
<p>In case I want to access the OpenVPN server directly without the obfuscation proxy, I have created a rule <strong>444-&gt;</strong>443</p>
<p>The service port is the <strong>OUTSIDE</strong> port that will be used with your <strong>PUBLIC</strong> IP address. To find your public IP, use a service like whatsmyip.com.</p>
<p>The internal port is the <strong>INSIDE</strong> port. It can be used only when you are connected to the network.</p>
<p>_Note: The first rule is saying redirect all the connections from <strong>PUBLIC_IP:443</strong> to <strong>192.168.1.125:444</strong>_</p>
<h4 id="heading-testing">Testing</h4>
<ol>
<li>Find your public IP and replace your old IP with the public IP in the .ovpn file or in the VPN client.</li>
<li>Connect to the VPN.</li>
</ol>
<p>That’s it.</p>
<h3 id="heading-dynamic-dns"><strong>Dynamic DNS</strong></h3>
<p>In most cases, your IP will change because it’s a dynamic IP. A way to overcome this is to create a small program on the PI that saves your IP and sends you an email every day or so. You may also store the IP in an online database such as Firebase.</p>
<p>My router has Dynamic DNS setting. This way I can use a service provider like NoIP and get a domain like <code>example.no-ip.com</code> that will always point to my public IP address.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/d-BrxA5r4qqvGgqjRzuSXGnMGcAncBIKUlu8" alt="Image" width="800" height="133" loading="lazy">
<em>TL-WR841N DDNS settings page</em></p>
<h4 id="heading-other-resources">Other Resources:</h4>
<ul>
<li><a target="_blank" href="https://trac.torproject.org/projects/tor/wiki/doc/AChildsGardenOfPluggableTransports">A Childs Garden Of Pluggable Transports</a></li>
<li>V<a target="_blank" href="https://www.sparklabs.com/support/kb/article/setting-up-an-obfuscation-server-with-obfsproxy-and-viscosity/">iscosity-Obsfurcation/</a></li>
<li><a target="_blank" href="https://www.pluggabletransports.info/transports/">https://www.pluggabletransports.info/transports/</a></li>
</ul>
<p>If you have any questions hit me up on <a target="_blank" href="https://twitter.com/denisnutiu">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
