<?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: BowTiedAztec</title>
    <description>The latest articles on DEV Community by BowTiedAztec (@bowtiedaztec).</description>
    <link>https://dev.to/bowtiedaztec</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%2F823561%2F9eec53c1-c5c9-4785-80d4-f3072e4f729c.png</url>
      <title>DEV Community: BowTiedAztec</title>
      <link>https://dev.to/bowtiedaztec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bowtiedaztec"/>
    <language>en</language>
    <item>
      <title>How to Code Anonymously, Part 2: Network Security</title>
      <dc:creator>BowTiedAztec</dc:creator>
      <pubDate>Mon, 14 Mar 2022 15:37:12 +0000</pubDate>
      <link>https://dev.to/bowtiedaztec/how-to-code-anonymously-part-2-network-security-imd</link>
      <guid>https://dev.to/bowtiedaztec/how-to-code-anonymously-part-2-network-security-imd</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mv8woLlX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1544197150-b99a580bb7a8%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDZ8fG5ldHdvcmt8ZW58MHx8fHwxNjQ3MTIwOTg4%26ixlib%3Drb-1.2.1%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mv8woLlX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1544197150-b99a580bb7a8%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDZ8fG5ldHdvcmt8ZW58MHx8fHwxNjQ3MTIwOTg4%26ixlib%3Drb-1.2.1%26q%3D80%26w%3D2000" alt="How to Code Anonymously, Part 2: Network Security" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is part two in a series of posts to teach you, fellow developer, how to better maintain your privacy and security as the world around us grows more digital and dangerous with each passing day.&lt;/p&gt;

&lt;p&gt;You can find part one, dealing with multiple git profiles, &lt;a href="https://www.bowtiedaztec.com/how-to-code-anonymously"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;Many people think of the internet as being "anonymous," but that's never really been true. Let's illustrate why with an example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You move into a new house and sign up with an ISP to get internet access. At this point, as a subscriber, they know exactly who you are.&lt;/li&gt;
&lt;li&gt;You plug in your router, and your ISP assigns it a unique IP address to route all of your traffic.&lt;/li&gt;
&lt;li&gt;You connect your computer to that router. The publicly visible IP address when you visit individual sites (like Facebook) will be the IP address assigned to your router.&lt;/li&gt;
&lt;li&gt;You do something truly heinous, like organize a peaceful protest on Facebook, so law enforcement asks Facebook for the IP address behind your account. Facebook complies, as they routinely do.&lt;/li&gt;
&lt;li&gt;IP address in hand, law enforcement then goes to your ISP to de-anonymize the address. Your ISP complies, as they routinely do.&lt;/li&gt;
&lt;li&gt;Prepare to receive an express shipment of freedom and liberty at your doorstep.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While not the only way to de-anonymize you, disguising your true IP address is the most obvious attack vector to minimize. I'm going to spend most of this post teaching you how.&lt;/p&gt;

&lt;p&gt;To do that, I'm going to break down opportunities into two groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Building blocks&lt;/strong&gt; : individual pieces of anonymizing technology that you can combine into strategies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strategies&lt;/strong&gt; : combinations of building blocks into more complete systems of defense-in-depth to help preserve your privacy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block: VPN
&lt;/h3&gt;

&lt;p&gt;A VPN is one of the most common ways to retain a degree of anonymity. You can think of it like a virtual version of going to your local coffee shop - many people pool their traffic together into the same IP address, almost as if they were using the same physical router, making it harder to understand which individual is doing what. If your VPN offers many locations around the globe, it becomes possible to spoof your location as well, which may also offer additional legal protection (e.g. it may be harder for US law enforcement to enforce a warrant in Iceland).&lt;/p&gt;

&lt;p&gt;That last point is worth unpacking in more detail. You can learn more about different jurisdictions and how they affect privacy &lt;a href="https://www.vpnmentor.com/blog/understanding-five-eyes-concept/"&gt;here&lt;/a&gt;. Most privacy-conscious folks tend to avoid the "5 eye" countries (US, UK, Canada, Australia, NZ) at minimum.&lt;/p&gt;

&lt;p&gt;If your VPN is trustworthy and doesn't keep logs, it makes it more difficult for law enforcement to get a usable answer to the question of "who is behind this IP address?"&lt;/p&gt;

