<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sami Yousef</title>
    <description>The latest articles on DEV Community by Sami Yousef (@sami_yousef).</description>
    <link>https://dev.to/sami_yousef</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1050743%2F66254745-87bf-45ed-a7f8-7dd51c90123f.png</url>
      <title>DEV Community: Sami Yousef</title>
      <link>https://dev.to/sami_yousef</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sami_yousef"/>
    <language>en</language>
    <item>
      <title>Server Hardening: The Ultimate Guide</title>
      <dc:creator>Sami Yousef</dc:creator>
      <pubDate>Fri, 07 Apr 2023 07:18:00 +0000</pubDate>
      <link>https://dev.to/sami_yousef/server-hardening-the-ultimate-guide-1c7o</link>
      <guid>https://dev.to/sami_yousef/server-hardening-the-ultimate-guide-1c7o</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TpGzirX---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.samiyousef.ca/content/images/2023/04/hardened.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TpGzirX---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.samiyousef.ca/content/images/2023/04/hardened.webp" alt="Server Hardening: The Ultimate Guide" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In today's age of information and technology, server security has become more critical than ever before. These machines serve as the backbone of all our online operations, storing and handling sensitive information in immense quantities. Unfortunately, cybercriminals are always looking for new ways to exploit servers, steal data, and launch attacks. As such, it's crucial to protect servers from these threats and minimize the damage that occurs as a result of them. In this post, we will discuss server-hardening techniques, best practices, and common mistakes to avoid. Since I want this article to be as comprehensive as possible, it is quite long. Feel free to &lt;strong&gt;use the Table of Contents to the left to navigate&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is Server Hardening and Why is it Important?
&lt;/h4&gt;

&lt;p&gt;Server hardening is the process of securing a server and its applications to protect against cyberattacks such as malware. This is done by removing vulnerabilities or methods (a.k.a. &lt;strong&gt;attack vectors&lt;/strong&gt; ) that a hacker might use to access the server. The sum of these attack vectors is called an &lt;strong&gt;attack surface&lt;/strong&gt;. When hardening a server, our goal is to minimize the attack surface.&lt;br&gt;&lt;br&gt;
Your servers must stay secure to protect users' information, minimize downtime, and reduce the costs of dealing with data breaches. Many industries (such as banking) have regulatory standards for security, which are required by law, and server hardening helps to meet those standards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Server Hardening Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Control User Access
&lt;/h3&gt;

&lt;p&gt;While it might seem simple, restricting access to only authorized users is the most critical aspect of hardening a server, which is why I included it first. Users that access your server should be trusted, trained, and well-informed about good security practices. The most common way to control user access is to assign each user a unique account with only the required privileges they need to complete the task at hand. This concept is called the principle of least privilege (also applies to programs, processes, etc.), and is the fundamental building block is information security. Don't forget to regularly review and update user permissions to ensure that access is granted only on a need-to-know basis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implement Strong Authentication Methods
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Strong Passwords&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You should encourage users to use long, complex passwords that include a mix of uppercase and lowercase letters, numbers, and special characters. You should also consider enforcing a strong password for applications where security is of high importance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multifactor Authentication&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Another step you can take is to implement multifactor authentication. Server admins tend to skip this step because they think it's too complicated to set up or only applicable for enterprise settings, but this is far from the truth. How you set up MFA will depend on your OS but typically consists of installing a package and changing one or two configuration files. According to &lt;a href="https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/your-pa-word-doesn-t-matter/ba-p/731984?ref=sami-yousefs-blog"&gt;Alex Weinert&lt;/a&gt;, Group Program Manager for Identity Security and Protection at Microsoft, "Based on our studies, your account is more than 99.9% less likely to be compromised if you use MFA."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go Passwordless&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Passwords are arguably inferior to other authentication methods like key-based authentication. Of course, this is only a problem because humans are generally bad at using passwords effectively. &lt;a href="https://www.iproov.com/blog/the-end-of-passwords-iproov-consumer-survey?ref=sami-yousefs-blog"&gt;According to research by iProov&lt;/a&gt;, a security company that sells commercial biometric authentication services, people share, reuse and write down their passwords, which is a HUGE security risk.&lt;/p&gt;

