- Registriert
- 30. Dezember 2011
- Beiträge
- 16.193
- Lösungen
- 9
- Reaktionspunkte
- 17.764
- Punkte
- 1.093
- Ort
- Im wilden Süden
Code:
/scripts/init-premount/deupts: line 21: mountpoint: not found
Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben
Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben
/scripts/init-premount/deupts: line 21: mountpoint: not found
[...]
20 # If /dev/pts is already mounted, don't re-mount it.
21 mountpoint -q /dev/pts || exit 0
22
23 log_begin_msg "Mounting devpts"
24
25 mkdir -p /dev/pts
26 mount -t devpts none /dev/pts
root@xxxx:/# which mountpoint
/bin/mountpoint
nano /etc/initramfs-tools/hooks/mountpoint
#!/bin/sh
PREREQ=""
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /bin/mountpoint /bin
chmod +x /etc/initramfs-tools/hooks/mountpoint
update-initramfs -u
Würde es mit auskommentieren # der Zeile 21 probierenin der deupts Datei finde ich an Line 21 folgendes...
~ # echo -n 'pass' | /sbin/cryptsetup open /dev/vda3 vda3_crypt --key-file=-
Unsupported LUKS version 2.
root@deb12 ~ # cryptsetup luksDump /dev/vda3 | grep "Version"
Version: 2
cryptsetup luksFormat --type luks1 /dev/vda3
nano /etc/init.d/firewall
#!/bin/sh
### BEGIN INIT INFO
# Provides: custom firewall
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: firewall initscript
# Description: Custom Firewall
### END INIT INFO
IPT=/sbin/iptables
case "$1" in
start)
# bestehende Verbindungen
$IPT -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
# Über Loopback alles erlauben
$IPT -I INPUT -i lo -j ACCEPT
$IPT -I OUTPUT -o lo -j ACCEPT
# SSH
$IPT -A...
dropbear: WARNING: Setting DROPBEAR in /etc/initramfs-tools/initramfs.conf is deprecated and will be ignored in a future release
dropbear: WARNING: Missing host keys, SSH login to initramfs won't work!
dropbear: WARNING: Invalid authorized_keys file, SSH login to initramfs won't work!
cp ~/.ssh/authorized_keys /etc/dropbear/initramfs
chmod 600 /etc/dropbear/initramfs/authorized_keys
ssh-keygen -y -f /etc/initramfs-tools/root/.ssh/id_rsa > /tmp/id_rsa.pub
cp /tmp/id_rsa.pub /etc/dropbear/initramfs/authorized_keys
chmod 600 /etc/dropbear/initramfs/authorized_keys
nano /etc/initramfs-tools/initramfs.conf
# DROPBEAR=y
nano /etc/dropbear/initramfs/dropbear.conf
DROPBEAR=y
update-initramfs -u
reboot
insserv: warning: script 'firewall.sh' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `firewall.sh'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `firewall.sh'
#!/bin/bash
### BEGIN INIT INFO
# Provides: firewall
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop firewall
# Description: This script manages the firewall rules using iptables.
### END INIT INFO
sleep 5
iptables=$(which iptables)
iptablesv6=$(which ip6tables)
# ... (Rest des Skripts bleibt unverändert)
#!/bin/bash
### BEGIN INIT INFO
# Provides: firewall
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop firewall
# Description: This script manages the firewall rules using iptables.
### END INIT INFO
iptables=$(which iptables)
iptablesv6=$(which ip6tables)
#User Definition mit Zugriffen auf spezielle Services
#user="user.dyndns.org,deinedyn.homedns.com"
#(Ist vor Block APNIC eingebaut!)
#sharepartner="bla.dyndns.org"
# wenn iptables nicht installiert, Fehlermeldung ausgeben und abbrechen
if [ -z "$iptables" ]; then
echo "[Error] iptables is not installed or not in the PATH." >&2
exit 1
fi
# wenn iptablesv6 nicht installiert, Fehlermeldung ausgeben und abbrechen
if [ -z "$iptablesv6" ]; then
echo "[Error] iptablesv6 is not installed or not in the PATH." >&2
exit 1
fi
case "$1" in
start)
echo "[+] Waiting 5 seconds..."
sleep 5
echo "[+] Starting firewall..."
# alle Regeln löschen
$iptables -t nat -F
$iptables -t filter -F
$iptables -X
#$iptablesv6 -t nat -F
$iptablesv6 -t filter -F
$iptablesv6 -X
$iptables -P INPUT DROP
$iptables -P FORWARD DROP
$iptablesv6 -P FORWARD DROP
$iptables -A INPUT -i lo -j ACCEPT
$iptables -A OUTPUT -o lo -j ACCEPT
$iptablesv6 -A INPUT -i lo -j ACCEPT
$iptablesv6 -A OUTPUT -o lo -j ACCEPT
$iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$iptablesv6 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#$iptablesv6 -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$iptables -P OUTPUT ACCEPT
$iptablesv6 -P OUTPUT ACCEPT
# OpenVPN (IP Adresse ggf. anpassen und zum aktivieren des Zugriffs # entfernen!)
#$iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d 10.20.30.40 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
#$iptables -A OUTPUT -p icmp --icmp-type 0 -s 10.20.30.40 -d 0/0 -m state --state ESTABLISHED,RELATED -j ACCEPT
# SSH
$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport 22222 -j ACCEPT
#Xtream-Codes (Port ggf. anpassen und zum aktivieren des Zugriffs # entfernen!)
#$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport PORT -j ACCEPT
#OScam Webif (Port ggf. anpassen und zum aktivieren des Zugriffs # entfernen!)
#$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport PORT -j ACCEPT
#CCcam Share (Port ggf. anpassen und zum aktivieren des Zugriffs # entfernen!)
#$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport PORT -j ACCEPT
#Cs378x Share (Port ggf. anpassen und zum aktivieren des Zugriffs # entfernen!)
#$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -p tcp --dport PORT -j ACCEPT
#DROPS (unerwünschte IPs, von denen JEGLICHE Anfragen verworfen werden):
#$iptables -I INPUT --source <IP> -j DROP
#$iptables -I INPUT --source <IP> -j DROP
#Sharepartner Beispiel CE Port 1337
#$iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED --source $sharepartner -p tcp --dport 1337-j ACCEPT
#Jeder Sharepartner kann somit auf Port 1337 connecten.
#Willst du das es einer nicht mehr tut, dann einfach oben in der Variable den betroffenen Sharepartner entfernen!
#Block APNIC LACNIC
#Hinweis: Blockiert Asien, Südamerika, Mittelamerika, beschränkt Russland bzw. Osteuropa!
APNIC=(
"1.0.0.0/8"
"14.0.0.0/8"
"27.0.0.0/8"
"36.0.0.0/8"
"39.0.0.0/8"
"42.0.0.0/8"
"43.0.0.0/8"
"49.0.0.0/8"
"58.0.0.0/8"
"59.0.0.0/8"
"60.0.0.0/8"
"61.0.0.0/8"
"101.0.0.0/8"
"103.0.0.0/8"
"106.0.0.0/8"
"110.0.0.0/8"
"111.0.0.0/8"
"112.0.0.0/8"
"113.0.0.0/8"
"114.0.0.0/8"
"115.0.0.0/8"
"116.0.0.0/8"
"117.0.0.0/8"
"118.0.0.0/8"
"119.0.0.0/8"
"120.0.0.0/8"
"121.0.0.0/8"
"122.0.0.0/8"
"123.0.0.0/8"
"124.0.0.0/8"
"125.0.0.0/8"
"126.0.0.0/8"
"133.0.0.0/8"
"150.0.0.0/8"
"153.0.0.0/8"
"163.0.0.0/8"
"171.0.0.0/8"
"175.0.0.0/8"
"177.0.0.0/8"
"179.0.0.0/8"
"180.0.0.0/8"
"181.0.0.0/8"
"182.0.0.0/8"
"183.0.0.0/8"
"186.0.0.0/8"
"187.0.0.0/8"
"189.0.0.0/8"
"190.0.0.0/8"
"200.0.0.0/8"
"201.0.0.0/8"
"202.0.0.0/8"
"203.0.0.0/8"
"210.0.0.0/8"
"211.0.0.0/8"
"218.0.0.0/8"
"219.0.0.0/8"
"220.0.0.0/8"
"221.0.0.0/8"
"222.0.0.0/8"
"223.0.0.0/8"
)
for blockapnic in "${APNIC[@]}"
do
$iptables -A INPUT --source $blockapnic -j DROP
done
$iptables -N LOGGING
$iptables -A INPUT -j LOGGING
$iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7
$iptables -A LOGGING -j DROP
$iptables -A LOGGING -j REJECT
#PING Sperre
$iptables -A INPUT -i eth0 -j REJECT
# SICHERHEIT
$iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
$iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
$iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
$iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s
echo "[OK] Firewall has been activated, the server is protected."
;;
stop)
echo "[+] Stopping firewall..."
$iptables -t nat -F
$iptables -t filter -F
$iptables -X
$iptables -P INPUT ACCEPT
$iptables -P OUTPUT ACCEPT
$iptables -P FORWARD ACCEPT
$iptablesv6 -t nat -F
$iptablesv6 -t filter -F
$iptablesv6 -X
$iptablesv6 -P INPUT ACCEPT
$iptablesv6 -P OUTPUT ACCEPT
$iptablesv6 -P FORWARD ACCEPT
echo "[!] Firewall has been stopped, the server is unprotected."
;;
restart|reload|force-reload)
$0 stop
$0 start
;;
*)
echo "[Error] Invalid argument."
echo "Usage: $0 (start|stop|restart)"
exit 1
#;;
esac
exit 0
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Das Digital Eliteboard ist ein kostenloses Forum und ist auf Spenden angewiesen, um sich auch in Zukunft selbst zu finanzieren. Wenn auch du mit dem Digital Eliteboard zufrieden bist, würden wir uns über jede Unterstützung freuen.
Hier kannst du uns unterstützen SPENDEN