&lt;p&gt;Emphasis on &lt;em&gt;if they are trustworthy&lt;/em&gt;. The downside of a VPN is that it requires faith that your VPN is doing the right thing. For casual privacy, this may be fine, but if your safety depends on it, you should really take stronger precautions.&lt;/p&gt;

&lt;p&gt;For extra protection, you can combine multiple VPNs, for example, by using a VPN from one vendor on your physical machine, and another from a different vendor inside a virtual machine.&lt;/p&gt;

&lt;p&gt;In theory, your first VPN will know your real IP but not your destination, and your second VPN would know your destination but not your real IP. This is actually similar to how the Tor protocol works.&lt;/p&gt;

&lt;p&gt;It's also worth noting that &lt;strong&gt;free VPNs are almost never trustworthy.&lt;/strong&gt; Very commonly, they will monitor your data and sell it to third parties (or happily give it away to law enforcement).&lt;/p&gt;

&lt;p&gt;Personally, I use &lt;a href="https://mullvad.net/en/"&gt;Mullvad&lt;/a&gt; (not a referral link), because of their seemingly genuine commitment to freedom of speech and privacy, as well as their location in Sweden. They also accept cryptocurrency as payment, which is helpful as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block: Tor Browser
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.torproject.org/"&gt;Tor&lt;/a&gt; stands for The Onion Router, which is actually a pretty good description of how it works. You can almost think of it as a VPN in series - when you make a network request, it passes through three layers of Tor nodes (each of which has its own IP address) before exiting back to clearnet.&lt;/p&gt;

&lt;p&gt;Because of this architecture, the destination of your web traffic (e.g. Google) only has the IP address of the Tor exit node, not the IP address of your router. And because it passes through multiple nodes, no single node has both your source IP address and your destination.&lt;/p&gt;

&lt;p&gt;The Tor browser takes some additional steps to protect your privacy, like enforcing a constant window size (e.g. to prevent an attacker from detecting you have a Mac retina screen) and obfuscating some of your machine details to avoid identifying you through a unique hardware signature.&lt;/p&gt;

&lt;p&gt;That being said, it's not perfect. If bad actors compromise a substantial number of nodes in the network (and sadly, I put the US government under the "bad actors" umbrella), then the privacy guarantees offered by Tor can become compromised.&lt;/p&gt;

&lt;p&gt;Additionally, there is a risk that law enforcement views &lt;em&gt;any&lt;/em&gt; Tor activity as inherently suspicious and will start watching you more closely if it sees you use Tor. This is one reason it may be better to avoid accessing easily identified accounts (like your personal Gmail) over Tor.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block: Torsocks Shell
&lt;/h3&gt;

&lt;p&gt;As developers, we spend much of our time in the shell. How can we take advantage of the privacy offered by the Tor Browser when interacting e.g. with a git remote? Enter torsocks.&lt;/p&gt;

&lt;p&gt;On debian based systems, simply install the tor package from the repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install tor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;code&gt;/etc/tor/torrc&lt;/code&gt; and uncomment the following line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#ControlPort 9051
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, restart the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service tor restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And wrap your favorite command in torsocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;torsocks curl ifconfig.me
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll notice that ifconfig.me returns a different (tor-ified) IP address than whatever comes back if you curl it normally. Success!&lt;/p&gt;

&lt;p&gt;You can also wrap every command in your terminal session in torsocks by using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;. torsocks on
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And disable with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;. torsocks off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if you want every shell on your system to use torsocks by default, simply add &lt;code&gt;. torsocks on&lt;/code&gt; to your &lt;code&gt;$HOME/.bashrc&lt;/code&gt; or equivalent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MacOS Note&lt;/strong&gt; : I tried Torsocks with MacOS at one point and couldn't use certain command line utilities. Apparently MacOS has an extra security layer around certain parts of the filesystem that prevents torsocks from working normally (ironic, isn't it?). You can create copies of these utilities in a less-privileged location, or use my preferred solution, which is to simply start developing on Linux. :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block: Separate / Virtual Machine
&lt;/h3&gt;