&lt;p&gt;The alternative to passwords is key-based authentication which provides several advantages like being more convenient for users, preventing brute-force attacks, and is even a form of multi-factor authentication. You can learn how to enable key-based authentication for SSH by following &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server?ref=sami-yousefs-blog"&gt;this guide&lt;/a&gt; by Digital Ocean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preventing Brute-Force Attacks&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
By default, SSH will allow an attacker to try as many passwords as they want, albeit with some time delay. The default SSH settings allow an attacker to issue 10 connections in parallel, with each connection allowing 4 connection attempts before being reset. This means an attacker can try over 10K passwords in an hour. This is obviously not great for security. One way to mitigate this problem is to use tools like &lt;a href="https://www.fail2ban.org/wiki/index.php?ref=sami-yousefs-blog"&gt;fail2ban&lt;/a&gt;, which will automatically ban or jail hosts that have too many failed authentication attempts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disable Unused and Obsolete Features&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The SSH protocol was first introduced in 1995 and has gone through several changes since then. However, some not-so-secure features like X11 forwarding are still enabled by default on most SSH configurations. If you are not familiar with X11, it's a windowing system first introduced in 1984 but still commonly used in some Unix systems. Because of its age, it has many severe vulnerabilities that cannot be fixed without causing catastrophic changes to its API.; vulnerabilities that are so severe that they allow privilege escalation with a &lt;a href="https://medium.com/geekculture/exploiting-x11-unauthenticated-access-cc0e2184cece?ref=sami-yousefs-blog"&gt;simple script&lt;/a&gt;. Simply put, &lt;strong&gt;a "secure" shell with X11 forwarding enabled is just a shell.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another thing to consider is to disable SSH for certain users. Again, this is the principle of least privilege. If a user does not need or use SSH, then SSH access should be disabled for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use a secure, up-to-date operating system
&lt;/h3&gt;

&lt;p&gt;A secure and up-to-date operating system is often the most overlooked aspect of server hardening. Your operating system is the foundation of all your applications and services so it's essential to do  your research and choose a secure and reliable option. Generally, you want to avoid rolling-release operating systems like Arch Linux and choose a point-release OS like Debian instead. You should also avoid outdated versions and choose an LTS version if possible. Some good OS options include Red Hat Enterprise Linux, Debian/Ubuntu, Fedora Server, and FreeBSD. Regardless of which OS you choose, it's important to install updates and security patches regularly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Server Hardening Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Use a Virtual Private Network (VPN)
&lt;/h3&gt;

&lt;p&gt;No, probably not the VPN you're thinking about. When most people hear the words "VPN" they think of consumer VPNs, which don't actually give you access to a private network. Instead, they function more like a middleman between your computer and the service you are accessing. While consumer VPNs can be helpful in &lt;em&gt;some&lt;/em&gt; scenarios, they're almost useless for server hardening. Instead, we want to use a "true" VPN that allows us to access the private network.&lt;/p&gt;

&lt;p&gt;Instead of having servers exposed on the internet, we can place them inside a private network (our intranet). That is, the servers cannot be accessed from outside the intranet. To facilitate communication between the servers and clients, we can use a VPN gateway which has access to both our intranet and the internet. Typically, the VPN gateway only allows authorized users (like yourself or an employee) to access the network with a key. Popular choices for a VPN gateway include Wireguard (fastest), OpenVPN, and Tailscale (easiest to use).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_fdpR__x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.samiyousef.ca/content/images/2023/03/VPN-Diagram.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_fdpR__x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.samiyousef.ca/content/images/2023/03/VPN-Diagram.svg" alt="Server Hardening: The Ultimate Guide" width="800" height="437"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Note: this is only one way to secure a server with a VPN&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Intrusion Detection Systems (IDS)
&lt;/h3&gt;

