WireGuard as a “Switch”



Not really a switch, but similar. If you want to exchange data from two network using a host on Internet, this post helps.

In this case, Router 1 want to use Router 2 as gateway for some destinations. All 3 Nodes here have Internet public IP address.

I set-up a network, 192.168.20.0/24, using WireGuard. Our work are all on the Server in the middle.

If I put such config to /etc/wireguard/wg0.conf and run wg-quick up wg0, then I may lost connection to the server, because of the default route.

Now, add a route table to your system and change wg0.conf, let’s name it wgswitch and table id 201.

Then modify wg0.conf.

Now when you establish connections, you’ll be able to ping from router1 to router2 using 192.168.20.0/24 network.

But if you want to try a custom network, that’s not enough, you need extra route and ip rule for your network



WireGuard as a “Switch” by @sskaje: https://sskaje.me/2019/11/wireguard-as-a-switch/

List of macOS Installer Download Links



10.15 Catalina

AppStore only, you need a macOS < 10.15 to download this installer

https://itunes.apple.com/cn/app/macos-catalina/id1466841314?ls=1&mt=12

10.14 Mojave

AppStore only, you need a macOS < 10.14 to download this installer

https://apps.apple.com/cn/app/macos-mojave/id1398502828?mt=12

10.13 High Sierra

AppStore only, you need a macOS < 10.13 to download this installer

https://apps.apple.com/cn/app/macos-high-sierra/id1246284741?ls=1&mt=12

10.12 Sierra

http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg

10.11 El Captain

http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg

10.10 Yosemite

http://updates-http.cdn-apple.com/2019/cert/061-41343-20191023-02465f92-3ab5-4c92-bfe2-b725447a070d/InstallMacOSX.dmg

10.9 Mavericks or earlier

Idk



List of macOS Installer Download Links by @sskaje: https://sskaje.me/2019/11/list-of-macos-installer-download-links/

Docker Desktop for Windows on Server 2019 Essentials



Docker Desktop for Windows reports incompatible with Windows Server 2019 Essentials.

Logs indicates that hyper-v is required.

Here is a bat enabling all hyper-v related feature on Windows.

Also, Container

But I tried Docker EE on Windows Server 2019 Essentials, still not working.

https://forums.docker.com/t/installing-docker-on-windows-10-home/11722/25



Docker Desktop for Windows on Server 2019 Essentials by @sskaje: https://sskaje.me/2019/10/docker-desktop-for-windows-on-server-2019-essentials/

Azure Site-to-Site VPN with Dynamic Client IP



以前自己用 strongswan 等软件配 IPSec site-to-site 的时候,可以直接指定客户端的 IP 是 0.0.0.0,Azure 的 site-to-site IPSec VPN 必须要指定客户端 IP。

PowerShell 爱好者可以参考 https://www.hayesjupe.com/using-azure-rm-site-to-site-vpn-with-a-dynamic-ip/ 这篇文章。

我还是习惯用 Linux,于是使用 Azure CLI 来解决这个问题。

在 VPN 的 Virtual Network 里放置一台 Linux 虚拟机。按照上述连接里的说明安装软件。接下来开始操作。

1 登录

SSH 登录虚拟机后,执行命令,并按照输出,用浏览器登录 Azure 账号,完成认证。

如果是中国区 Azure,先需要设置服务器

如果需要切换回海外版本

2 添加更新服务

参考 DDNS 的玩法,让客户端定期更新IP。服务端可以简单地将数据记录到数据库、文件、或者任何地方,配置一个 cron 来执行更新检测和 Gateway IP 更新。

3 更新 Gateway IP

这里会有个问题,如果源 IP 和新 IP 相同,update 可能会出一个莫名其妙的404 错误。

看了眼 –verbose –debug 的输出,这个 update 命令先发送了一条命令到服务端,然后轮询等待任务更新。可能这个任务服务端直接判定不需要执行,所以返回的 operation id 无效。



Azure Site-to-Site VPN with Dynamic Client IP by @sskaje: https://sskaje.me/2019/08/azure-site-to-site-vpn-with-dynamic-client-ip/

MacPorts xcodebuild error



Error messages:

Warning: xcodebuild exists but failed to execute

Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option

Warning: Xcode does not appear to be installed; most ports will likely fail to build.

Solution:



MacPorts xcodebuild error by @sskaje: https://sskaje.me/2019/08/macports-xcodebuild-error/