- Offizieller Beitrag
Nö, das hämmerst du so in die Konsole
Nö, das hämmerst du so in die Konsole
Raspberry Pi 3 als Hotspot im Unterricht nutzen? Schau mal ob du hier fündig wirst!
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables v1.6.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
das ist die antwort
Perhaps iptables or your kernel needs to be upgraded.
das ist die antwort
Poste hier die Ausgaben von:
Das sind nur Informationen, die dein Problem (durch Eingabe) (noch) nicht lösen.
libkmod: ERROR ../libkmod/libkmod.c:586 kmod_search_moddep: could not open modde p file '/lib/modules/4.9.41-v7+/modules.dep.bin'
modinfo: ERROR: Module alias iptable_nat not found.
libkmod: ERROR ../libkmod/libkmod.c:586 kmod_search_moddep: could not open modde p file '/lib/modules/4.9.41-v7+/modules.dep.bin'
Versuch mal:
Wie ist die Ausgabe von:
? Welches Image hast Du auf deinem PI installiert?
Jetzt musst Du doch noch die Ausgaben von:
posten (siehe oben). Frage: Hast Du evtl. ein "sudo rpi-update" gemacht, das warum auch immer, abgebrochen worden ist? Hinweis: "sudo rpi-update" (jetzt) nicht ausführen!!
uname -a
Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
uname -a
Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
OK. Lt. "drwxr-xr-x 3 root root 4096 Apr 4 07:39 4.14.30-v7+ hast Du ein "sudo rpi-update" gemacht. FRAGE: Danach hast Du evtl. kein reboot gemacht?
ich meine schon - soll ich trotzdem jetzt einen durchführen?
Falls ja - wo mach ich dann weiter?
Hier?
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ich meine schon - soll ich trotzdem jetzt einen durchführen?
Falls ja - wo mach ich dann weiter?
Wenn Du ein "sudo rpi-update" gemacht hast und es ist dabei etwas schief gegangen, könnte es sein, dass nach dem reboot dein PI nicht mehr richtig startet bzw. nicht mehr erreichbar ist.
Poste mal vor dem reboot, die Ausgabe von:
pi@raspberrypi:~ $ ls -la /boot
insgesamt 21675
drwxr-xr-x 3 root root 2560 Apr 4 07:53 .
drwxr-xr-x 21 root root 4096 Apr 4 07:49 ..
-rwxr-xr-x 1 root root 22264 Apr 4 07:52 bcm2708-rpi-0-w.dtb
-rwxr-xr-x 1 root root 21761 Apr 4 07:52 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 22020 Apr 4 07:52 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 21474 Apr 4 07:52 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 23044 Apr 4 07:52 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 24240 Apr 4 07:52 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 24503 Apr 4 07:52 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root 22952 Apr 4 07:52 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 52064 Apr 4 07:51 bootcode.bin
-rwxr-xr-x 1 root root 181 Apr 4 07:53 cmdline.txt
-rwxr-xr-x 1 root root 1648 Jan 1 1980 config.txt
-rwxr-xr-x 1 root root 18693 Apr 4 07:52 COPYING.linux
-rwxr-xr-x 1 root root 2595 Apr 4 07:51 fixup_cd.dat
-rwxr-xr-x 1 root root 6569 Apr 4 07:51 fixup.dat
-rwxr-xr-x 1 root root 9722 Apr 4 07:51 fixup_db.dat
-rwxr-xr-x 1 root root 9726 Apr 4 07:51 fixup_x.dat
-rwxr-xr-x 1 root root 145 Sep 7 2017 issue.txt
-rwxr-xr-x 1 root root 4867400 Apr 4 07:52 kernel7.img
-rwxr-xr-x 1 root root 4622320 Apr 4 07:52 kernel.img
-rwxr-xr-x 1 root root 1494 Apr 4 07:51 LICENCE.broadcom
-rwxr-xr-x 1 root root 18974 Sep 7 2017 LICENSE.oracle
-rwxr-xr-x 1 root root 300 Jan 1 1980 os_config.json
drwxr-xr-x 2 root root 11264 Apr 4 07:53 overlays
-rwxr-xr-x 1 root root 672804 Apr 4 07:51 start_cd.elf
-rwxr-xr-x 1 root root 4967492 Apr 4 07:51 start_db.elf
-rwxr-xr-x 1 root root 2824484 Apr 4 07:51 start.elf
-rwxr-xr-x 1 root root 3911492 Apr 4 07:51 start_x.elf
Alles anzeigen
Ok, das kann auch von einem "sudo apt-get dist-upgrade" sein, und danach kein reboot gemacht? Mach mal jetzt ein reboot:
Du musst nach der Eingabe, 1 Minute warten, denn erst dann rebootet dein PI.
okay - wie geht es jetzt weiter nach dem reboot?
okay - wie geht es jetzt weiter nach dem reboot?
Poste jetzt die Ausgaben von:
und wenn diese OK sind, kannst Du mit der iptables-Regel weiter machen.
pi@raspberrypi:~ $ lsmod | grep -i nat
pi@raspberrypi:~ $ modinfo iptable_nat
filename: /lib/modules/4.14.30-v7+/kernel/net/ipv4/netfilter/iptable_nat.k o
license: GPL
srcversion: 5540E1907C770CB63D5E1EC
depends: ip_tables,nf_nat_ipv4
intree: Y
name: iptable_nat
vermagic: 4.14.30-v7+ SMP mod_unload modversions ARMv7 p2v8
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/ Linux
pi@raspberrypi:~ $
pi@raspberrypi:~ $ modinfo iptable_nat
filename: /lib/modules/4.14.30-v7+/kernel/net/ipv4/netfilter/iptable_nat.ko
Linux raspberrypi 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/ Linux
Ja, das sieht gut aus. Kannst mit iptables weiter machen.
Sonst nehme meine Anleitung für Hotspot.
Ist im howto Bereich hinterlegt.
Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!