OpenWRT konfiguriert den Router für die Kommunikation mit GUEST WLAN über Client-LAN-Ports, nicht jedoch über das Master-LAN

561
Klaus F.

Ich habe einen Router mit OpenWRT (WRT54GL) und einer speziellen Konfiguration, die als "Hide WLAN Clients vom Hauptnetzwerk" fungiert. Die tatsächliche Einrichtung ist wie folgt:

 ^ | |WLAN |10.0.0.x | | | Internet +-----------------+ LAN +-------+--------+ <-----------+ Some secret <------------> Router with | | network stuff | 172.x.x.x | OpenWRT | | | | | +-----------------+ +---+---------+--+ | | Config | |LAN 192.168.1.x| |172.x.x.x | | | | v v 

Das 172.xxx-Netzwerk ist ein Hauptnetzwerk (z. B. Firma, Hotel usw.). Das Netzwerk 192.168.1.x dient nur zur Konfiguration und ist einem LAN-Port zugeordnet. Sie müssen den PC an diesen Port anschließen, um den Router zu konfigurieren (Sicherheitsgründe). Das 10.0.0.x-Netzwerk ist ein GUEST WLAN.

Normalerweise ist das Konfigurieren als GUEST WLAN kein großes Problem. In diesem Fall ist es jedoch etwas Besonderes, weil:

  • Das Hauptnetzwerk befindet sich physisch am WAN-Port, dieser Port ist jedoch so konfiguriert, dass er als LAN-Port fungiert. Das Hauptnetzwerk und das Client-LAN ​​sollten so kommunizieren, als wäre kein Router vorhanden. Der Router verhält sich wie ein dummer Schalter.
  • Das GUEST WLAN sollte Zugang zum Internet und zu anderen Gästen haben, aber nicht zum Hauptnetz und zur Konfiguration.
  • Die GUEST WLAN- und Client-LAN-Geräte sollten miteinander kommunizieren.

Was ich bisher gemacht / erreicht habe: Die ersten beiden Punkte sind erledigt. Deshalb habe ich den WAN-Port als LAN-Port konfiguriert. Im Schaltermenü habe ich drei VLANs erstellt. Einer für die Client-LAN-Ports, einer für den Haupt-LAN-Port und einer für den Konfigurations-LAN-Port.

Die VLANS für Client- und Haupt-LAN ​​werden an die Schnittstelle gebrückt

Das Gast-WLAN ist wie ein normales WLAN-Netzwerk konfiguriert.

Das Konfigurations-LAN ist eine separate Schnittstelle, die nur das Konfigurations-VLAN verwendet.

Um mit dem Internet zu kommunizieren, habe ich eine Firewall-Regel hinzugefügt, sodass sich das LAN-Netzwerk in der WAN-Gruppe befindet (da es sich um einen Switch handelt und gleichzeitig auch die Internetquelle ist) und die GUEST / CONFIG-Schnittstelle an das WAN weitergeleitet wird.

** Einige Konfigurationsdateien: **

/ etc / config / wireless

config 'wifi-device' 'wl0' option 'type' 'broadcom' option 'channel' 'auto' option 'txpower' '18' option 'hwmode' '11bg'  config 'wifi-iface' option 'device' 'wl0' option 'mode' 'ap' option 'ssid' 'GRZUTS01' option 'encryption' 'psk+psk2' option 'key' '********' 

/ etc / config / network

config 'switch' 'eth0' option 'enable' '1'  config 'switch_vlan' 'eth0_0' option 'device' 'eth0' option 'vlan' '0' option 'ports' '1 2 3 5'  config 'switch_vlan' 'eth0_1' option 'device' 'eth0' option 'vlan' '1' option 'ports' '4 5'  config 'interface' 'loopback' option 'ifname' 'lo' option 'proto' 'static' option 'ipaddr' '127.0.0.1' option 'netmask' '255.0.0.0'  config 'switch_vlan' option 'device' 'eth0' option 'vlan' '2' option 'ports' '0 5'  config 'interface' 'Config' option 'proto' 'static' option 'ifname' 'eth0.2' option 'ipaddr' '192.168.1.1' option 'netmask' '255.255.255.0'  config 'interface' 'Company' option 'type' 'bridge' option 'proto' 'dhcp' option 'ifname' 'eth0.0 eth0.1'  config 'interface' 'Public' option 'proto' 'static' option 'ifname' 'wl0' option 'ipaddr' '10.0.0.1' option 'netmask' '255.255.255.0' 

/ etc / config / dhcp

config 'dnsmasq' option 'domainneeded' '1' option 'boguspriv' '1' option 'localise_queries' '1' option 'rebind_protection' '1' option 'rebind_localhost' '1' option 'local' '/lan/' option 'domain' 'lan' option 'expandhosts' '1' option 'readethers' '1' option 'leasefile' '/tmp/dhcp.leases' option 'resolvfile' '/tmp/resolv.conf.auto'  config 'dhcp' 'lan' option 'interface' 'lan' option 'ignore' '1'  config 'dhcp' 'wan' option 'interface' 'wan' option 'ignore' '1'  config 'dhcp' option 'start' '100' option 'limit' '150' option 'interface' 'Public' option 'leasetime' '72h'  config 'dhcp' option 'start' '100' option 'interface' 'Config' option 'limit' '10' option 'leasetime' '2h' 

/ etc / config / firewall

config 'defaults' option 'syn_flood' '1' option 'input' 'ACCEPT' option 'output' 'ACCEPT' option 'forward' 'REJECT' option 'drop_invalid' '1'  config 'include' option 'path' '/etc/firewall.user'  config 'zone' option 'forward' 'REJECT' option 'output' 'ACCEPT' option 'name' 'GUEST' option 'input' 'REJECT' option 'network' 'Public'  config 'zone' option 'forward' 'REJECT' option 'output' 'ACCEPT' option 'name' 'WAN' option 'input' 'REJECT' option 'masq' '1' option 'mtu_fix' '1' option 'network' 'Company'  config 'forwarding' option 'dest' 'WAN' option 'src' 'GUEST'  config 'rule' option 'target' 'ACCEPT' option '_name' 'Guest DNS' option 'src' 'GUEST' option 'proto' 'tcpudp' option 'dest_port' '53'  config 'rule' option 'target' 'ACCEPT' option '_name' 'Guest DHCP' option 'src' 'GUEST' option 'proto' 'tcpudp' option 'dest_port' '67-68'  config 'zone' option 'forward' 'REJECT' option 'output' 'ACCEPT' option 'name' 'CONFIG' option 'network' 'Config' option 'input' 'ACCEPT'  config 'forwarding' option 'dest' 'WAN' option 'src' 'CONFIG'  config 'rule' option 'target' 'ACCEPT' option '_name' 'Config DNS' option 'src' 'CONFIG' option 'proto' 'tcpudp' option 'dest_port' '53'  config 'rule' option 'target' 'ACCEPT' option '_name' 'Config DHCP' option 'src' 'CONFIG' option 'proto' 'tcpudp' option 'dest_port' '67-68' 

Nun meine Frage:

Wie kann ich das Setup so ändern, dass die WLAN-Clients auf die LAN-Clients zugreifen können + die LAN-Clients auf die WLAN-Clients zugreifen können? Aber der LAN-Master-Port kann nicht auf die WLAN-Clients zugreifen?

0

0 Antworten auf die Frage