&lt;p&gt;An IDS is a security tool that monitors a system for suspicious activity and alerts system administrators when threats are detected. An IDS typically operates at the network level (NIDS) or the host level (HIDS), each with its own advantages and disadvantages. At a minimum, you should have either a NIDS or a HIDS, but it's better to have both. Some popular HIDS include OSSEC, Tripwire, and Wazuh. And some popular NIDS include Snort, Suricata, and Zeek. The above IDSes also work as Intrusion Prevention Systems, which can take action instantly without needing to wait for a system admin.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoid Supply-Chain Attacks
&lt;/h3&gt;

&lt;p&gt;A supply-chain attack is one where the attackers target a third party that has access to your server (a.k.a your supply chain). A recent supply-chain attack happened in March 2021, where more than 20,000 US organizations were compromised through a back door that was installed via flaws in Microsoft Exchange Server. Supply-chain attacks can usually be prevented by choosing only reputable vendors with strict security compliance. You can also choose to use a third-party (ironic, I know) monitoring service like Snyk to identify and mitigate supply-chain risk. Following the other guidelines mentioned in this article is also a good way to minimize the damage when a supply-chain attack does occur.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understand your Operating System
&lt;/h3&gt;

&lt;p&gt;Understanding the ins and outs of your operating system is essential for effective server hardening. This means going beyond surface-level knowledge of your OS and delving into the details of how it works, what security features are available, and how to configure them properly. Some areas to focus on include understanding the default settings and services that come with the OS, knowing how to secure the file system and permissions, and configuring network settings securely. To effectively harden a server, you should know exactly what your operating system does when a file is opened or &lt;a href="https://github.com/alex/what-happens-when?ref=sami-yousefs-blog"&gt;when you type google.com in the search bar and hit enter&lt;/a&gt;. If this seems like too much for you, read the next section.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hire a Security Expert
&lt;/h3&gt;

&lt;p&gt;Okay, if you're just using this guide to keep hackers out of your Minecraft server, you can probably skip this step. But if, for example, you are the proud owner of a medium- to large-scale business, then you should seriously consider hiring a security expert. The information security field is a lot more complex than it seems. While guides on the internet may help you prevent immediate security risks, they do not protect you against more advanced attacks. A security expert would have the knowledge and experience to make advanced attacks much more difficult. For example, most guides for setting up key-based SSH authentication tell you to use the default RSA encryption; but a security expert will have the foresight that RSA will be cracked with quantum computing in the near future making your encryption practically useless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Mistakes to Avoid
&lt;/h2&gt;

&lt;p&gt;When hardening a server, it's important to avoid certain common mistakes that can leave your server vulnerable to cyber threats. Here are some of the most common mistakes to avoid:&lt;/p&gt;

&lt;h3&gt;
  
  
  Not Keeping Backups
&lt;/h3&gt;

&lt;p&gt;Regular backups of your server data can also be crucial in case of human error, such as accidental deletion or corruption of data. It is important to not only create backups but also to test them regularly to ensure that they are functioning correctly and that you can restore your data quickly and efficiently in case of an emergency. In addition, it is recommended to keep multiple copies of backups, including at least one off-site or cloud-based backup, to protect against physical disasters such as fires or floods that may damage your physical storage devices. By having a comprehensive backup strategy in place, you can minimize the impact of any potential data loss and maintain business continuity in the event of a disaster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relying on Default Security Settings
&lt;/h3&gt;

&lt;p&gt;Customizing security settings for your server is crucial for proper hardening and protection against potential cyber threats. While default settings may offer some baseline protection, they may not be sufficient. To determine your server's specific security needs, conduct a thorough analysis of its purpose, data handling, and access requirements. Once these needs are identified, tailor your security measures accordingly. This may include configuring firewalls, intrusion detection systems, access controls, and other measures. It's important to regularly review and update these settings to stay ahead of evolving security threats. By customizing your security settings, you can significantly reduce the vulnerability of your server to cyber-attacks and safeguard your sensitive data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not Testing Your Security Measures
&lt;/h3&gt;

