Managed personal VPN between your devices through Azure

#misc

Let’s say you have a few Windows devices, for example, a powerful desktop and laptop. You mostly work on the desktop but when being remote on the laptop you want to be able to remote to the desktop and harvest it’s power / avoid having to sync data.

Unfortunately, your ISP NATs you into oblivion and/or doesn’t provide static IP so RDP/SSH’ing directly is out of the question. Self-hosted Visual Studio Codespace works for most things but don’t cut it for everything. At the same time, you neither want to rent a VM and manage your own VPN (too much work) nor want to use off the shelf 3rd party product s.a. hamachi/TeamViewer/Parsec because you have this irrational detest towards 3rd party remoting software (I know, I know…1).

This brings you to a situation in which you’re looking for a managed VPN, ideally one payable with your free Azure credits. Luckily, it’s a situation that has a relatively easy solution.

  1. Follow this Point-to-Site VPN tutorial.
    • Basic SKU should be perfectly fine and will run you < ~30 USD/month.
  2. Distribute client certificates created in 1) to your devices, download VPN configuration.
  3. Connect on all desired devices to the VPN.
  4. Find the IP address of each device within the VPN.
    • Run ipconfig /all and find the assigned address within the correct Network interface on every device. Beware, the list might contain the true VPN network interface’s HyperV relay.
    • Run arp -a, identify the correct network device, and guess the association of IP addresses and devices.
    • Go to Azure Portal/<Your VPN_gateway>/User VPN Configuration/Allocated IP addresses and guess the association of IP addresses and devices.
  5. Use the IP address to SSH/RDP to your desired device.

For RDP two more things might be relevant.

  • By default the VPN’s network interface doesn’t have DNS configured and so connecting via Computer names won’t work. You’ll either have to configure DNS or just use IP addresses directly.
  • I was unable to login into a Windows 10 2004 that was configured as passwordless despite both computers using Microsoft account and Windows hello authentication. I believe it should be possible to make it work, as I know it can work in enterprise setting but just wasn’t worth it for me.

  1. I’m also fully aware that VSCode Codespace is essentially 3rd party remote software, somehow I’m fine with that ¯\(ツ)/¯. 

Read More

Gated linear networks

#papers

This post if from a series of notes written for personal usage while reading random ML/SWE/CS papers. The notes weren’t originally intended for the eyes of other people and therefore might be incomprehensible and/or flat out wrong.

Paper in question: 1910.01526

  • Series of linear filters (weights) on input with non-linearity at the end
    • Non-linearities are on each layer (neuron) but they cancel each other out
  • Set of weights per each neuron
    • Specific weight vector selected via context func. from input (side information)
    • Each neuron different set of weights, different context function
    • Same side information for all neurons in all layers
    • Weights adjusted during training, only the one weight vector for current input
  • Context function:
    • Usually set of half-space functions (similarity with side inf)
    • Don’t change during training, need to be sample correctly
    • Similar data will (through context func.) force same weights for neurons -> sim. outputs
    • Unsimilar data won’t use the same weights -> less forgetting
  • Each neuron is geometric mixture of outputs of previous layer (through weights)
    • Weights initialized randomly, updated via training
  • Essentially a multilevel mixture of KNN and linear transformation with point non-lin.
Read More