[TN#007] Announcing remote Netatalk AFP servers with Avahi
- Author
- Ralph Böhme
- Published on
- November 8, 2011
Let’s assume that we are advertising for a Netatalk server at IP address 192.168.1.100, named “Netatalk-Server”.
First off, let’s create a hosts entry for Avahi in the /etc/avahi/hosts file:
192.168.1.100 Netatalk-Server.local
You’ll always want to use the .local domain for Mac OS X compatibility. Even if you have a FQDN, use .local
Next, we need to create a .service file in /etc/avahi/services named Netatalk-Server.service :
<?xml version=”1.0″ standalone=’no’?>
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name>Netatalk AFP server on XXXXX</name>
<service protocol=”ipv4″>
<type>_afpovertcp._tcp</type>
<port>548</port>
<host-name>Netatalk-Server.local</host-name>
</service>
</service-group>
Restart Avahi, and you’re good to go. In Finder sidebar, you should now see “Netatalk AFP server on XXXXX” automagically.