&lt;p&gt;Maintaining the security of your server requires regular testing to stay ahead of evolving cyber threats. Merely setting up security measures is not enough, as attackers frequently discover new vulnerabilities and adapt their methods. Regular testing helps to identify potential weaknesses in your security measures and allows you to address them proactively. It also ensures that your security measures are functioning correctly and that you are aware of any changes that could impact your security posture. Testing should be a regular part of your server security maintenance routine to help identify and address vulnerabilities, reduce risk, and safeguard against cyber-attacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not Staying Informed About Security Threats
&lt;/h3&gt;

&lt;p&gt;To protect against potential cyber threats, staying up-to-date with the latest security news and trends is essential. Cybercriminals are continuously looking for new ways to breach security measures, making it crucial to remain informed. This involves regularly reviewing security bulletins and patches from your software and hardware vendors, subscribing to security newsletters and alerts, and attending industry conferences and training sessions. It's also important to stay aware of current events and how they may impact your organization's security posture. For instance, if a new ransomware attack is making headlines, it may be necessary to review your incident response plan and ensure your backups are up-to-date. By keeping yourself informed and prepared, you can stay ahead of the game and protect against potential cyber threats.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Server security is not an issue that should be taken lightly. It is a fundamental requirement for any organization that handles sensitive data or provides critical services online. By following the server-hardening techniques, best practices, and avoiding common mistakes discussed in this post, you can significantly reduce the risk of a cyber attack and ensure the integrity, availability, and confidentiality of your server data. Remember, securing your server is an ongoing process, and it's essential to stay vigilant against emerging threats and vulnerabilities. By keeping up to date with the latest security trends and regularly testing your security measures, you can keep your server safe and secure in today's rapidly evolving digital landscape.&lt;/p&gt;

</description>
      <category>security</category>
      <category>serverhardening</category>
      <category>devops</category>
    </item>
    <item>
      <title>Secure your network with Cloudflare Tunnels</title>
      <dc:creator>Sami Yousef</dc:creator>
      <pubDate>Sun, 19 Feb 2023 13:00:49 +0000</pubDate>
      <link>https://dev.to/sami_yousef/secure-your-network-with-cloudflare-tunnels-22cc</link>
      <guid>https://dev.to/sami_yousef/secure-your-network-with-cloudflare-tunnels-22cc</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zjOtZuEL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--2--2.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zjOtZuEL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--2--2.webp" alt="Secure your network with Cloudflare Tunnels" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;From malware to phishing attacks, the internet is full of potential security risks that can compromise your business and your customers' data. Fortunately, Cloudflare Tunnels (formerly called Argo Tunnels) can help you defend against a few common attack vectors.&lt;/p&gt;

&lt;p&gt;In this post, we will discuss how Cloudflare Tunnels work, and how you can use them to successfully secure your network. We will also talk about how they can be used to expose self-hosted services to the internet without messing with your router configuration. Finally, we will address a few frequently asked questions about Cloudflare Tunnels.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do Cloudflare Tunnels work?
&lt;/h2&gt;

&lt;p&gt;Cloudflare Tunnels work by creating persistent outbound connections to Cloudflare's data centers. When an external request is made to your server, it will pass through Cloudflare's data centers before being "routed" to your server through the connection opened earlier. Since visitors never make direct requests to your server, they never know its IP address. This protects you from attacks like Denial of Service (DoS), brute force, or port scanning.&lt;/p&gt;

&lt;p&gt;One major benefit of Cloudflare Tunnels is the server never needs to accept any inbound requests for the tunnel to work. Most networks will block incoming requests and allow outgoing requests unless they're configured to do something else. Typically, one might allow incoming requests to expose a service to visitors; doing this comes with the potential for attacks discussed earlier. With Cloudflare Tunnels, you can expose your service without allowing incoming requests. This also allows you to expose services behind a NAT like a typical home router.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started with Cloudflare Tunnels
&lt;/h2&gt;