&lt;p&gt;Another dimension you can add to your opsec is doing all of your sensitive work on a separate machine. This helps isolate potentially malicious programs from accessing information about your true identity. It also reduces the chances of contaminating your "safe" network traffic with real information about your identity.&lt;/p&gt;

&lt;p&gt;Let's take one example - VSCode. I'm a huge fan and use it every day for my coding, but while the core product is open source, Microsoft adds telemetry and other unknown things as part of its build process. There is an open source fork called &lt;a href="https://github.com/VSCodium/vscodium"&gt;VSCodium&lt;/a&gt; that attempts to address this, but keeping a separate copy on a separate machine is an extra layer of protection for your activities.&lt;/p&gt;

&lt;p&gt;This way, VSCode can report on whatever it wants from your non-sensitive machine, as well as your sensitive machine, but as long as the two machines know nothing about each other, it's not particularly damaging.&lt;/p&gt;

&lt;p&gt;A separate physical machine is ideal, but also not always practical. You can achieve a lot of the same protection by using a virtual machine, or machine inside your physical machine.&lt;/p&gt;

&lt;p&gt;The default choice for this (at least on Linux), is generally &lt;a href="https://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;. Many people on Windows or MacOS use VMWare as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strategy: VPN + Tor + Torsocks + VM
&lt;/h3&gt;

&lt;p&gt;Knowing about all of the building blocks above, you can combine them into a fairly compelling privacy stack:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install your favorite Linux distro using VirtualBox&lt;/li&gt;
&lt;li&gt;Use this VM for your sensitive activities&lt;/li&gt;
&lt;li&gt;Route your internet traffic on the host through a VPN (and ideally a separate VPN inside the VM)&lt;/li&gt;
&lt;li&gt;Use Tor inside the VM for your browsing&lt;/li&gt;
&lt;li&gt;Use Torsocks inside the VM for your shell commands&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This should go a long way toward isolating and anonymizing your sensitive network traffic from everything else on your machine. To truly isolate, you can also move your personal activities into a separate VM that follows the same strategy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block / Strategy: Whonix (My Pick)
&lt;/h3&gt;

&lt;p&gt;The previous strategy is great, but it's actually easier and more effective to just use &lt;a href="https://whonix.org/"&gt;Whonix&lt;/a&gt;. Whonix is a Linux distro - designed to be run out of VirtualBox - that implements all the goodness of the previous strategy. Even better, it comes with a novel network architecture that involves two virtual machines for extra protection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A workstation VM, where you do e.g. your software development&lt;/li&gt;
&lt;li&gt;A gateway VM, which exists only as a network proxy for tunneling traffic from the workstation through Tor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This architecture makes it nearly impossible for your network traffic to go anywhere but Tor, and dramatically reduces the risk of IP address or other information leakage.&lt;/p&gt;

&lt;p&gt;You can also combine it with a &lt;a href="https://www.whonix.org/wiki/Tunnels/Connecting_to_a_VPN_before_Tor#Connecting_to_a_VPN_before_Tor_(User_%E2%86%92_VPN_%E2%86%92_Tor_%E2%86%92_Internet)"&gt;VPN on the host machine&lt;/a&gt; for extra protection.&lt;/p&gt;

&lt;p&gt;Whonix in VirtualBox with Mullvad VPN on the host machine is the strategy that I personally use. It allows me to have a high degree of privacy when I need it, while retaining the ability to use a more productive OS on the host (Pop! OS in my case).&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Block / Strategy: QubesOS
&lt;/h3&gt;

&lt;p&gt;Conceptually, &lt;a href="https://www.qubes-os.org/"&gt;Qubes&lt;/a&gt; is Whonix on steroids. And, in fact, it uses Whonix under the covers. It's the best option if you want to compartmentalize every profile you have from every other profile.&lt;/p&gt;

&lt;p&gt;It makes it relatively simple to utilize a number of strategies, like chaining VPNs or tunneling network traffic through Whonix. It is also built from the ground up with virtualization in mind, so it becomes possible to separate e.g. your side hustle from your main job from your personal profile. But it does this in a way that is much more performant than creating a number of distinct virtual machines.&lt;/p&gt;

