ich erstelle mir derzeit einen Router bzw. Access Point aus einem SBC.
Ich hoffe ich das ich später noch etwas ähnliches wie pihole auch für Debian finde.
Mein Ziel ist es am Ende einige Dinge zu loggen und/oder einzustellen.
Ziel 1:
Internet <=> eth0 <=> SBC <=> dhcp server <=> wlan0 & 1
Zunächst habe ich einen SBC mit Debian Minimal installiert.
Per Kabel habe ich eth0 mit der FritzBox verbunden und wie folgt konfiguriert:
Code: Alles auswählen
auto eth0
iface eth0 inet static
address 192.168.178.2
netmask 255.255.255.0
gateway 192.168.178.1
dns-servers 192.168.178.1
Code: Alles auswählen
allow-hotplug wlan1
iface wlan1 inet static
address 20.10.0.1
netmask 255.255.255.0
allow-hotplug wlan0
iface wlan0 inet static
address 20.10.0.2
netmask 255.255.255.0
hostapd.conf
Code: Alles auswählen
interface=wlan0
#driver=nl80211
ssid=TESTAP
hw_mode=g
channel=3
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
country_code=DE
#ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
#macaddr_acl=0
#ignore_broadcast_ssid=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=TESTSECRET
hostapd1.conf
Code: Alles auswählen
interface=wlan1
#driver=nl80211
ssid=TESTAP
hw_mode=g
channel=3
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
country_code=DE
#ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
#macaddr_acl=0
#ignore_broadcast_ssid=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=TESTSECRET
Code: Alles auswählen
interface=wlan0, wlan1
no-dhcp-interface=eth0
dhcp-range=20.10.0.100,20.10.0.200,255.255.255.0,168h
dhcp-option=option:dns-server,20.10.0.1
dhcp-option=3,20.10.0.1
192.168.178.2
und ich kann ihn anpingen und per ssh connecten. wlan0 und 1 ist ebenfalls ist AP eingerichtet und ich kann mit mit dem WLAN verbinden und die Clients bekommen eine IP Adresse zugewiesen. Jedoch hatten die Clients keinen Internetzugriff.
Ich habe die IPv4 weiterleitung aktiviert und mittels
Code: Alles auswählen
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Da ich beide APs immer gemeinsam laufen hatte und.. an meinem System alles klappte musste ich nun feststellen das nur die Clients Internetzugriff haben die über wlan1 verbunden sind, jedoch nicht die die über wlan0 verbunden sind.
Die Clients lassen sich untereinander anpingen, jedoch haben die die über wlan1 Connecteten Clients Internet.
Weiss jemand wie ich das beheben kann und woran das liegen könnte?
Hier noch ein paar infos:
Code: Alles auswählen
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 eth0
20.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan1
20.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Alles auswählen
ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.2 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::ba27:ebff:fed6:c353 prefixlen 64 scopeid 0x20<link>
inet6 2003:cb:5f2d:1600:ba27:ebff:fed6:c353 prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:d6:c3:53 txqueuelen 1000 (Ethernet)
RX packets 221515 bytes 285278347 (272.0 MiB)
RX errors 0 dropped 6290 overruns 0 frame 0
TX packets 138066 bytes 17186877 (16.3 MiB)
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 (Local Loopback)
RX packets 422 bytes 40137 (39.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 422 bytes 40137 (39.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 20.10.0.2 netmask 255.255.255.0 broadcast 20.10.0.255
inet6 fe80::abe:acff:fe03:2af5 prefixlen 64 scopeid 0x20<link>
ether 08:be:ac:03:2a:f5 txqueuelen 1000 (Ethernet)
RX packets 580 bytes 57355 (56.0 KiB)
RX errors 0 dropped 9 overruns 0 frame 0
TX packets 321 bytes 48968 (47.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 20.10.0.1 netmask 255.255.255.0 broadcast 20.10.0.255
inet6 fe80::ba27:ebff:fe83:9606 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:83:96:06 txqueuelen 1000 (Ethernet)
RX packets 136785 bytes 15026226 (14.3 MiB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 211678 bytes 289605628 (276.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0