&lt;p&gt;Before starting with Cloudflare Tunnels, you will need a Cloudflare account (duh) with at least one domain. If you don't have a Cloudflare account, you can make one for free on their front page. Then head over to the &lt;strong&gt;Zero Trust panel&lt;/strong&gt; (on the left) then click on &lt;strong&gt;Tunnels&lt;/strong&gt; under &lt;strong&gt;Access&lt;/strong&gt; on the left:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VvgSBQGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--2-.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VvgSBQGH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--2-.webp" alt="Secure your network with Cloudflare Tunnels" width="880" height="925"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then follow the instructions to install the Cloudflare connector on your system. Now you can add a public hostname (the URI visitors will use) and a private hostname (the URL that's accessible internally), and Cloudflare Tunnels will automagically make your private service available publicly.  &lt;/p&gt;

&lt;p&gt;💡&lt;/p&gt;

&lt;p&gt;If you are using a self-signed certificate, you will need to tell Cloudflare to ignore the validity of the certificate. You can do this by enabling "No TLS Verify" under the TLS settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Restricting access to a Cloudflare Tunnel
&lt;/h2&gt;

&lt;p&gt;If you want to expose your service to known visitors only, you can add the service as an application and configure a custom access policy. To do this, click on &lt;strong&gt;Applications&lt;/strong&gt; under &lt;strong&gt;Access&lt;/strong&gt; , and add an application. Choose &lt;strong&gt;Self-hosted&lt;/strong&gt; as the application type. Enter the URL you want to restrict and select an &lt;strong&gt;Identity Provider&lt;/strong&gt;. The default provider is a one-time PIN sent to the visitor's email; you can add additional identity providers in the Authentication section in the Zero Trust panel. Next, add your desired rules to your policy. For example, if you only want Bob or Alice to access the service, you can add a rule like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1sJ1Ffff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--3-.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1sJ1Ffff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/ezgif.com-gif-maker--3-.webp" alt="Secure your network with Cloudflare Tunnels" width="880" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What's the difference between Cloudflare Tunnels and a VPN?
&lt;/h3&gt;

&lt;p&gt;While both Cloudflare Tunnels and VPNs can help you protect your network, they work in fundamentally different ways. A VPN, as the name suggests, is a private network of hosts. Only hosts inside the network are able to communicate with each other. On the other hand, Cloudflare Tunnels are a secure connection between a host and Cloudflare's servers, and anyone can access the host with Cloudflare acting as a middleman.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do Cloudflare Tunnels protect against DDoS attacks?
&lt;/h3&gt;

&lt;p&gt;Cloudflare Tunnels route all the traffic your service receives through its servers. Any bad actor wanting to DDoS your service will need to go through Cloudflare first. Cloudflare is an industry leader in DDoS mitigation with an enormous 24 TBps network, making it extremely resistant to DDoS attacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  What ports do Cloudflare Tunnels use?
&lt;/h3&gt;

&lt;p&gt;Cloudflare Tunnels use port 7844 to establish an outgoing connection to their servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  I don't want to use Cloudflare, are there any other Tunnels I can use?
&lt;/h3&gt;

&lt;p&gt;Yes, there are other tunnelling services available if you do not want to use Cloudflare Tunnels. Some popular alternatives include ngrok, Dataplicity, and PageKite. Each of these services has its own unique features and benefits, and you should consider which one best suits your needs before making a decision.&lt;/p&gt;

&lt;p&gt;If you want a self-hosted solution, consider &lt;code&gt;frp&lt;/code&gt; (fast reverse proxy), &lt;code&gt;localtunnel&lt;/code&gt;, and &lt;code&gt;sshuttle&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>cloudflare</category>
      <category>devops</category>
      <category>tunnels</category>
      <category>vpn</category>
    </item>
    <item>
      <title>Top Backend-as-a-Service Solutions (BaaS) in 2023</title>
      <dc:creator>Sami Yousef</dc:creator>
      <pubDate>Mon, 06 Feb 2023 01:18:55 +0000</pubDate>
      <link>https://dev.to/sami_yousef/top-backend-as-a-service-solutions-baas-in-2023-46am</link>
      <guid>https://dev.to/sami_yousef/top-backend-as-a-service-solutions-baas-in-2023-46am</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9sWdmbW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/baas.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9sWdmbW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.samiyousef.ca/content/images/2023/02/baas.webp" alt="Top Backend-as-a-Service Solutions (BaaS) in 2023" width="880" height="881"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BaaS?
