• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Raspberry als AP mit mobilem Internet

Hallo,
ich habe einen Raspberry Pi 3B+ mit einem 4G-Hat verbunden und per NetworkManager zum Laufen gebracht. Ein mobiler Internetzugang besteht. Zusätzlich habe ich einen VPN-Tunnel eingerichtet, so dass ich über meine Fritzbox von außen Zugang zum Raspi habe.

Nun möchte ich allerdings noch ein WLAN-Netz mit dem Raspberry aufspannen und Geräte über das WLAN ins Internet bringen.

Mit folgender Anleitung habe ich versucht, das WLAN aufzuspannen: https://intux.de/2019/12/eigenes-wlan-netzwerk-mit-dem-raspberry-pi-realisieren/. Ich komme in das WLAN, allerdings erhalte ich keine Internetverbindung. Wie kann ich hier am besten vorgehen?

Code:
ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:68:2c:85  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 131  bytes 9181 (8.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 131  bytes 9181 (8.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1412
        inet 192.168.178.203  netmask 255.255.255.0  destination 192.168.178.203
        inet6 fe80::5a55:177a:1309:4ce7  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 590  bytes 237343 (231.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 629  bytes 88623 (86.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.222.1  netmask 255.255.255.0  broadcast 192.168.222.255
        inet6 fe80::ba27:ebff:fe3d:79d0  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:3d:79:d0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 78  bytes 7764 (7.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.45.33.176  netmask 255.255.255.224  destination 10.45.33.176
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 654  bytes 285175 (278.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 767  bytes 143278 (139.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Gruß Ainadilion
 

marce

Guru
wie sieht denn die Routing-Tabelle aus?

(und bitte ein paar mehr Infos zu "welches Netzwerk ist denn für was zuständig".
 
OP
A

Ainadilion

Newbie
Hallo,
WWAN0 stellt die Mobilverbindung dar, über WLAN0 sollen die Geräte über den Raspi ins Internet über die Mobilfunkverbindung gehen. tun0 ist die VPN-Verbindung, von der ich von der Fritzbox auf den Raspi zugreifen kann, da dieser nicht in Reichweite der Fritzbox ist.

Gruß
Ainadilion
 

spoensche

Moderator
Teammitglied
Poste mal die Ausgabe folgender Befehle
Code:
ip r s
cat /proc/sys/net/ipv4/ip_forward
iptables -L
iptables -t nat -L
 
OP
A

Ainadilion

Newbie
Hier die Ausgaben:

Code:
root@raspberrypi3:~# ip r s
default dev tun0 proto static scope link metric 50
default via 10.45.205.105 dev wwan0 proto static metric 700
10.45.205.104/30 dev wwan0 proto kernel scope link src 10.45.205.106 metric 700
10.45.205.105 dev wwan0 proto static scope link metric 700
79.218.51.203 via 10.45.205.105 dev wwan0 proto static metric 700
192.168.178.0/24 dev tun0 proto kernel scope link src 192.168.178.203 metric 50
192.168.222.0/24 dev wlan0 proto kernel scope link src 192.168.222.1

root@raspberrypi3:~# cat /proc/sys/net/ipv4/ip_forward
1
root@raspberrypi3:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTA                                                                                                      BLISHED
ACCEPT     all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
root@raspberrypi3:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Gruß
Ainadilion
 
OP
A

Ainadilion

Newbie
hier noch die routing-tabelle

Code:
root@raspberrypi3:~# cat /proc/net/route
Iface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask            MTU     Window  IRTT
tun0    00000000        00000000        0001    0       0       50      00000000        0       0       0                                                                             
wwan0   00000000        E9D6260A        0003    0       0       700     00000000        0       0       0
wwan0   E8D6260A        00000000        0001    0       0       700     FCFFFFFF        0       0       0
wwan0   E9D6260A        00000000        0005    0       0       700     FFFFFFFF        0       0       0
wwan0   CB33DA4F        E9D6260A        0007    0       0       700     FFFFFFFF        0       0       0
tun0    00B2A8C0        00000000        0001    0       0       50      00FFFFFF        0       0       0                                                                             
wlan0   00DEA8C0        00000000        0001    0       0       0       00FFFFFF        0       0       0
 
Ausprobieren

Code:
# iptables -N mydrop
# iptables -A mydrop -j LOG --log-level 4 --log-prefix "MYDROP:"
# iptables -A mydrop -j DROP

# iptables -A FORWARD -m state --state INVALID -j mydrop
# iptables -A FORWARD -i wwan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i wlan0 -o wwan0 -s 192.168.222.0/24 -j ACCEPT
# iptables -A FORWARD -j mydrop

# iptables -A POSTROUTING -t nat -o wwan0 -s 192.168.222.0/24 -j MASQUERADE
Ungetestet, weil ich kein iptables installiert habe.
Es zeigt aber die Richtung an, wie man deine Anforderung erfüllen kann.
Die chain "mydrop" schreibt in den syslog, also dort nachsehen was passiert.
Sollte es funktionieren, dann sind noch die Sicherheitsmaßnahmen einzufügen.

Gruß
Gräfin Klara
 
OP
A

Ainadilion

Newbie
Hier das Ergebnis der Ausgabe:
Code:
May 12 20:39:57 raspberrypi3 kernel: [ 5867.785366] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=13.88.181.35 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=47868 DF PROTO=TCP SPT=38602 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:57 raspberrypi3 kernel: [ 5868.339484] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52864 DF PROTO=TCP SPT=39438 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:57 raspberrypi3 kernel: [ 5868.342003] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=40173 DF PROTO=TCP SPT=39440 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:57 raspberrypi3 kernel: [ 5868.342206] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=11501 DF PROTO=TCP SPT=39442 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:57 raspberrypi3 kernel: [ 5868.342404] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=20050 DF PROTO=TCP SPT=39444 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:57 raspberrypi3 kernel: [ 5868.348307] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=3041 DF PROTO=TCP SPT=39446 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:58 raspberrypi3 kernel: [ 5868.567769] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=13.88.181.35 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=47869 DF PROTO=TCP SPT=38602 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:58 raspberrypi3 kernel: [ 5869.386816] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52865 DF PROTO=TCP SPT=39438 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:58 raspberrypi3 kernel: [ 5869.387174] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=40174 DF PROTO=TCP SPT=39440 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:39:58 raspberrypi3 kernel: [ 5869.387373] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=20051 DF PROTO=TCP SPT=39444 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:00 raspberrypi3 kernel: [ 5871.149296] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=74.125.133.188 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=58176 DF PROTO=TCP SPT=42932 DPT=5228 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:01 raspberrypi3 kernel: [ 5871.501853] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=3043 DF PROTO=TCP SPT=39446 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:01 raspberrypi3 kernel: [ 5871.502631] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=40175 DF PROTO=TCP SPT=39440 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:01 raspberrypi3 kernel: [ 5871.503619] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=11503 DF PROTO=TCP SPT=39442 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:01 raspberrypi3 kernel: [ 5871.504704] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=20052 DF PROTO=TCP SPT=39444 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:01 raspberrypi3 kernel: [ 5871.505802] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52866 DF PROTO=TCP SPT=39438 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:02 raspberrypi3 kernel: [ 5872.677892] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=34531 DF PROTO=TCP SPT=41986 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:02 raspberrypi3 kernel: [ 5872.682992] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=43354 DF PROTO=TCP SPT=46480 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:02 raspberrypi3 kernel: [ 5872.684738] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=9234 DF PROTO=TCP SPT=41990 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:02 raspberrypi3 kernel: [ 5872.687289] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=13762 DF PROTO=TCP SPT=45978 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:03 raspberrypi3 kernel: [ 5873.685969] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=43355 DF PROTO=TCP SPT=46480 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:03 raspberrypi3 kernel: [ 5873.687566] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=13763 DF PROTO=TCP SPT=45978 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:03 raspberrypi3 kernel: [ 5873.688531] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=9235 DF PROTO=TCP SPT=41990 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:03 raspberrypi3 kernel: [ 5873.689503] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=34532 DF PROTO=TCP SPT=41986 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:04 raspberrypi3 kernel: [ 5874.716008] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=13.88.181.35 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=47871 DF PROTO=TCP SPT=38602 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:04 raspberrypi3 kernel: [ 5875.137806] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=74.125.133.188 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=58177 DF PROTO=TCP SPT=42932 DPT=5228 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.563715] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52867 DF PROTO=TCP SPT=39438 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.568073] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=40176 DF PROTO=TCP SPT=39440 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.568947] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=20053 DF PROTO=TCP SPT=39444 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.572248] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=11504 DF PROTO=TCP SPT=39442 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.573279] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=3044 DF PROTO=TCP SPT=39446 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.768760] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=43356 DF PROTO=TCP SPT=46480 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.769634] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=34533 DF PROTO=TCP SPT=41986 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.770598] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=13764 DF PROTO=TCP SPT=45978 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:05 raspberrypi3 kernel: [ 5875.771629] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=9236 DF PROTO=TCP SPT=41990 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:07 raspberrypi3 kernel: [ 5877.525146] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.184.234 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52990 DF PROTO=TCP SPT=43630 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:07 raspberrypi3 kernel: [ 5878.069194] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=1014 DF PROTO=TCP SPT=38002 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:08 raspberrypi3 kernel: [ 5878.527838] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.184.234 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52991 DF PROTO=TCP SPT=43630 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:08 raspberrypi3 kernel: [ 5878.536923] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.16.249.249 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=54092 DF PROTO=TCP SPT=40246 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:08 raspberrypi3 kernel: [ 5879.091612] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=1015 DF PROTO=TCP SPT=38002 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:09 raspberrypi3 kernel: [ 5879.554781] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.16.249.249 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=54093 DF PROTO=TCP SPT=40246 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:09 raspberrypi3 kernel: [ 5879.838138] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=9237 DF PROTO=TCP SPT=41990 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:09 raspberrypi3 kernel: [ 5879.838990] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=13765 DF PROTO=TCP SPT=45978 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:09 raspberrypi3 kernel: [ 5879.840049] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=43357 DF PROTO=TCP SPT=46480 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:09 raspberrypi3 kernel: [ 5879.841065] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=34534 DF PROTO=TCP SPT=41986 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:10 raspberrypi3 kernel: [ 5880.698812] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.184.234 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52992 DF PROTO=TCP SPT=43630 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:10 raspberrypi3 kernel: [ 5881.102400] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=1016 DF PROTO=TCP SPT=38002 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:11 raspberrypi3 kernel: [ 5881.753071] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.16.249.249 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=54094 DF PROTO=TCP SPT=40246 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:12 raspberrypi3 kernel: [ 5883.123403] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=13.88.181.35 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=47872 DF PROTO=TCP SPT=38602 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:12 raspberrypi3 kernel: [ 5883.261029] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=74.125.133.188 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=58178 DF PROTO=TCP SPT=42932 DPT=5228 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:13 raspberrypi3 kernel: [ 5883.722738] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=35533 DF PROTO=TCP SPT=42000 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:13 raspberrypi3 kernel: [ 5883.738709] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=27653 DF PROTO=TCP SPT=42002 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:13 raspberrypi3 kernel: [ 5883.741095] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=2515 DF PROTO=TCP SPT=45990 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:14 raspberrypi3 kernel: [ 5884.720799] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=35534 DF PROTO=TCP SPT=42000 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:14 raspberrypi3 kernel: [ 5884.725829] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.184.234 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=52993 DF PROTO=TCP SPT=43630 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:14 raspberrypi3 kernel: [ 5884.753997] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.227 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=27654 DF PROTO=TCP SPT=42002 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:14 raspberrypi3 kernel: [ 5884.754984] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=142.250.185.100 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=2516 DF PROTO=TCP SPT=45990 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:14 raspberrypi3 kernel: [ 5885.153808] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.121.132.79 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=1017 DF PROTO=TCP SPT=38002 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
May 12 20:40:15 raspberrypi3 kernel: [ 5885.800861] MYDROP:IN=wlan0 OUT=tun0 MAC=b8:27:eb:54:0e:af:de:3f:ec:63:00:01:08:00 SRC=192.168.222.114 DST=104.16.249.249 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=54095 DF PROTO=TCP SPT=40246 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0

