Servus,
folgende Config:
Rpi 4 mit Deb Buster (nennen wir Ihne raspb)
Apache2 auf Port 80
RaspAp mit Hotspot (lighttpd auf Port 81 gestellt, damit Apache2 auf Port 80 lauscht)
NoDogSplash Portal
DoNetCore App auf Port 5000 als Service
Ich will: Online oder auch Offline sollen sich WLAN Clients verbinden > Portal kommt > Anmelden > DoNetApp kommt
Der Fehler:
gehe ich lokal von einem am eth0 angeschlossenen Client auf den raspb, sehe ich den index der /var/www vom Samba.
gehe ich vom einem Wlan-Client am RaspAp auf raspb > Portal kommt splash.html> Akzeptieren > Internet funktioniert
aber leider nicht die lokalen seiten, auch auf raspb:81/raspap bekomme ich keine Verbindung
Ich bin jetzt nicht so der Linuxpro und habe folgendes in Verdacht, das es was mit den iptables
zu tun hat, ich habe das geändert, leider ohne Erfolg:
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:80
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:80
sudo iptables -t nat -A PREROUTING -p tcp --dport 81 -j DNAT --to-destination 127.0.0.1:81
sudo iptables -t nat -A PREROUTING -p tcp --dport 5000 -j DNAT --to-destination 127.0.0.1:5000
um den Fehler zu finden, habe ich mal testweise nodogsplash ausgeschaltet:
ndsctl stop
folgendes zeigt der mir:
sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:https to:127.0.0.1:80
DNAT tcp -- anywhere anywhere tcp dpt:http to:127.0.0.1:80
DNAT tcp -- anywhere anywhere tcp dpt:81 to:127.0.0.1:81
DNAT tcp -- anywhere anywhere tcp dpt:5000 to:127.0.0.1:5000
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- 192.168.50.0/24 !192.168.50.0/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Alles anzeigen
nach dem starten von
sudo nodogsplash
sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
ndsOUT all -- anywhere anywhere
DNAT tcp -- anywhere anywhere tcp dpt:https to:127.0.0.1:80
DNAT tcp -- anywhere anywhere tcp dpt:http to:127.0.0.1:80
DNAT tcp -- anywhere anywhere tcp dpt:81 to:127.0.0.1:81
DNAT tcp -- anywhere anywhere tcp dpt:5000 to:127.0.0.1:5000
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- 192.168.50.0/24 !192.168.50.0/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain ndsOUT (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere mark match 0x20000/0x30000
RETURN all -- anywhere anywhere mark match 0x30000/0x30000
DNAT tcp -- anywhere anywhere tcp dpt:http to:10.3.141.1:2050
Alles anzeigen
das sollte ja dann mit nds zu tun haben.
Was ist nötig, damit ich lokal auf den Rpi komme?