&lt;/h2&gt;

&lt;p&gt;Backend-as-a-service (a.k.a BaaS) is a model that provides developers with things such as user authentication and edge functions without needing to host a backend. The backend for the application is hosted by a third-party company (or sometimes self-hosted) and is "rented" to the client, hence the name.&lt;/p&gt;

&lt;p&gt;It has exploded in popularity recently because of its ease of use and cost-effectiveness for small applications. With that said, not all BaaS solutions are created equally. Let's compare some alternatives while keeping the following things in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Features&lt;/li&gt;
&lt;li&gt;Pricing&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Platform support and extensibility
## Comparison&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Firebase
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; Firebase's products are split into "Build", "Release &amp;amp; Monitor", and "Engage". Their build products include Firestore, Realtime Database, Cloud Functions, Authentication, and much more. The newly added Firebase ML allows you to add artificial intelligence to your project with minimal oversight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; Firebase offers a generous free tier giving you 1 GB of Realtime Database, 1 GB of Firestore, 10K phone verifications, 5 GB of Cloud Storage, 200K CPU-seconds for Cloud Functions, 10 GB of static hosting, and 1000 ML API calls. Pricing above the free tier is competitive, being only slightly cheaper than AWS Amplify. &lt;a href="https://firebase.google.com/pricing?ref=sami-yousefs-blog"&gt;See more here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Given Firebase is operated by Google, you almost do not need to worry about scaling. However, one caveat is the Realtime Database, which is limited to 1000 writes per second. Additionally, as your application grows, its cost will grow faster. At a large scale, Firebase is less cost-effective than other solutions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Being a proprietary platform, it's hard to assess the security of Firebase's internals. However, Firebase's SDKs are open-source and have no known security issues as of this time. The majority of Firebase is ISO and SOC-compliant, but some Firebase products have not completed ISO 27017 and ISO 27018 certifications, which might be a deal-breaker for large organizations.&lt;/p&gt;

&lt;p&gt;In 2018, Appthority Inc. found over 3000 insecure Firebase databases leaking millions of records, some including 2.7 million plain-text passwords. Most agree that the fault lies with the developers for misconfiguring the databases and neglecting to encrypt passwords, but some argue Firebase should have better documentation or encryption by default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; Firebase has client SDKs for iOS, Android, Flutter, Web, C++, and Unity. Firebase also offers admin SDKs to integrate with your backend for Node.js, Java, Python, Go, and C#. If none of these meet your needs, Firebase also has a well-documented REST API, making it compatible with almost any application.&lt;/p&gt;

&lt;p&gt;Firebase features a wide variety of extensions making integrations easier. Firebase extensions are currently in beta, so they're not quite ready for production. However, this is an excellent feature as it lets you do things like resizing an image or running payments with Stripe with minimal coding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Medium-sized applications or start-ups, or developers just starting with BaaS.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Amplify
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; AWS Amplify offers a comprehensive set of tools for building cloud-powered mobile and web applications. Its offerings include APIs, backend services, authentication, and storage. Amplify also integrates with other AWS services such as AppSync, Lambda, and Amazon S3 for even more functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; AWS Amplify operates on a pay-as-you-go pricing model, meaning there are no upfront costs or ongoing commitments. The pricing is competitive and only slightly more expensive than Firebase. Pricing may vary depending on the services utilized, but AWS provides example usage scenarios to assist in cost estimation. &lt;a href="https://aws.amazon.com/amplify/pricing/?ref=sami-yousefs-blog"&gt;See more here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Since Amplify is built on the highly scalable AWS infrastructure it's ideal for applications that need to handle large traffic and growth. You almost never have to worry about your application crashing or slowing down during peak usage times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Like Firebase, Amplify is proprietary, meaning it's hard to assess its security. However, Amplify is part of multiple AWS compliance programs. It is frequently audited by third parties such as SOC, PCI, ISO, HIPAA, MTCS, C5, K-ISMS, ENS High, OSPAR, HITRUST CSF, and FINMA. Amplify's compliance makes it ideal for large, international companies that are required by law to use solutions that meet certain standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; Amplify has SDK support for Javascript, Swift, Android, Flutter, and React Native. Amplify also has well-documented REST and GraphQL APIs making it easy to integrate with almost any platform.&lt;/p&gt;

