Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
userdoc:tt_avahi_mdns [2016/06/18 21:05] abelbeck [mDNS/Bonjour Printer Discovery Example] |
userdoc:tt_avahi_mdns [2016/06/19 07:11] abelbeck [mDNS/Bonjour Printer Discovery Example] |
The following is an example how to use the Avahi mDNS/Bonjour discovery service to make printers available onto a guest network. In this example the guest network is a WiFi network using the Ubiquiti Networks - UniFi product line. | The following is an example how to use the Avahi mDNS/Bonjour discovery service to make printers available onto a guest network. In this example the guest network is a WiFi network using the Ubiquiti Networks - UniFi product line. |
| |
Lets assume your main network is ''192.168.xx.0/24'' on network interface eth1 and on that network you have a printer ''192.168.xx.10'' that advertises its services by Bonjour (this is how all Apple iOS devices discover your printer). | Lets assume your main network is ''192.168.101.0/24'' on network interface ''eth1'' and on that network you have a printer ''192.168.101.10'' that advertises its services by Bonjour (this is how all Apple iOS devices discover a printer). |
| |
Now assume you configure a guest VLAN that is network ''192.168.yy.0/24'' on network virtual interface ''eth1.100'' and devices connect to that network using UniFi access points. Using the UniFi controller (which we assume is at ''192.168.xx.2'') we configure the UniFi guest network to connect to ''VLAN 100'' and enable guest policies with authentication to be done through a UniFi guest portal. | Now assume you configure a guest VLAN that is network ''192.168.102.0/24'' on network virtual interface ''eth1.100'' and devices connect to that network using UniFi access points. Using the UniFi controller (which we assume is at ''192.168.101.2'') we configure the UniFi guest network to connect to ''VLAN 100'' and enable guest policies with authentication to be done through a UniFi guest portal. |
| |
With that environment do the following setup... | With that environment perform the following setup... |
| |
Select the Network Tab in the web interface.\\ | Select the Network Tab in the web interface.\\ |
reflect-filters=_printer._tcp.local,_ipp._tcp.local,_pdl-datastream._tcp.local | reflect-filters=_printer._tcp.local,_ipp._tcp.local,_pdl-datastream._tcp.local |
| |
This tells avahi to only reflect the printing bonjour packets across networks. | This tells avahi to only reflect the printing mDNS/Bonjour packets across networks. |
| |
Save this file and now go to the Firewall settings in the AstLinux Network tab and add the following as "Pass LAN->LAN" rules. | Save this file and now go to the Network tab -> Firewall Configuration sub-tab and add the following as "Pass LAN->LAN" rules. |
| |
Action: Pass LAN->LAN | Protocol: TCP | Source: 192.168.yy.0/24 | Destination: 192.168.xx.10 | Port: 515,631,9100 | Action: Pass LAN->LAN | Protocol: TCP | Source: 192.168.102.0/24 | Destination: 192.168.101.10 | Port: 515,631,9100 |
Action: Pass LAN->LAN | Protocol: TCP | Source: 192.168.yy.0/24 | Destination: 192.168.xx.2 | Port: 8880,8843 | Action: Pass LAN->LAN | Protocol: TCP | Source: 192.168.102.0/24 | Destination: 192.168.101.2 | Port: 8880,8843 |
| |
The first rule corresponds to the printer protocols that we are publishing across the LANs and allows any device on the guest LAN to connect to our printer on our main network. The second rule enables guest devices to access the UniFi controller on the ports it uses for the guest portal so guests can authenticate. | The first rule corresponds to the printer protocols that we are publishing across the LANs and allows any device on the guest LAN to connect to our printer on our main network. The second rule enables guest devices to access the UniFi controller on the ports it uses for the guest portal so guests can authenticate. |