Denis

Blogging because... why not ?

Sharing the Microsoft SSH agent pipe with a container on Windows is not possible so we'll use Putty SSH agent pageant.exe.

  • Install and launch pageant.exe
  • Set SSH_AUTH_SOCK environment variable : $env:SSH_AUTH_SOCK="\\.\pipe\"+(get-childitem -Filter pageant* \\.\pipe\ -Name)
  • Add the key to the agent : ssh-add.exe C:\Users\%username%\.ssh\id_ed25519
  • Run the container : docker run -it --isolation=hyperv --mount type=npipe,source=$env:SSH_AUTH_SOCK,target='\\.\pipe\openssh-ssh-agent' -e SSH_AUTH_SOCK='\\.\pipe\openssh-ssh-agent' mcr.microsoft.com/windows/servercore:ltsc2025 powershell

Once inside the container, check if it works :

PS C:\> echo $env:SSH_AUTH_SOCK
\\.\pipe\openssh-ssh-agent
PS C:\> ssh-add.exe -l
[...key should appear here...]
PS C:\> git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
PS C:\> git clone git@github.com:org/repo.git
Cloning into 'repo'...
remote: Enumerating objects: 11178, done.
[...Git can clone using the SSH key...]

To convert this “Network Terminal” to a bridged AP requires a few steps.

Connect to the admin interface, go to “System Management”/“Upstream network port settings” and select “fixed upstream network port”. The device will reboot once. Reconnect to the admin interface and go to “Network configuration”/“WAN configuration”. Remove the existing profile and create a new one with WAN mode = bridge and tick everything under “binding options”. Enter 0 as multicast VLAN ID value for both address families. Save and reboot.

Add a /etc/printcap :

lp|local printer|Brother:\
   :lap:\
   :rp=raw:\
   :rm=192.168.1.16:\
   :sd=/var/spool/output/brother:\
   :lf=/var/log/lpd-errs:\
   :sh:

Enable lpd(8) with rcctl enable ldp

Tidbit MicroPlug is a PON OLT in the form of a SFP+.

Here are some instructions (reminder) how to configure it.

First steps, plug the OLT module inside a switch. I use a Juniper QFX5110.

Install the controller software (MicroClimate™ Management System – MCMS) on an Ubuntu 20.04.

Default management VLAN for the MicroPlug is 4090.

On the switch, configure the ports to allow communication over VLAN 4090 (could be simpler than what is presented here, but, hey!, it is my notepad)

interfaces {
    xe-0/0/0 {
        flexible-vlan-tagging;
        encapsulation extended-vlan-bridge;
        description port_with_OLT
        unit 200 {
            family ethernet-switching {
                interface-mode trunk;
                vlan {
                    members 200;
                }
            }
        }
        unit 4090 {
            vlan-id 4090;
        }
    }
    xe-0/0/4 {
        flexible-vlan-tagging;
        encapsulation extended-vlan-bridge;
        description port_with_Controller
        unit 200 {
            vlan-id 200;
        }
        unit 4090 {
            vlan-id 4090;
        }
    }
}
vlans {
    v200 {
        vlan-id 200;
        interface xe-0/0/4.200;
    }
    v4090 {
        vlan-id 4090;
        interface xe-0/0/4.4090;
        interface xe-0/0/0.4090;
    }
}

If everything is right, the MCMS should detect the OLT and the ONU.

Ubuntu 22.04

Hit 'e' in Grub to edit boot kernel parameters. Add console=tty0 console=ttyS0,115200n8 to the kernel line :

linux    /linux --- console=tty0 console=ttyS0,115200n8

Ubuntu 20.04

When the boot: prompt appear, type live console=ttyS0,115200n8 vga=none

(Apparently, it could be gfxpayload=text instead of vga=none on Debian 12)

When the video is lagging on my FireTV stick, I downgrade the bitrate with :

ffmpeg -i ~/video/in_video.mkv -vcodec mpeg4 -acodec mp3 -b:v 1000K ~/video/out_video.avi

# Get and unpack sources, then build with :
go mod tidy
go build -v -tags='sqlite' ./cmd/writefreely/
#
# Generate assets :
cd less/
LESSC=lessc 
CSSDIR=../static/css
$LESSC icons.less ${CSSDIR}/icons.css
$LESSC fonts.less ${CSSDIR}/fonts.css
$LESSC app.less ${CSSDIR}/write.css
#
# Copy to server :
scp writefreely user@wf.ledeuns.net:~
scp -r templates user@wf.ledeuns.net:~
scp -r pages user@wf.ledeuns.net:~
scp -r static user@wf.ledeuns.net:~
#
# Update database schema :
writefreely db migrate

  • Install xl2tpd :
pkg_add xl2tpd
usermod -G network _xl2tpd
  • Create /etc/xl2tpd/xl2tpd.conf :
[global]
port = 1701

[lac l2tp]
lns = ${provider_lnsaddress}
pppoptfile = /etc/ppp/options.l2tp
  • Create /etc/ppp/options.l2tp : (the ipv6 bits are from a local diff, comment them if you don't use it)
ipcp-accept-local
ipcp-accept-remote
ipv6cp-accept-local
ipv6cp-accept-remote
noccp
noauth
mtu 1400
mru 1400
lock
defaultroute
defaultroute6
user ${ppp_username}
netmask 255.255.255.255
  • Create /etc/ppp/chap-secrets :
${ppp_username} * ${ppp_password} *
  • Configure network & modem :
ifconfig ppp0 up
ifconfig em0 192.168.8.2/24 up
route add ${provider_lnsaddress} 192.168.8.1
echo '' > /etc/ppp/options
  • Start xl2tpd :
rcctl start xl2tpd
  • Connect to PPP :
echo c l2tp > /var/run/xl2tpd/l2tp-control