&lt;p&gt;AWS Amplify also offers a lot of options for customizing your backend. You can override generated resources, access and import existing AWS resources, and run custom scripts during deployment with the help of command hooks. And if you have specific DevOps tools and guidelines, the export feature lets you easily integrate Amplify into your existing setup. However, this needs to be set up manually, and it's much harder than Firebase's extensions feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Large-scale, complex applications and/or enterprise-level businesses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supabase
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; Supabase is an open-source Firebase alternative. It offers a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, and Storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; Supabase offers free, monthly, and pay-as-you-go pricing models. The pricing is reasonable and cost-effective compared to both Firebase and AWS Amplify. For $25/month, you get an 8GB database, 100GB file storage, 2M Edge Function invocations, daily backups and more. And since Supabase is open-source, you can host it yourself, although this is at the cost of scalability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Supabase is centred around one Postgres database, which makes it very scalable vertically. However, it's difficult to scale Supabase horizontally without sharding or replication, which come with their own pitfalls. &lt;a href="https://github.com/supabase/supabase/discussions/323?ref=sami-yousefs-blog#discussioncomment-1044570"&gt;According to Inian Parameshwaran&lt;/a&gt;, an engineer at Supabase, "We don't have a good solution yet for scaling Postgres horizontally, even in the hosted version, but we are working on that."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Supabase is open-source, which means its security is transparent and easy to assess. It's SOC2 Type 1 compliant and sensitive information is encrypted at the application level before being stored. Additionally, Supabase's security monitoring is automated by Vanta, and Trust Reports are published regularly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; Supabase officially supports only Javascript and Flutter, but the community has built SDKs for Python and C++, too. Supabase has instant APIs, meaning API endpoints are automatically generated based on your schema. This would allow you to use Supbase on unsupported platforms, but the API documentation is not as robust as Firebase or AWS Amplify.&lt;/p&gt;

&lt;p&gt;Like Firebase's extensions, Supabase offers integrations with third parties. Unlike Firebase, integrations with Supabase are a bit harder to set up, but the process is well-documented. Additionally, the open-source nature of Supabase means that you can add custom features and extensions to your backend as you see fit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Small to medium-sized applications, projects that need a cost-effective solution, and developers who are looking for an open-source platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Appwrite
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; Appwrite is an open-source, self-hosted backend-as-a-service platform that offers Databases, Authentication, Storage, and Functions. Appwrite Cloud, the hosted version is currently in development but will be coming soon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; The cost of hosting Appwrite varies depending on the hosting solution you use. Pricing for Appwrite Cloud is not available as of this date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Appwrite is built with scalability in mind, but it must be scaled manually. It uses a few Docker containers to run, and each container has its own job. Since most of these containers are stateless, scaling Appwrite is as simple as replicating them and putting them behind a load balancer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Like Supabase, Appwrite is open-source meaning security is easy to assess and vulnerabilities are caught and fixed quickly. As of writing, there are no known vulnerabilities in Appwrite. Additionally, Appwrite implements most modern security features like rate limiting and encryption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; The Appwrite server runs on Docker, making it supported on almost every platform. Appwrite also has client SDKs for the Web, Android, iOS, and Fluter, and admin SDKs for Node.js, Deno, PHP, Python, Ruby, Dart, Kotlin, and Swift. If none of these options fit your needs, Appwrite also features REST, GraphQL, and Realtime APIs allowing you to integrate on almost any platform.&lt;/p&gt;

