SpongeB0B

joined 11 months ago
 

cross-posted from: https://programming.dev/post/24356655

Hi,

I would like to forward packets that come from a wireguard connection to a local subnet

environment
  • Client: connected to server trough wireguard IP 192.168.X.2
  • server: connected to Client trough wireguard IP 192.168.X.1 and 192.168.Y.1 ( it's not systemd free ¯\(ツ)/¯  )
  • aMachine: on the same subnet as server IP 192.168.Y.2

   

on the server I've done

#I don't know if this is necessary ?
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl --system

I've added the following rule to my nftables config but it seem the packet get lost ?

#added inside existing table `table ip Tip {}`
chain chPreRoute {
type nat hook prerouting priority 0; policy accept;
iif wg0 icmp type echo-request dnat to 192.168.Y.2
}
 

Hi,

I would like to forward packets that come from a wireguard connection to a local subnet

environment
  • Client: connected to server trough wireguard IP 192.168.X.2
  • server: connected to Client trough wireguard IP 192.168.X.1 and 192.168.Y.1 ( it's not systemd free ¯\(ツ)/¯  )
  • aMachine: on the same subnet as server IP 192.168.Y.2

   

on the server I've done

#I don't know if this is necessary ?
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl --system

I've added the following rule to the nftables config on server but it seem the packet get lost ?

#added inside existing table `table ip Tip {}`
chain chPreRoute {
type nat hook prerouting priority 0; policy accept;
iif wg0 icmp type echo-request dnat to 192.168.Y.2
}
 

Hi,

I would like to pass the arguments to apt trough a .sh script.

apt install "${1}/opensnitch_${1}_amd64.deb" "${1}/python3-opensnitch-ui_${1}_all.deb"

so for example if I launch test.sh 1.6.5 the script should run apt install 1.6.5/opensnitch_1.6.5_amd64.deb 1.6.5/python3-opensnitch-ui_1.6.5_all.deb

but it's not wokring it pass to apt only 1.6.5 and not the rest of the string... any ideas ?

1
submitted 2 months ago* (last edited 2 months ago) by SpongeB0B@programming.dev to c/linux@lemmy.ml
 

Hi,

On my Debian 12 Bookworm ( raspberry pi )

My nftables do not block DHCP packets ! according to this basic rules

nft -y list rulesset

table ip Tip {

	chain chIN {
		type filter hook input priority 0; policy drop;
		ct state established,related accept
	}
	chain chFW {
		type filter hook forward priority 0; policy drop;
	}
	chain chOUT {
		type filter hook output priority 0; policy drop;
		udp dport 67 drop #DHCP
		udp dport 53 accept
		tcp dport { 80, 443} accept
		ct state established,related accept
	}

}

DHCP should be blocked... but it's not as I get an IP from it..

Any ideas ?

Thanks.

 

Hi,

I've recompiled my kernel[^moreinfo] of my raspberry pi 4 that run under Devuan rpi

some of the command used on the rpi to compile

apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev
mkdir /RaspKernel_6_1_y && cd /RaspKernel_6_1_y
git clone --depth=1 --branch rpi-6.1.y https://github.com/raspberrypi/linux
cd linux
cp /boot/config-6.1.93 /RaspKernel_6_1_y/linux/.config
KERNEL=kernel8
make menuconfig
time make -j$((`nproc` - 2)) Image.gz modules dtbs
make -j$((`nproc` - 2)) modules_install
cp arch/arm64/boot/Image.gz /boot/broadcom/$KERNEL.img
cp arch/arm64/boot/dts/broadcom/*.dtb /boot/broadcom/
cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/
reboot
apt install cryptsetup


In addition to have enabled some cipher/algorithm in the kernel config I have set a string ( TESTversionA ) in CONFIG_LOCALVERSION , may be I shouldn't have :/ ?

I'm currently following this guide LUKS on Raspberry Pi ( for context my related lemmy post )

So now that the kernel has been updated, the cryptsetup benchmark -c xchacha20,aes-adiantum-plain64 command is successful

So in order to enable luks in initramfs I'm following the preparing-linux section of this guide.

we can read:

initramfs has to be recreated

I followed the guidance and edited the initramfs-rebuild file to match my setup

initramfs-rebuild file

#!/bin/sh -e

# Rebuild initrd.gz after kernel upgrade to include new kernel's modules.
# https://github.com/Robpol86/robpol86.com/blob/master/docs/_static/initramfs-rebuild.sh
# Save as (chmod +x): /etc/kernel/postinst.d/initramfs-rebuild

# Remove splash from cmdline.
if grep -q '\bsplash\b' /boot/cmdline.txt; then
  sed -i 's/ \?splash \?/ /' /boot/cmdline.txt
fi

# Exit if not building kernel for this Raspberry Pi's hardware version.
version="$1"
current_version="$(uname -r)"
case "${current_version}" in
  *-v7+)
    case "${version}" in
      *-v7+) ;;
      *) exit 0
    esac
  ;;
  *+)
    case "${version}" in
      *-v7+) exit 0 ;;
    esac
  ;;
esac

# Exit if rebuild cannot be performed or not needed.
[ -x /usr/sbin/mkinitramfs ] || exit 0
[ -f /boot/broadcom/initrd.gz ] || exit 0
lsinitramfs /boot/broadcom/initrd.gz |grep -q "/$version$" && exit 0  # Already in initramfs.

# Rebuild.
mkinitramfs -o /boot/broadcom/initrd.gz "$version"


and when I run mkinitramfs -o /boot/broadcom/initrd.gz I got

grep: /boot/config-6.1.93TEST+: No such file or directory

I've did

cp /RaspKernel_6_1_y/linux/.config /boot/config-6.1.93TEST+
mkinitramfs -o /boot/broadcom/initrd.gz

and it seemed worked. I've edit the remaining files

  • /boot/broadcom/cmdline.txt
  • /etc/fstab
  • /etc/crypttab

rebooted. Landed in the initramfs shell as expected

but benchmark -c xchacha20,aes-adiantum-plain64 is no longer successful :'(

Cipher xchacha20,aes-adiantum-plain64 (with 256 bit key) is not available

Any ideas where might lay the problem ?

Thanks.

[^moreinfo]: --branch rpi-6.1.y https://github.com/raspberrypi/linux

 

Hi,

I'm trying to encrypt the root filesystem / of a raspberry pi 4 device running under Devuan rpi ( custom kernel )

I'm following LUKS on Raspberry Pi 2021 guide

That explain step by step how achieve this.

But the guide use initramfs and my distro seem to use initrd

So the question, is: should I migrate to initramfs ? and how check whats is inside my current initrd

or keep-up with initrd but then how insert the necessary to enable LUKS drive to be mounted by it ( initrd ) ?

Thanks.

 

Hi,

I have a great piece of software, that apparently need HAVE_KPROBES_ON_FTRACE

To config the kernel option I'm using :

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig

The Kernel is Linux/arm64 6.6.63

When I'm doing a search inside menuconfig i get:

Symbol: HAVE_KPROBES_ON_FTRACE [=n]
Type  : bool
Defined at arch/Kconfig:223


Symbol: KPROBES_ON_FTRACE [=n]
Type  : bool
Defined at arch/Kconfig:117
 Depends on: KPROBES [=y] && HAVE_KPROBES_ON_FTRACE [=n] && DYNAMIC_FTRACE_WITH_REGS [=n]

But I found it no where in the menu... and if I add it mannuly in the .config file, then make some more other adapations in menuconfig my manual entry disappear..

Any ideas ?

Maybe HAVE_KPROBES_ON_FTRACE is not supported in 6.6.63 ?

Thanks

 

Hi,

The SBC Raspberry Pi 4 boot on an sdcard with two partition /boot and /

So I managed to encrypt the partition / with cryptsetup

Here the partition of my sd-card

device FILESYS LABEL UUID
sdb1 vfat BOOT ( 9 characters )
sdb2 crrypto_LUKS ( 36 characters )

I've modified the /boot/cmdline.txt

to ( on one line )

console=serial0,115200
console=tty1
root=UUID=#If I try the UUID of sdb2 it fail and also the UUID when I use `cryptsetup luksOpen /dev/sdb2 b2open`
rootfstype=ext4
fsck.repair=yes
loglevel=5
net.ifnames=0
firmware_class.path=/lib/firmware/updates/brcm
rootwait
cryptdevice=UUID=#I dont know which one:b2open

any ideas ?

Thanks.

[–] SpongeB0B@programming.dev 1 points 7 months ago

Thank you @gerbercj@lemmy.world sadly it's hosted on google ... :/ https://issuetracker.google.com

If I post here on lemmy, me feature request somebody would be kind to submit to google ?

Thanks.

[–] SpongeB0B@programming.dev 2 points 7 months ago

it's related to the GPS fix. So which is it ?

 

cross-posted from: https://programming.dev/post/18448635

Hi,

I was a very long time I didn't need to created a animated gif... I had a program before to take a static images (.jpg, .png etc..) and convert then into an animated gif..

All the web search engine push for online (aka SaaSS) tool 🤮

Do you know a program that do that ( Linux )

Thanks.

 

Hi,

I was a very long time I didn't need to created a animated gif... I had a program before to take a static images (.jpg, .png etc..) and convert then into an animated gif..

All the web search engine push for online (aka SaaSS) tool 🤮

Do you know a program that do that ( Linux )

Thanks.

 

cross-posted from: https://programming.dev/post/18448206

Hi,

I would like to use a rectangle that move (left to right) to reveal an element / image

like this

The white box shall be the image to display

But I'm already block at my svg animation

<svg viewBox="0 0 265.135 68.642" xmlns="http://www.w3.org/2000/svg">
<g x="-55.790085" y="0.79151762">
    <rect
       style="fill:#ffcc00;stroke-width:2.46513;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers;stop-color:#000000"
       width="55.465603"
       height="151.60599"       
       transform="rotate(45)" />
       <animate
      attributeName="x"
      values="-55.790085;265"
      dur="5s"
      repeatCount="indefinite" />
  </g>
</svg>

Because the rectangle is not moving :'(

Any ideas ?

Thanks.

 

Hi,

I would like to use a rectangle that move (left to right) to reveal an element / image

like this

The white box shall be the image to display

But I'm already block at my svg animation

<svg viewBox="0 0 265.135 68.642" xmlns="http://www.w3.org/2000/svg">
<g x="-55.790085" y="0.79151762">
    <rect
       style="fill:#ffcc00;stroke-width:2.46513;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers;stop-color:#000000"
       width="55.465603"
       height="151.60599"       
       transform="rotate(45)" />
       <animate
      attributeName="x"
      values="-55.790085;265"
      dur="5s"
      repeatCount="indefinite" />
  </g>
</svg>

Because the rectangle is not moving :'(

Any ideas ?

Thanks.

[–] SpongeB0B@programming.dev 1 points 7 months ago

Are you owning the DoH endpoint ? if not, they can :)

[–] SpongeB0B@programming.dev 1 points 7 months ago (2 children)

I live in a country where the state doesn’t care about what people do online.

Lucky YOU !!!!, but it's not meaning other country will not track you...

What similar quick image sharing site should I use?

It's a really good question ! Sadly a lot of website admin do not understand the harm to use solution like Cloudflare etc... see https://stallman.org/cloudflare.html for a short introduction

I think it would be wise to open a topic for that question only

And again thanks four your inkscape solution

[–] SpongeB0B@programming.dev 2 points 7 months ago (4 children)

Thank you ! @infeeeee I didn't know the transformation handles Side note: be aware that files.catbox.moe seem to block TOR user :/

[–] SpongeB0B@programming.dev 2 points 7 months ago (1 children)

Thank you ! it works !

Actually this is working :

path/to/venv/bin/gunicorn A_Web_App:app

Some other poster, claim it's dirty.. but which problems could it generate ? (if any)

Thanks all !!!!

[–] SpongeB0B@programming.dev 1 points 7 months ago* (last edited 7 months ago) (4 children)

I don't want to make the venv portable...
I want to use the gunicorn that is installed in one venv accessible to other venv

[–] SpongeB0B@programming.dev 6 points 8 months ago* (last edited 8 months ago) (1 children)

ok I've found a work around

<style>
.FlexColumn {display: flex;flex-flow: column nowrap }
.FlexColumn > div {display: inline-block; margin: -4px 0}
</style>

<div class="FlexColumn">
	<div>X</div>
	<div>X</div>
	<div>X</div>
	<div>X</div>
	<div>X</div>
</div>

But if someone have something more proper, I'm all ears.

view more: next ›