Gruß
Ainadilion
 
MYDROP:IN=wlan0 OUT=tun0

Dahin wollen wir natürlich nicht
Wir brauchen
MYDROP:IN=wlan0 OUT=wwan0
Schalte für den Test dein VPN ab und versuche es nocheinmal
 
OP
A

Ainadilion

Newbie
Hallo, jetzt stehe ich auf dem Schlauch, habe versucht nach Ausschalten des VPN die Befehle auszuführen, bekomme aber keine Ausgabe mehr.

Code:
# iptables -N mydrop
# iptables -A mydrop -j LOG --log-level 4 --log-prefix "MYDROP:"
# iptables -A mydrop -j DROP

# iptables -A FORWARD -m state --state INVALID -j mydrop
# iptables -A FORWARD -i wwan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i wlan0 -o wwan0 -s 192.168.222.0/24 -j ACCEPT
# iptables -A FORWARD -j mydrop

# iptables -A POSTROUTING -t nat -o wwan0 -s 192.168.222.0/24 -j MASQUERADE

Gruß
Ainadilion
 
OP
A

Ainadilion

Newbie
Hallo,

nachdem ich die VPN-Verbindung deaktiviert und die Befehle per Hand ausgeführt habe, klappte die Verbindung von WLAN-Geräten ins Internet. Derzeit wird die VPN-Verbindung beim Start des Raspi gemeinsam mit der Mobilfunkverbindung automatisch beim Start aktiviert (im Rahmen des NetworkManagers). Wie kann ich die obige Befehlskette vor Etablierung der VPN-Verbindung beim Start umsetzen?