&lt;p&gt;Appwrite does not feature pre-built extensions or integrations. However, you can add custom features or make your own integrations because Appwrite is open-source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Small- to medium-sized applications, and developers who want to host their own platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Parse Platform
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; Similar to Appwrite, Parse Platform is an open-source, self-hosted BaaS. Parse offers a comprehensive set of features like Authentication, Role-based access control, File Storage, Notifications, Cloud Functions, Analytics, and much more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; Parse Platform is entirely self-hosted, pricing will vary depending on your hosting solution.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Like Appwrite, the Parse server is stateless, meaning scaling it is as easy as replicating it and putting it behind a load balancer. Parse supports MongoDB and Postgres, which need to be scaled separately. According to &lt;a href="https://blog.back4app.com/how-to-scale-parse-server/?ref=sami-yousefs-blog"&gt;back4app&lt;/a&gt;, Parse can be scaled to handle well over 1000 requests per second.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Parse uses Snyk to find vulnerabilities in its code base. As of writing, Parse has one high-severity denial of service vulnerability and 6 various medium-severity vulnerabilities. Besides these vulnerabilities, Parse is relatively secure because of its open-source nature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; Parse has excellent platform support with SDKs for Objective-C, Android, Javascript, Swift, Flutter, Dart, PHP, .NET, Unity, and even Arduino and Embedded C. And if these SDKs somehow don't fit your needs, Parse has REST and GraphQL APIs to easily integrate with any platform.&lt;/p&gt;

&lt;p&gt;Parse does not have official extensions or integrations, but there are lots of community-built extensions, adapters and boilerplate starter code. Additionally, like any other open-source platform, you can add or modify Parse in any way you'd like to fit your needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Developers who want a comprehensive set of features while still hosting their own solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  PocketBase
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt; PocketBase is an open-source BaaS that features Authentication, File storage, and a real-time database. The kicker is the entire database is a single SQLite file, hence the name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing:&lt;/strong&gt; PocketBase is entirely self-hosted and the price will depend on your hosting solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Because PocketBase utilizes a single file as its database, it cannot scale horizontally. Additionally, scaling it vertically will be limited by the read and write speeds of your disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; PocketBase has excellent security because of its open-source nature and any vulnerabilities are quickly discovered and fixed. As of writing, PocketBase has no known security vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform Support and Extensibility:&lt;/strong&gt; PocketBase can be used as a standalone app or as a Go framework. When used as a standalone app, it only has official SDKs for Javascript and Dart. PocketBase does have a Web API so it can integrate with any platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Small-scale applications and prototyping.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Useful Information
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Choosing the Right BaaS Solution for Your Project
&lt;/h3&gt;

&lt;p&gt;When it comes to selecting the perfect BaaS solution for your project, it's vital to consider the success and growth potential of your application. If you're looking for an open-source solution, Appwrite, Supabase, and Parse Platform are all great options to consider. On the other hand, if compliance with specific regulations is a must, AWS Amplify may be the ideal solution for you. And if you're new to BaaS and value strong community support, then Firebase is the way to go. To make an informed decision, take the time to carefully evaluate each solution, comparing features, pricing, and security measures to determine which one best fits your project's unique needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Best Practices for Implementing a BaaS Solution
&lt;/h3&gt;

&lt;p&gt;When using a BaaS, it's important to follow best practices to ensure a seamless and successful implementation. To ensure sensitive data is protected, you should use a  strong encryption algorithm such as AES and always use HTTPS when making requests to the backend. Additionally, you should use environment variables and repository secrets to store API keys and never hard-code them. Finally, make sure to thoroughly check API response codes and handle them appropriately to avoid any unexpected errors in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion and Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Backend-as-a-service (BaaS) is a cost-effective solution for developers who want to host their application's backend without having to worry about the nuances of implementing their own. The choice of BaaS solution will depend on the size, complexity, and specific requirements of your application. Each BaaS has its own strengths and limitations and the best solution will ultimately depend on your specific use case.&lt;/p&gt;

</description>
      <category>baas</category>
      <category>firebase</category>
      <category>awsamplify</category>
      <category>supabase</category>
    </item>
  </channel>
</rss>