&lt;p&gt;For these reasons, it's the OS of choice for &lt;a href="https://twitter.com/snowden/status/781493632293605376"&gt;Edward Snowden&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On the downside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Qubes has to be a bare metal installation due to its virtualization, so if you don't like some of the choices it makes (like the xfce desktop), your only option is to dual boot with something you like better.&lt;/li&gt;
&lt;li&gt;Due to the heavy use of virtualization, Qubes can also be resource heavy. I found it unusable with 8GB of RAM on an older test laptop, for example.&lt;/li&gt;
&lt;li&gt;Common developer tools like docker or the android emulator can be difficult to get working due to its architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With more time and maturity, I could see Qubes becoming my daily driver OS. But for my use case today (max productivity 90% of the time, max privacy 10% of the time), running Whonix out of VirtualBox is far more practical.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honorable Mentions: Tails and Kali Linux
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://tails.boum.org/"&gt;Tails&lt;/a&gt; is probably the most famous privacy-oriented OS due to its use by journalists and other dissidents. But it's a much better fit for them than it is for software developers.&lt;/p&gt;

&lt;p&gt;Tails is designed to be run without persistent storage, on a device like a flash drive. If you are primarily checking secure email, writing content, and otherwise interacting with cloud services, this is fine, but developers generally need persistent storage (to avoid setting up their development environments every time they boot) as well as better performance than what's available off a thumb drive.&lt;/p&gt;

&lt;p&gt;While it is possible to run Tails in a persistent storage mode, even as a bare metal install, at that point I would probably recommend you just use Whonix or Qubes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.kali.org/"&gt;Kali Linux&lt;/a&gt;, on the other hand, comes up in many discussions around cybersecurity. It's not really designed to be a daily driver OS. That being said, if you're looking to do cybersecurity research (for example, trying to break through one of the strategies we've discussed in this piece), it is one of the most popular platforms to do it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope this was a helpful summary of your options for achieving better privacy as you develop your pseudonymous projects. If you have questions, please don't hesitate to contact me on Twitter &lt;a href="https://twitter.com/bowtiedaztec"&gt;@BowTiedAztec&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>anonymity</category>
      <category>howtocodeanonymously</category>
      <category>privacy</category>
    </item>
    <item>
      <title>How to Code Anonymously Part 1: Multiple Git Profiles</title>
      <dc:creator>BowTiedAztec</dc:creator>
      <pubDate>Wed, 09 Mar 2022 18:00:00 +0000</pubDate>
      <link>https://dev.to/bowtiedaztec/how-to-code-anonymously-part-1-multiple-git-profiles-2699</link>
      <guid>https://dev.to/bowtiedaztec/how-to-code-anonymously-part-1-multiple-git-profiles-2699</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1568611066080-e54db9abb0f4%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDJ8fGFub255bW91c3xlbnwwfHx8fDE2NDY3NjczNTQ%26ixlib%3Drb-1.2.1%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1568611066080-e54db9abb0f4%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDJ8fGFub255bW91c3xlbnwwfHx8fDE2NDY3NjczNTQ%26ixlib%3Drb-1.2.1%26q%3D80%26w%3D2000" alt="How to Code Anonymously Part 1: Multiple Git Profiles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is part one in a series of posts to teach you, fellow developer, how to better maintain your privacy and security as the world around us grows more digital and dangerous with each passing day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;I contribute to a number of software projects, some in crypto, some normie, some under my real name, some under a pseudonym.  A question I get a lot from developers who want to plug into the pseudonymous economy is how to keep their personal profile separate from their "extracurriculars," without accidentally outing themselves forever.&lt;/p&gt;

&lt;p&gt;While there's no absolutely "safe" way to do this, among the safest would involve a separate machine (virtual or otherwise), and a proxy that sends all your traffic through Tor. This is something I'll cover in a future edition of this series.&lt;/p&gt;

&lt;p&gt;For now, I want to focus on one of the easiest steps you can take to maintain a degree of separation between your identities: multiple Git / Github profiles on the same machine.&lt;/p&gt;

&lt;p&gt;This strategy is appropriate when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For reasons of privacy or retaliation (e.g. your employer), you want at least one degree of indirection between your real identity and your pseudonym&lt;/li&gt;
&lt;li&gt;Your physical or legal safety &lt;strong&gt;does not&lt;/strong&gt; depend on this indirection (if it does, you need something stronger)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that out of the way, I'll dig into a couple of details about how git works, and proceed to some recommendations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git uses SSH
&lt;/h3&gt;

