Stop the war!

Stop the war in Ukraine! Fuck putin!

More information is at:

There is a fund to support the Ukrainian Army:, and there is a special bank account that accepts funds in multiple currencies: I donated to them. Please donate if you can!

Killer putin

Killer putin. Source:

Arrested putin

"It hasn't happened yet, but it will happen sooner or later. Beautiful photo, isn't it?" Source: twitter.

Airplane mode on iPad doesn't work?!

| comments

This title reflects my utter surprise when I tested an iOS application on a connected iPad, turned on Airplane mode to terminate the application’s connection with the MacBook Pro… but it continued to work. The iOS application runs a server, publishes it using Bonjour (aka DNS-SD) and a client on the network (my macbook in this case) connects to it. To test some scenarios, I need to block the connection and the natural way is to enable the Airplane Mode or disable WiFi, but neither worked. This was very bizarre.

I have a cellular iPad and turns out when it’s connected to the Mac via USB, it adds a new network interface (NIC)! In my case it’s en5:

$ ifconfig
        ether aa:bb:cc:dd:ee:ff
        inet6 fe80::18f9:12b4:7809:1000%en5 prefixlen 64 secured scopeid 0xd
        nd6 options=201<PERFORMNUD,DAD>
        media: autoselect (100baseTX <full-duplex>)
        status: active

There are no unusual, iPad-related services in the Network settings on OSX. Also nothing about this in the iPad settings, especially because there is no SIM card installed and the cellular is off.

So my application’s connection was actually going through this interface instead of WiFi, and therefore disabling WiFi didn’t do anything to it. The “fix” for this issue is to disable this NIC manually with sudo ifconfig en5 down. It has to be done every time you connect the iPad. I couldn’t find any information online on how to disable this behavior altogether.

A tip: to make this faster, I allowed sudo to run ifconfig without asking for my password. The command sudo visudo opens /etc/sudoers in your text editor and verifies that it’s in the correct format before replacing it. The line to add to /etc/sudoers is:

%admin ALL=(ALL) NOPASSWD: /sbin/ifconfig

ps. Airplane mode has also become confusing now (iOS 13). It doesn’t always disable WiFi, but it depends on the setting at the time you last enabled it. Go figure: