sharbich
Goto Top

Problem mit Bonjour (mDNS) im VPN

Hallo Ihr Lieben,

wenn ich mich mit meinen Samsung Smartphone im VPN Netz befinde bekomme ich nicht mein Netzwerkdrucker angezeigt. Im WLAN schon. Wie sieht mein netz aus?

2020_01_03_netztopologie

Mein OpenVPN Server läuft auf ein Debian Buster Server. Der Dienst wird an der IP-Adresse 192.168.190.2, VLAN 110 bereitgestellt. Alle OpenVPN Verbidungen werden über TAP hergestellt. Über TUN habe ich es noch nicht hinbekommen, weil ich die IP-Adressen zentral vergeben möchte und Unicast / Multicast ins VPN sende um IPTV zu sehen.
Folgende Dienste werden mir im VPN Netz auf dem Debian Server angezeigt. Unter anderem mein Netzwerkdrucker den ich gerne für alle meine benutzten Endgeräte (IOS, Android, WIN10, Linux) verfügbar haben möchte:
root@dsme01:~# avahi-browse -at
+ bond0.110 IPv6 f8:ff:c2:ad:5b:4f@fe80::faff:c2ff:fead:5b4f   _apple-mobdev2._tcp  local
+ bond0.110 IPv4 f8:ff:c2:ad:5b:4f@fe80::faff:c2ff:fead:5b4f   _apple-mobdev2._tcp  local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ bond0.110 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ bond0.110 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ bond0.110 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ bond0.110 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ bond0.110 IPv4 openhab-ssl (4)                               _openhab-server-ssl._tcp local
+ bond0.110 IPv4 openhab-ssl (3)                               _openhab-server-ssl._tcp local
+ bond0.110 IPv4 openhab (4)                                   _openhab-server._tcp local
+ bond0.110 IPv4 openhab (3)                                   _openhab-server._tcp local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ bond0.110 IPv6 CUPS @ cups                                   _http._tcp           local
+ bond0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ bond0.110 IPv4 CUPS @ cups                                   _http._tcp           local
+ bond0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
root@dsme01:~# netstat -tulpen | grep 1194
Die Route auf dem Debian Server:
root@dsme01:~# route
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
default         192.168.20.1    0.0.0.0         UG    0      0        0 bond0
192.168.20.0    0.0.0.0         255.255.255.0   U     0      0        0 bond0
192.168.110.0   0.0.0.0         255.255.255.0   U     0      0        0 bond0.110
192.168.120.0   0.0.0.0         255.255.255.0   U     0      0        0 bond0.120
192.168.130.0   0.0.0.0         255.255.255.0   U     0      0        0 bond0.130
192.168.140.0   0.0.0.0         255.255.255.0   U     0      0        0 bond0.140
192.168.150.0   0.0.0.0         255.255.255.0   U     0      0        0 bond0.150
192.168.190.0   0.0.0.0         255.255.255.0   U     0      0        0 br0
Und noch die Interface Informationen meines Debian Server
root@dsme01:~# ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.20.20  netmask 255.255.255.0  broadcast 192.168.20.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 13700176  bytes 12664829409 (11.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8488361  bytes 4415075261 (4.1 GiB)
        TX errors 0  dropped 34 overruns 0  carrier 0  collisions 0