&lt;p&gt;The first thing to realize about Git is that it utilizes SSH for everything involving pushing/pulling files over the network.  Anytime you run git push, git pull, git clone, etc., something like the following happens:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check $HOME/.ssh for default SSH configuration and SSH keys&lt;/li&gt;
&lt;li&gt;Use the configuration in $HOME/.ssh/config to route the command to the correct host&lt;/li&gt;
&lt;li&gt;Authorize the request using the key (either supplied with the command or the system default)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this in mind, it becomes relatively easy to create and use a second profile on the same machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step One: Create your new key (and optionally add it to github)
&lt;/h3&gt;

&lt;p&gt;This one should be familiar to everyone.  It's the same process you used to create your original key.  You can follow the instructions from Github &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" rel="noopener noreferrer"&gt;here&lt;/a&gt; or run this command and follow the prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "your_email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you plan on using this key with github, follow their &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" rel="noopener noreferrer"&gt;instructions&lt;/a&gt; to add your public key (ending in .pub - do not upload your private key!) to your account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step Two: Add a new git host
&lt;/h3&gt;

&lt;p&gt;The next step is to update your SSH config to give you an easy way to use this new key. To do this, we are going to create a &lt;em&gt;custom host.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First, open up ~/.ssh/config in your favorite text editor.  You're going to add an entry that looks like this.&lt;/p&gt;

&lt;p&gt;Make sure to substitute 'github-aztec' for something else, and replace 'id-aztec' with the file name of your new private key from the previous step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github-aztec
    User git
    HostName github.com
    IdentityFile ~/.ssh/id_aztec
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, when your SSH daemon looks for hosts with which it can connect, 'github-aztec' will be in its virtual list, just like a real domain like github.com.  The difference being that this connection, by default, will also pass along the correct SSH key that you created in the previous step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step Three: Update your project origin
&lt;/h3&gt;

&lt;p&gt;Now that you have a key and a host, you need to update your project to point to it.&lt;/p&gt;

&lt;p&gt;Navigate to your project root and run the following command (substituting 'github-aztec' for the host name you chose in the previous step):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin github-aztec:user/repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is identical to what you would do with a normal remote, just substituting 'github-aztec' for 'github.com' (remember, 'github-aztec' is now a host like any other from the perspective of SSH on your system).&lt;/p&gt;

&lt;p&gt;Now anytime you interact with git in this project, it will be interacting with the host (and therefore, key) from the previous step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step Four: Update your commit identity
&lt;/h3&gt;

&lt;p&gt;This one trips up a lot of people.  Every time you commit code in git, it writes a commit message that looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.bowtiedaztec.com%2Fcontent%2Fimages%2F2022%2F03%2Fcommit-log.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.bowtiedaztec.com%2Fcontent%2Fimages%2F2022%2F03%2Fcommit-log.png" alt="How to Code Anonymously Part 1: Multiple Git Profiles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you aren't careful, git will pick up any global user/email you set previously and store that in future commit messages.&lt;/p&gt;

&lt;p&gt;So make sure you set them like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name "BowTiedAztec"
git config user.email "bowtiedaztec@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you previously set these values globally using the --global flag, it may be worth unsetting them globally so you will always be prompted by git to add a user and email for new projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Help, I f***ed up!
&lt;/h3&gt;

&lt;p&gt;If you accidentally committed your real info to git, not all hope is lost.  Set your git user and email per the previous step and then run the following command to amend the commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit --amend --reset-author
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you haven't yet pushed your code to a remote, you're done!  If you have, you will need to run the following command to erase your info from the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin &amp;lt;branch_name&amp;gt; --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The --force flag will overwrite previous history in the branch.  If you don't have force push access, you will need to contact the owner of the repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus: Using a VPN
&lt;/h3&gt;

&lt;p&gt;As I mentioned, I will cover networking opsec in a future post.  But one low-cost, high ROI technique for maintaing a bit more anonymity is using a privacy-oriented VPN.  This will have the effect of pooling your network traffic with that of many other people, making it that much harder for someone (e.g. GitHub or whomever else you interact with via git) to figure out who is behind the pseudonym.&lt;/p&gt;

