<?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: Diego Musagy Casas</title>
    <description>The latest articles on DEV Community by Diego Musagy Casas (@musagy).</description>
    <link>https://dev.to/musagy</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%2F3461885%2F12641407-79e1-4caa-a24f-88e75031068c.png</url>
      <title>DEV Community: Diego Musagy Casas</title>
      <link>https://dev.to/musagy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/musagy"/>
    <language>en</language>
    <item>
      <title>Using ProtonVPN with OpenVPN on Arch Linux (for Japan servers 🇯🇵)</title>
      <dc:creator>Diego Musagy Casas</dc:creator>
      <pubDate>Wed, 27 Aug 2025 05:45:49 +0000</pubDate>
      <link>https://dev.to/musagy/using-protonvpn-with-openvpn-on-arch-linux-for-japan-servers--267p</link>
      <guid>https://dev.to/musagy/using-protonvpn-with-openvpn-on-arch-linux-for-japan-servers--267p</guid>
      <description>&lt;p&gt;Today I was using my Arch Linux setup while listening to my favorite singer, &lt;strong&gt;Kanon Wakeshima&lt;/strong&gt;, an amazing Japanese artist. But I realized that most of her discography is blocked for foreign countries, including some of my favorite albums.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figcohezm401cyddtyzdc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figcohezm401cyddtyzdc.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, for the past couple of years, I’ve been using Spotify with a Japanese account to access her entire discography. The downside? I can’t log into it unless I’m “in Japan.” My workaround is to connect with a VPN, then disconnect so I don’t waste the free usage. In my case, I use &lt;strong&gt;ProtonVPN&lt;/strong&gt;, since they offer free Japanese servers.&lt;/p&gt;

&lt;p&gt;On Windows and Android, Proton makes it easy with their official apps. On Linux too — but only for simpler distros. In my case, I’m running &lt;strong&gt;Arch Linux&lt;/strong&gt; with the &lt;strong&gt;BSPWM window manager&lt;/strong&gt; and &lt;a href="https://github.com/gh0stzk/dotfiles?tab=readme-ov-file#very-useful-keybindigs-to-know" rel="noopener noreferrer"&gt;&lt;strong&gt;Gh0stzk’s dotfiles&lt;/strong&gt;&lt;/a&gt; (for those interested). This makes things more complicated, especially since the ProtonVPN Linux app gave me tons of errors at first.&lt;/p&gt;

&lt;p&gt;But there’s a better (and more advanced) way. Why? Because with Proton’s free plan you can’t pick a specific country — it randomly assigns you one of 5 countries, and you have a &lt;strong&gt;20-minute cooldown&lt;/strong&gt; if you want to reconnect. That sucks.&lt;/p&gt;

&lt;p&gt;The alternative is to use &lt;a href="https://wiki.archlinux.org/title/OpenVPN" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenVPN&lt;/strong&gt;&lt;/a&gt; with Proton’s VPN configuration files.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Get ProtonVPN’s OpenVPN config
&lt;/h2&gt;

&lt;p&gt;First, you’ll need a ProtonVPN configuration file, which you can download from the &lt;a href="https://account.protonvpn.com/downloads" rel="noopener noreferrer"&gt;&lt;strong&gt;ProtonVPN downloads page&lt;/strong&gt;&lt;/a&gt;. Scroll down to the &lt;strong&gt;OpenVPN configuration&lt;/strong&gt; section (below the app downloads).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhlb5gg2cc9czq9mhfzrp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhlb5gg2cc9czq9mhfzrp.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Platform (Linux in my case)&lt;/li&gt;
&lt;li&gt;Protocol (default one)&lt;/li&gt;
&lt;li&gt;Server type (free, of course 😅)&lt;/li&gt;
&lt;li&gt;Country (Japan for me)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbh2m2cvs1ft05osuj1m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbh2m2cvs1ft05osuj1m.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Always pick the server with the lowest percentage.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now that you’ve got your configuration file, open it with your favorite text editor (I’m using VS Code):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxure49hx97xno46isyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxure49hx97xno46isyr.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Install systemd resolver script
&lt;/h2&gt;

&lt;p&gt;Next, you need to check your &lt;strong&gt;systemd version&lt;/strong&gt;. Most likely it’s higher than 229. If not, check the &lt;a href="https://wiki.archlinux.org/title/ProtonVPN#OpenVPN_setup" rel="noopener noreferrer"&gt;&lt;strong&gt;official guide&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you’re on a supported version, install this &lt;a href="https://aur.archlinux.org/packages/openvpn-update-systemd-resolved" rel="noopener noreferrer"&gt;&lt;strong&gt;AUR package&lt;/strong&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Script using Paru&lt;/span&gt;
paru &lt;span class="nt"&gt;-S&lt;/span&gt; openvpn-update-systemd-resolved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end of the install you should see this message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;To &lt;span class="nb"&gt;complete &lt;/span&gt;the installation, please add this script to your OpenVPN
settings &lt;span class="k"&gt;for &lt;/span&gt;each of the VPNs you wish it to manage the DNS &lt;span class="k"&gt;for&lt;/span&gt;:
    script-security 2
    up /usr/bin/update-systemd-resolved
    up-restart
    down /usr/bin/update-systemd-resolved
    down-pre
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Edit the config file
&lt;/h2&gt;

&lt;p&gt;So, where do we add this script in the config file? Right before the tokens section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funrz9zwagnj9i36buwj2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funrz9zwagnj9i36buwj2.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Replace the old script section with the one provided by the AUR:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Scripts&lt;/span&gt;

script-security 2
up /usr/bin/update-systemd-resolved
up-restart
down /usr/bin/update-systemd-resolved
down-pre

&lt;span class="c"&gt;# Tokens&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7iaib1tuhpbci2hc8wsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7iaib1tuhpbci2hc8wsd.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Move config to OpenVPN folder
&lt;/h2&gt;

&lt;p&gt;Now, rename the file to something shorter (I called it &lt;code&gt;jp.ovpn&lt;/code&gt;) and move it to &lt;code&gt;/etc/openvpn/client/&lt;/code&gt; as superuser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Copy *.ovpn file to OpenVPN client folder&lt;/span&gt;
&lt;span class="nb"&gt;sudo cp &lt;/span&gt;jp.ovpn /etc/openvpn/client/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, make sure the resolver service is running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check systemd-resolved status&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status systemd-resolved

&lt;span class="c"&gt;# If inactive, start it&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start systemd-resolved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, start OpenVPN with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start OpenVPN&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;openvpn /etc/openvpn/client/jp.ovpn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 5: Login with ProtonVPN credentials
&lt;/h2&gt;

&lt;p&gt;At this point, OpenVPN will prompt you for authentication. To get your credentials, log into your Proton account and scroll down the &lt;a href="https://account.protonvpn.com/account#openvpn" rel="noopener noreferrer"&gt;&lt;strong&gt;account page&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffrzt066naa45wk51p4m8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffrzt066naa45wk51p4m8.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy-paste your username and password into the terminal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you get a &lt;strong&gt;cache error&lt;/strong&gt;, reset your credentials using the blue button under the credentials.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvualy2hwli17jdytiyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvualy2hwli17jdytiyc.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that’s it! You’re now connected to the internet as if you were in Japan. 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faev4nio1uioxkdgpgrfi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faev4nio1uioxkdgpgrfi.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Yep, that’s how far my fandom for a single singer takes me — just so I can listen to her music banned in my country. But hey, now I can finally enjoy my favorite album again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s5fqwl9zwhiq0mumflr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s5fqwl9zwhiq0mumflr.png" alt="screenshot" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>archlinux</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