bond0.10: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 3686774  bytes 3214302672 (2.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 648921  bytes 239498011 (228.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.110: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.110.20  netmask 255.255.255.0  broadcast 192.168.110.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 161819  bytes 54641415 (52.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 82861  bytes 15750403 (15.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.120: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.120.20  netmask 255.255.255.0  broadcast 192.168.120.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 172939  bytes 26650764 (25.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 80845  bytes 13832112 (13.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.130: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.130.20  netmask 255.255.255.0  broadcast 192.168.130.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 149728  bytes 13021043 (12.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 75293  bytes 13623216 (12.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.140: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.140.20  netmask 255.255.255.0  broadcast 192.168.140.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 902349  bytes 172958466 (164.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 391263  bytes 86492364 (82.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.150: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.150.20  netmask 255.255.255.0  broadcast 192.168.150.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 150466  bytes 13061858 (12.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 75295  bytes 13623897 (12.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.190.2  netmask 255.255.255.0  broadcast 192.168.190.255
        inet6 fe80::225:90ff:fed6:60c7  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 1519586  bytes 336341816 (320.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 154067  bytes 23711631 (22.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 12147175  bytes 12133525505 (11.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 689488  bytes 106382166 (101.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xdfb00000-dfb20000  

eth2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:25:90:d6:60:c7  txqueuelen 1000  (Ethernet)
        RX packets 1553001  bytes 531303904 (506.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7798873  bytes 4308693095 (4.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdf900000-df920000  

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 1  (Lokale Schleife)
        RX packets 10900082  bytes 57948346150 (53.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10900082  bytes 57948346150 (53.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::5c5a:baff:fedd:e1bf  prefixlen 64  scopeid 0x20<link>
        ether 5e:5a:ba:dd:e1:bf  txqueuelen 100  (Ethernet)
        RX packets 1396  bytes 219159 (214.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10133  bytes 2304100 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Auf meinen zentralen Router habe ich folgendes Programm installiert um Drucker in verschiedenen Netzsegemente bekannt zu machen:
avahi-utils
Meine avahi-daemon.conf ist wie folgt konfiguriert:
root@rome01:~# cat /etc/avahi/avahi-daemon.conf 
[server]
host-name=rome01
#host-name=foo
domain-name=local
use-ipv4=yes
#use-ipv6=no
## use-ipv6=yes
allow-interfaces=eth0.110,br-wlan,eth0.10
## check-response-ttl=no
## use-iff-running=no
## enable-dbus=no

[publish]
#publish-addresses=yes
#publish-hinfo=yes
#publish-workstation=yes
#publish-workstation=no
#publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes

[reflector]
enable-reflector=yes
## enable-reflector=no
#reflect-ipv=no

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=4194304
#rlimit-fsize=0
#rlimit-nofile=30
#rlimit-stack=4194304
#rlimit-nproc=3
Ein avahi-brows -at zeigt mir folgende Ergebnisse:
root@rome01:~# avahi-browse -at
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ eth0.10 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ eth0.10 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ eth0.10 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ eth0.10 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ eth0.110 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ eth0.110 IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ eth0.110 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ eth0.110 IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ br-wlan IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ br-wlan IPv6 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ br-wlan IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups _ipp._tcp            local
+ br-wlan IPv4 AirPrint HP_Color_LaserJet_CM1312nfi_MFP @ cups _ipp._tcp            local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipp._tcp            local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipp._tcp            local
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _ipps._tcp           local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _ipps._tcp           local
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ eth0.10 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ eth0.10 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ eth0.110 IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ eth0.110 IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ br-wlan IPv6 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP_fax @ cups    _printer._tcp        local
+ br-wlan IPv4 HP_Color_LaserJet_CM1312nfi_MFP @ cups        _printer._tcp        local
+ eth0.10 IPv6 CUPS @ cups                                   _http._tcp           local
+ eth0.10 IPv4 CUPS @ cups                                   _http._tcp           local
+ eth0.110 IPv6 CUPS @ cups                                   _http._tcp           local
+ eth0.110 IPv4 CUPS @ cups                                   _http._tcp           local
+ br-wlan IPv6 CUPS @ cups                                   _http._tcp           local
+ br-wlan IPv4 CUPS @ cups                                   _http._tcp           local
+ eth0.10 IPv4 openhab (4)                                   _openhab-server._tcp local
+ eth0.10 IPv4 openhab (3)                                   _openhab-server._tcp local
+ eth0.110 IPv4 openhab (4)                                   _openhab-server._tcp local
+ eth0.110 IPv4 openhab (3)                                   _openhab-server._tcp local
+ br-wlan IPv4 openhab (4)                                   _openhab-server._tcp local
+ br-wlan IPv4 openhab (3)                                   _openhab-server._tcp local
+ eth0.10 IPv4 openhab-ssl (4)                               _openhab-server-ssl._tcp local
+ eth0.10 IPv4 openhab-ssl (3)                               _openhab-server-ssl._tcp local
+ eth0.110 IPv4 openhab-ssl (4)                               _openhab-server-ssl._tcp local
+ eth0.110 IPv4 openhab-ssl (3)                               _openhab-server-ssl._tcp local
+ br-wlan IPv4 openhab-ssl (4)                               _openhab-server-ssl._tcp local
+ br-wlan IPv4 openhab-ssl (3)                               _openhab-server-ssl._tcp local
Auf der OpenWRT Firewall habe ich für die Zone OpenVPN folgendes eingestellt:
root@rome01:~# cat /etc/config/firewall
config zone
	option name 'openvpn'  
	option output 'ACCEPT'  
	option network 'openvpn'  
	option log '1'  
	option input 'REJECT'  
	option forward 'REJECT'  

config rule
	option target 'ACCEPT'  
	option src 'openvpn'  
	option proto 'udp'  
	option dest_port '5353'  
	option name 'Allow-OpenVPN-mDNS-Server'  
	option src_ip '192.168.190.1'  
	option dest_ip '224.0.0.251'  

config rule
	option target 'ACCEPT'  
	option src 'openvpn'  
	option name 'Allow-OpenVPN-mDNS-Clients'  
	option proto 'udp'  
	option src_port '5353'  
	option dest_port '5353'  
Mein VPN Client Pro App auf mein Samsung Phone hat folgende Netzwerk Informationen:
IPv4 tun address:
192.168.190.65/24

IPv4 tun routes:
192.168.20.0/24 via 192.168.190.2
192.168.190.0/24
0.0.0.0/1 via 192.168.190.1
128.0.0.0/1 via 192.168.190.1

DNS server:
192.168.20.20

DNS suffixes:
intern.example.com
Leider sehe ich auf mein Samsung Phone keine Netzwerkdrucker. Stimmt was am Regelwerk der Firewall nicht, oder an der avahi-daemon.conf? Findet Ihr den Fehler? Ein tcpdump kann ich Euch leider nicht zur Verfügung stellen, weil im aktuellen Build ich das Programm nicht gebildet bekomme. Da scheint es ein Bug zu geben.

Lieben Gruß von Stefan Harbich
2020_01_03_netztopologie

Content-Key: 533589

Url: https://administrator.de/contentid/533589

Printed on: May 10, 2024 at 08:05 o'clock

Member: aqui
aqui Jan 10, 2020 updated at 13:45:03 (UTC)
Goto Top
Tolle Netzwerk Skizze ! Womit ist das gemacht ?
Alle OpenVPN Verbidungen werden über TAP hergestellt. Über TUN habe ich es noch nicht hinbekommen
Nicht dein Ernst, oder ?? Du machst Layer 2 Bridging im OpenVPN Tunnel ?? Wie gruselig !
Selbst OpenVPN rät in seinen Design Empfehlungen dringenst davon ab, denn es transportiert den gesamten Broad- und Multicast Traffic aller per TAP angeschlossenen Tunnel was die VPN Performance natürlich auf Grasnarben Niveau bringt.
TUN ist der millionenfache Standard. Wieso du das nicht hinbekommst ist völlig unverständlich. Ein simpler Klassiker wie du hier an einer einfachen Raspberry Pi Konfig sehen kannst:
Clientverbindung OpenVPN Mikrotik
Sehr wahrscheinlich hast du den typischen Anfängerfehler begangen und das Routing der VPN Netze vergessen oder falsch gemacht bei einem OVPN Server im internen Netz ?!
OpenVPN Server installieren auf pfSense Firewall, Mikrotik. DD-WRT oder GL.inet Router
(2tes und 3tes Bild)
Aber auch hier:
Problem mit site 2 site VPN
Drucken über VPN - CCD Files
Obwohl man das bei dem semiprofessionellen Design deines Netzes fast nicht glauben kann.
Das solltest du auf Dauer aber dringend fixen und auf Routing umstellen wenn dein Netzwerk und VPN performant und skalierbar bleiben soll !
und Unicast / Multicast ins VPN sende um IPTV zu sehen.
Deshalb das TAP Interface. OK, letztlich aber auch falsch, denn IPTV Multicast kannst du über PIM auch immer über ein geroutetes IP Netz problemlos übertragen. IGMP Snooping ist dann ebenso Pflicht im Netz...
Aber mal zurück zur eigentlichen Thread Thematik:

mDNS nutzt bekanntlich eine Multicast Link Local Adresse 224.0.0.251 (https://de.wikipedia.org/wiki/Zeroconf#Multicast_DNS)
Diese Adressen sind intern festgenagelt auf einen TTL von 1 sind also in segmentierten IP Netzen, wie deinen, generell nicht routebar. Auch nicht mit PIM Multicast Routing, da sie durch die festgenagelte TTL eben keine Router Hops überwinden können. Sie funktionieren also rein nur in einem flachen Layer 2 Netz.
Die Kardinalsfrage ist nun also welches des lokalen LAN oder VLAN Segmente du über das TAP Interface im OVPN zusammen bridgest ?? Denn nur dort kann mDNS (Bonjour) funktionieren. Nicht aber in den gerouteten anderen VLANs.
Hast du das auf dem Radar ?
Wenn Drucker und (Samsung) Client also in separaten und damit gerouteten IP Netzen sind dann brauchst du im Client Netz einen separaten AVAHI Daemon der dort die Ziel IP des Druckers im Client Segment per Multicast verteilt.
Netzwerk Management Server mit Raspberry Pi
Stimmt was am Regelwerk der Firewall nicht
Vermutlich nicht, denn auf den rein internen Interfaces die nur lokale interne Netze verbinden macht man ja niemals weder NAT noch Firewalling. In sofern kann es das normal nicht sein.
Ein tcpdump kann ich Euch leider nicht zur Verfügung stellen, weil im aktuellen Build ich das Programm nicht gebildet bekomme.
Muss auch nicht sein denn ein apt install tcpdump installiert dir das bequem aus dem Repository. face-wink
Wäre hilfreich zu sehen ob die mDNS Multicasts am anderen Ende des gebridgten Netzes auch ankommen. Wie gesagt es funktioniert ohne separaten AVAHI Daemon rein nur in gebridgten Umgebungen wegen der Link Local MC Adresse.
Member: sharbich
sharbich Jan 10, 2020 at 16:06:33 (UTC)
Goto Top
Tolle Netzwerk Skizze ! Womit ist das gemacht ?
Mit Libre Office Draw
Alle OpenVPN Verbidungen werden über TAP hergestellt. Über TUN habe ich es noch nicht hinbekommen
Ich hatte es am Anfang über TUN am laufen. Das Routing hab ich auch hinbekommen. Ich bin immer an zwei Themen gescheitert.
1. Der OpenVPN Client (z.B. mein Android Smartphone) konnte per VLC kein IPTV schauen
2. Die IP Adresse Vergabe auf der OpenVPN Client Seite sollte auch über meinen zentralen DNS Server erfolgen.
Das konnte ich nur mit TAP realisieren.
Ich wäre aber gerne bereit das nochmal zu versuchen.
mDNS nutzt bekanntlich eine Multicast Link Local Adresse 224.0.0.251 (https://de.wikipedia.org/wiki/Zeroconf#Multicast_DNS)
Diese Adressen sind intern festgenagelt auf einen TTL von 1 sind also in segmentierten IP Netzen, wie deinen, generell nicht routebar. Auch nicht mit PIM Multicast Routing, da sie durch die festgenagelte TTL eben keine Router Hops überwinden können. Sie funktionieren also rein nur in einem flachen Layer 2 Netz.
Ist mit vollkommen klar. Deshalb läuft auf dem zentralen Router ja auch avahi-daemon. Die Konfiguration hatte ich ja mit gesendet.
Die Kardinalsfrage ist nun also welches des lokalen LAN oder VLAN Segmente du über das TAP Interface im OVPN zusammen bridgest??
Die Bridge besteht aus tap0 und eth0.10
root@dsme01:~# cat /etc/openvpn/server/up.sh 
#!/bin/bash
#################################
# Set up Ethernet bridge on Linux
# Requires: bridge-utils
#################################
# Define Bridge Interface
br="br0"  
# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2". 
tap="tap0"  
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="bond0.10"  
eth_ip="192.168.190.2"  
eth_netmask="255.255.255.0"  
## eth_gateway="192.168.190.1" 
eth_broadcast="192.168.190.255"  
for t in $tap; do
    openvpn --mktun --dev $t
done
brctl addbr $br
brctl addif $br $eth
for t in $tap; do
    brctl addif $br $t
done
for t in $tap; do
    ifconfig $t 0.0.0.0 promisc up
done
ifconfig $eth 0.0.0.0 promisc up
ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast
Denn nur dort kann mDNS (Bonjour) funktionieren. Nicht aber in den gerouteten anderen VLANs.
Hast du das auf dem Radar?
Ja, deshalb habe ich ja auf den zentralen Router ein avahi-daemon am rennen um in jeden Netz die Dienste bekannt zu machen.
Wenn Drucker und (Samsung) Client also in separaten und damit gerouteten IP Netzen sind dann brauchst du im Client Netz einen separaten AVAHI Daemon der dort die Ziel IP des Druckers im Client Segment per Multicast verteilt.
Siehe oben, dort habe ich angeführt das ich einen solchen Daemon in Betrieb habe.
Stimmt was am Regelwerk der Firewall nicht
Vermutlich nicht, denn auf den rein internen Interfaces die nur lokale interne Netze verbinden macht man ja niemals weder NAT noch Firewalling.
Oben hatte ich geschrieben das ich auf dem OpenVPN Interface das Regelwerk angepasst habe Eingang = Zurückweisen, Weitergeleitet = Zurückweisen
In sofern kann es das normal nicht sein.
Glaube ich auch nicht. Aber könntest Du mal über das Regelwerk schauen?
Ein tcpdump kann ich Euch leider nicht zur Verfügung stellen, weil im aktuellen Build ich das Programm nicht gebildet bekomme.
Muss auch nicht sein denn ein apt install tcpdump installiert dir das bequem aus dem Repository. face-wink
Wäre hilfreich zu sehen ob die mDNS Multicasts am anderen Ende des gebridgten Netzes auch ankommen. Wie gesagt es funktioniert ohne separaten AVAHI Daemon rein nur in gebridgten Umgebungen wegen der Link Local MC Adresse.
Natürlich habe ich versucht tcpdump via:
opkg install tcpdump
zu installieren. Das funktioniert auch. Allerdings wenn ich dann tcpdump aufrufe bekomme ich folgende Fehlermeldung:
root@rome01:~# tcpdump -i eth2
-ash: tcpdump: not found
root@rome01:~# find / | grep tcpdump
. . . 
/usr/sbin/tcpdump
Sehr komisch, obwohl tcpdump im Verzeichnis /usr/sbin installiert wurde. Warum auch immer??? Also hatte ich es im Build versucht mit folgender Fehlermeldung:
make[3]: Entering directory '/home/stefan.harbich/Downloads/apu/openwrt/package/network/utils/tcpdump'  
touch /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.prepared_35f93ef8b4afcef32f8a5031f1e5cd32_6664517399ebbbc92a37c5bb081b5c53_check
. /home/stefan.harbich/Downloads/apu/openwrt/include/shell.sh; gzip -dc /home/stefan.harbich/Downloads/apu/openwrt/dl/tcpdump-4.9.3.tar.gz | tar -C /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.. -xf - 
[ ! -d ./src/ ] || cp -fpR ./src/. /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3

Applying ./patches/001-remove_pcap_debug.patch using plaintext: 
patching file configure

Applying ./patches/002-remove_static_libpcap_check.patch using plaintext: 
patching file configure

Applying ./patches/100-tcpdump_mini.patch using plaintext: 
patching file Makefile.in
patching file addrtoname.c
patching file print.c
patching file print-ether.c
patching file print-gre.c
patching file print-igmp.c
patching file print-ip6.c
patching file print-ip.c
patching file print-llc.c
patching file print-null.c
patching file print-ppp.c
patching file print-sll.c
patching file print-tcp.c
patching file print-udp.c
touch /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.prepared_35f93ef8b4afcef32f8a5031f1e5cd32_6664517399ebbbc92a37c5bb081b5c53
rm -f /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_*
rm -f /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.tcpdump.full_installed
(cd /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/./; if [ -x ./configure ]; then find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.guess | xargs -r chmod u+w; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.guess | xargs -r -n1 cp --remove-destination /home/stefan.harbich/Downloads/apu/openwrt/scripts/config.guess; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.sub | xargs -r chmod u+w; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.sub | xargs -r -n1 cp --remove-destination /home/stefan.harbich/Downloads/apu/openwrt/scripts/config.sub; AR="x86_64-openwrt-linux-gnu-gcc-ar" AS="x86_64-openwrt-linux-gnu-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections" LD=x86_64-openwrt-linux-gnu-ld NM="x86_64-openwrt-linux-gnu-gcc-nm" CC="x86_64-openwrt-linux-gnu-gcc" GCC="x86_64-openwrt-linux-gnu-gcc" CXX="x86_64-openwrt-linux-gnu-g++" RANLIB="x86_64-openwrt-linux-gnu-gcc-ranlib" STRIP=x86_64-openwrt-linux-gnu-strip OBJCOPY=x86_64-openwrt-linux-gnu-objcopy OBJDUMP=x86_64-openwrt-linux-gnu-objdump SIZE=x86_64-openwrt-linux-gnu-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections " CPPFLAGS="-I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/usr/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/usr/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/include " LDFLAGS="-L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/usr/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/usr/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/lib -znow -zrelro -Wl,--gc-sections "  BUILD_CC="x86_64-openwrt-linux-gnu-gcc" HOSTCC="gcc" td_cv_buggygetaddrinfo="no" ac_cv_linux_vers= ac_cv_header_rpc_rpcent_h=no ac_cv_lib_rpc_main=no ac_cv_path_PCAP_CONFIG=""  ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  --without-cap-ng --without-crypto --enable-ipv6 ; fi; )  
configure: WARNING: unrecognized options: --disable-nls, --enable-ipv6
configure: loading site script /home/stefan.harbich/Downloads/apu/openwrt/include/site/x86_64
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-openwrt-linux-gnu
checking for x86_64-openwrt-linux-gcc... x86_64-openwrt-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-openwrt-linux-gnu-gcc accepts -g... yes
checking for x86_64-openwrt-linux-gnu-gcc option to accept ISO C89... none needed
checking whether the compiler supports the -ffloat-store option... yes
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking whether __attribute__((format)) can be applied to function pointers... yes
checking how to run the C preprocessor... x86_64-openwrt-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/host/bin/grep
checking for egrep... /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/host/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking for rpc/rpcent.h... (cached) no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking smi.h usability... no
checking smi.h presence... no
checking for smi.h... no
checking whether to enable the possibly-buggy SMB printer... no
checking whether to drop root privileges by default... no
checking whether to chroot... no
checking for cap_enter... no
checking for cap_rights_limit... no
checking for cap_ioctls_limit... no
checking for openat... yes
checking whether to sandbox using capsicum... no
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... none required
checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc
checking for vfprintf... yes
checking for strlcat... no
checking for strlcpy... no
checking for strdup... yes
checking for strsep... yes
checking for getopt_long... yes
checking for fork... yes
checking for vfork... yes
checking for strftime... (cached) yes
checking for setlinebuf... yes
checking for alarm... yes
checking for vsnprintf... (cached) yes
checking for snprintf... yes
checking return type of signal handlers... void
checking for sigaction... yes
checking for main in -lrpc... (cached) no
checking for library containing getrpcbynumber... none required
checking for x86_64-openwrt-linux-pcap-config... (cached) no
checking for pcap-config... no
checking for main in -lpcap... no
checking for pcap-config... (cached) no
checking for pcap_loop... no
configure: error: This is a bug, please follow the guidelines in CONTRIBUTING and include the
config.log file in your report.  If you have downloaded libpcap from
tcpdump.org, and built it yourself, please also include the config.log
file from the libpcap source directory, the Makefile from the libpcap
source directory, and the output of the make process for libpcap, as
this could be a problem with the libpcap that was built, and we will
not be able to determine why this is happening, and thus will not be
able to fix it, without that information, as we have not been able to
reproduce this problem ourselves.
Makefile:88: recipe for target '/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_68b329da9893e34099c7d8ad5cb9c940' failed  
make[3]: *** [/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[3]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt/package/network/utils/tcpdump'  
time: package/network/utils/tcpdump/full/compile#8.56#4.51#11.82
package/Makefile:111: recipe for target 'package/network/utils/tcpdump/compile' failed  
make[2]: *** [package/network/utils/tcpdump/compile] Error 2
make[2]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt'  
package/Makefile:107: recipe for target '/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.package_compile' failed  
make[1]: *** [/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt'  
/home/stefan.harbich/Downloads/apu/openwrt/include/toplevel.mk:216: recipe for target 'world' failed  
make: *** [world] Error 2
Aber das ist ein Thema beim OpenWRT Forum. Leider gibt es dazu noch keine Aussage.
Member: aqui
aqui Jan 11, 2020 updated at 19:58:26 (UTC)
Goto Top
Der OpenVPN Client (z.B. mein Android Smartphone) konnte per VLC kein IPTV schauen
Hier steht wie man das selber testen kann mit PIM Routing:
Fehlersuche im lokalem Netzwerk (RSTP, MRP, Multicast)
bzw. hier am Beispiel eines MT Routers:
UPNP mit Mikrotik Routerboard hEX PoE und D-Link DGS-1210-24 Switch
Sehr komisch, obwohl tcpdump im Verzeichnis /usr/sbin installiert wurde. Warum auch immer???
Ruf es mal mit dem kompletten Pfad /usr/sbin/tcpdump -i eth2 auf dann sollte es ganz sicher laufen ! Dir fehlt vermutlich /usr/sbin im Suchpfad ?!
Member: Stefan007
Stefan007 Jun 05, 2021 updated at 16:07:51 (UTC)
Goto Top
@sharbich wie siehts denn mittlerweile aus? Haste es hinbekommen und lässt deine Nachwelt noch teilhaben an deiner Lösung? :D
Member: Stefan007
Stefan007 Apr 15, 2022 at 17:09:38 (UTC)
Goto Top
@sharbich anscheinend nicht ...
Member: aqui
aqui Apr 15, 2022 at 17:33:46 (UTC)
Goto Top
Hier steht wie man es hinbekommt. Zumindestens bei der pfSense/OPNsense:
Apple AirPrint über VLANs
Ansonsten hilft,wie immer, ein kleiner Raspberry Pi (Zero) als mDNS Proxy:
Netzwerk Management Server mit Raspberry Pi