-
Notifications
You must be signed in to change notification settings - Fork 0
Tips & Tricks
sudo adduser limiteduser --shell=/bin/false --no-create-home
Add below lines in /etc/ssh/sshd_config
Match user limiteduser
ForceCommand /bin/false
apk add --no-cache e2fsprogs-extra
resize2fs /dev/mmcblk0p2
The partition will be resized to maximum size
----------------------------//-----------------------------
List:
iptables -t nat -v -L -n --line-number
ip6tables -t nat -v -L -n --line-number
Delete rule:
iptables -t nat -D POSTROUTING 2
ip6tables -t nat -D POSTROUTING 2
----------------------------//-----------------------------
Backup the 2 partitions from SD card to .img files
dd bs=4M if=/dev/sdb1 of=Alpine_sdb1.img
dd bs=4M if=/dev/sdb2 of=Alpine_sdb2.img
Write the .img files to a new SD card, formatted with 2 partitions: sdb1=FAT32, 400 MB, and sdb2=ext4, the rest of the card
dd if=Alpine_sdb1.img of=/dev/sdb1 bs=4M
dd if=Alpine_sdb2.img of=/dev/sdb2 bs=4M
----------------------------//-----------------------------
grep -v '^#' hostapd.conf
- print file without lines starting with #
----------------------------//-----------------------------
rm -rf /root/.ssh
rm -rf /home/iblocker/.ssh/
rm -rf /var/www/.ssh/
ssh-keygen -t rsa -q -f "/root/.ssh/id_rsa" -N ""
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
ssh -o StrictHostKeyChecking=no root@localhost "exit"
cp /root/.ssh /var/www -R
cp /root/.ssh /home/iblocker -R
chown iblocker:iblocker /home/iblocker/.ssh -R
chmod 755 /var/www/.ssh/
chmod 755 /var/www/.ssh/*
chown apache:apache /var/www/.ssh -R
chown root:root /var/www/.ssh/*
chmod 755 /var/www/.ssh/*
ssh-keyscan -H localhost >> /var/www/.ssh/known_hosts
Check: ssh root@localhost
----------------------------//-----------------------------
apk add --no-cache syslog-ng
Add below lines at the end of /etc/syslog-ng/syslog-ng.conf
filter f_auth { facility(auth); };
log { source(src); filter(f_auth); destination(auth_log); };
Change permissions and restart the service:
chmod 640 /var/log/auth.log
rc-service syslog restart
Verify log: tail -f /var/log/auth.log
----------------------------//----------------------------
Solution:
systemctl stop named.service
rm -r /var/cache/bind/*
systemctl start named.service
----------------------------//-----------------------------
date --set="2024-08-14 10:07:00"
Wed Aug 14 10:07:00 CEST 2024
hwclock --systz
In case time is de-synchronized, comment out the below line from /etc/conf.d/syslog:
SYSLOGD_OPTS="-t"
----------------------------//-----------------------------
rc-update del acpid
----------------------------//-----------------------------
apk add dhcpcd - for IPv6 on eth0 or usb0
rc-update add dhcpcd
rc-service dhcpcd start
rc-status
----------------------------//----------------------------
sed -E '/(^$|^#)/d' input.file > input1.file
- delete lines containing # as first character and empty lines
----------------------------//----------------------------
Convert .avi to .mp4
ffmpeg -i single-cam.avi -c:v libx264 -crf 18 -c:a aac -b:a 128k single-cam.mp4
----------------------------//----------------------------
Contact: office@2transfer.eu
Copyright © IBlocker.eu project. Proudly powered by Open Source software. Copyright Notice | Terms of Service | Privacy Policy
© Design: www.iblocker.eu