Gruß
Ainadilion
 
Ainadilion schrieb:
.. nachdem ich die VPN-Verbindung deaktiviert und die Befehle per Hand ausgeführt habe, klappte die Verbindung von WLAN-Geräten ins Internet...
Das ist ja schon ein erfreulicher Fortschritt.
.
Ainadilion schrieb:
Derzeit wird die VPN-Verbindung beim Start des Raspi gemeinsam mit der Mobilfunkverbindung automatisch beim Start aktiviert (im Rahmen des NetworkManagers). Wie kann ich die obige Befehlskette vor Etablierung der VPN-Verbindung beim Start umsetzen?
1. Du nimmst das VPN außer Betrieb. Deine Netzwerkkonfiguration ist ziemlich speziell. So wie du das VPN konfiguriert hast,
verträgt sich das nicht mit deiner Anforderung.

2. Du schreibst diese "Befehlskette" in ein script und startest dieses script im Startup NACHDEM alle devices (wlan0,wwan0)
konfiguriert wurden. Wo dieses script eingebaut werden muß, weiß hier sicher jemand, der deine Distribution kennt.

3. Wenn das funktioniert, also alle deine WLAN-Geräte ins Internet können, dann erst fügen wir das VPN hinzu.
Dieses VPN braucht in deinem Fall ein spezielles Routing.

4. Wenn dann auch das VPN funktioniert, braucht es noch ein paar zusätzlicher Befehle in dieser "Befehlskette"

Gruß
Gräfin Klara
 
Oben