&lt;p&gt;(Though, again, do not rely on this if your safety depends on it. Seriously.)&lt;/p&gt;

&lt;p&gt;Personally, I use &lt;a href="https://mullvad.net/en/" rel="noopener noreferrer"&gt;Mullvad VPN&lt;/a&gt; (not a referral link, I don't roll that way) but there are plenty of options out there.  I like Mullvad in large part because of their long history of support for free expression as well as their physical location in Sweden (one of the better jurisdictions for privacy).&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope this was helpful! If you have any questions, please feel free to contact me on Twitter &lt;a href="https://twitter.com/BowTiedAztec" rel="noopener noreferrer"&gt;@BowTiedAztec&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>howtocodeanonymously</category>
      <category>anonymity</category>
      <category>code</category>
      <category>git</category>
    </item>
    <item>
      <title>In Soviet Russia, Namecheap register you</title>
      <dc:creator>BowTiedAztec</dc:creator>
      <pubDate>Tue, 01 Mar 2022 06:02:24 +0000</pubDate>
      <link>https://dev.to/bowtiedaztec/in-soviet-russia-namecheap-register-you-2h5h</link>
      <guid>https://dev.to/bowtiedaztec/in-soviet-russia-namecheap-register-you-2h5h</guid>
      <description>&lt;p&gt;I was doing a little evening reading in my Mexico City apartment when I stumbled onto this &lt;a href="https://news.ycombinator.com/item?id=30504812"&gt;post&lt;/a&gt; on hacker news:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Dear XXXX,&lt;/p&gt; &lt;p&gt;Unfortunately, due to the Russian regime's war crimes and human rights violations in Ukraine, we will no longer be providing services to users registered in Russia. While we sympathize that this war may not affect your own views or opinion on the matter, the fact is, your authoritarian government is committing human rights abuses and engaging in war crimes so this is a policy decision we have made and will stand by.&lt;/p&gt; &lt;p&gt;If you hold any top-level domains with us, we ask that you transfer them to another provider by March 6, 2022.&lt;/p&gt; &lt;p&gt;Additionally, and with immediate effect, you will no longer be able to use Namecheap Hosting, EasyWP, and Private Email with a domain provided by another registrar in zones .ru, .xn--p1ai (рф), .by, .xn--90ais (бел), and .su. All websites will resolve to 403 Forbidden, however, you can contact us to assist you with your transfer to another provider.&lt;/p&gt; &lt;p&gt;Customer Support, Namecheap&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;I think most people can agree that what Russia is doing is terrible, but that's not the point. And clearly so, since this action will have absolutely no impact aside from annoying people who very likely had nothing to do with the invasion (and, per some of the comments in that HN thread, may in fact be using their sites to oppose Russian policy.)&lt;/p&gt; &lt;p&gt;So allow me condense and rephrase Namecheap's statement to make it clearer:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Must virtue signal. No internet for you.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;I'm not going to spend any more time bashing Namecheap, if only because a) they don't really matter, and b) &lt;strong&gt;they're not alone&lt;/strong&gt;. How many examples have we seen now of centralized (dare I say "legacy"?) tech companies banning something because it crosses their delicate Silicon Valley sensibilities?&lt;/p&gt; &lt;p&gt;One more reason to take an inventory of the services you use every day and think about how you would respond if they ever did something like this to you. Do you make your living from....&lt;/p&gt; &lt;p&gt;Youtube? Centralized.&lt;/p&gt; &lt;p&gt;Instagram? Centralized.&lt;/p&gt; &lt;p&gt;Twitter? GTFOH.&lt;/p&gt; &lt;p&gt;Hell, even Substack is centralized. And yeah, they say all the right things about respecting free speech, but so did Twitter. Anyone else remember "the free speech wing of the free speech party?"&lt;/p&gt; &lt;p&gt;Now's the time to take control of your destiny again and host your own shit. I can help, more posts to come in the near future.&lt;/p&gt;

</description>
      <category>post</category>
      <category>freedom</category>
      <category>selfhosting</category>
    </item>
  </channel>
</rss>
