Categories
Uncategorized

Lxd is much better than Podman or Docker

I wanted to use Linux containers. I read about Docker and Podman. I believed that Podman was better. I few days ago i discovered lxd. It is more like virtual machines. I like that. Lxd have a cluster function. All nodes remember the settings. I can add network interfaces and volumes after the container is created. It does not loose state.

Categories
Network

Looks like Wireguard dont work with virt-io network adapter with Windows as a guest on KVM

Took me many hours to get Wireguard working in a Windows server 2022 VM. After many hours i understood that large UDP packets disappeared when they should go from the guest to the host. UDP packets over 1000 bytes just disappeared. First i set MTU to 1000 in the Windows guest. That made the network work. When i switch the virtual network adapter to e1000e instead of virt-io the UDP packets stopped disappearing.

You can see the network connections names with

netsh int ipv4 show sub

You can change the MTU in windows with

netsh int ipv4 set sub <Connection name> mtu=<size> store=persistent

example

netsh int ipv4 set sub "Wi-Fi 2" mtu=1492 store=persistent
Categories
Network

I tried to use 6rd to get IPv6 at home

It worked. I found a script that uses ip2route set up a 6rd tunnel on Linux. If you look at the script you see that the IPv6 address is calculated from the IPv4 address. That is bad. That means if your IPv4 address changes your IPv6 addresses will also change. I will continue to use a Hurricane electric tunnel. Then the IPv6 addresses will always be the same.

#!/bin/sh

## You must have a real routable IPv4 address for IPv6 rapid deployment (6rd)
## tunnels.
## Also make sure you have at least linux kernel 2.6.33 and you have enabled 6rd
## CONFIG_IPV6_SIT_6RD=y

PREFIX="2a02:2b64"                  # 6rd ipv6 prefix
GATEWAY=`dig +short 6rd.on.net.mk`  # 6rd gateway host

modprobe sit

## Try to autodetect the local ipv4 address
MYIPV4=`ip -o route get 8.8.8.8 | sed 's/.* src \([0-9.]*\) .*/\1/'`

## Generate an IPv6-RD address
MYIPV4_nodots=`echo ${MYIPV4} | tr . ' '`
IPV6=`printf "${PREFIX}:%02x%02x:%02x%02x::1" ${MYIPV4_nodots}`

## Setup the tunnel
ip tunnel add 6rd mode sit local ${MYIPV4} ttl 64
ip tunnel 6rd dev 6rd 6rd-prefix ${PREFIX}::/32
ip addr add ${IPV6}/32 dev 6rd
ip link set 6rd up
ip route add ::/0 via ::${GATEWAY} dev 6rd


## IPv6-rd allows you to have IPv6 network in your LAN too. Uncomment the
## following 3 lines on your Linux router and set the correct LAN interface.
## You might also want to run the 'radvd' sevice to enable IPv6 auto-configuration
## on the LAN.

# sysctl -w net.ipv6.conf.all.forwarding=1
# LANIF=eth0
# ip addr add ${IPV6}/64 dev ${LANIF}