Enable appleshare and sample iptables syntax
Install netatalk if it is not installed already:
apt-get install netatalk [Debian-based] or
yum install netatalk [Redhat-based]
service netatalk start
The following syntax will enable appleshare over IP (linux only)
iptables -A INPUT -i eno1 -p tcp --dport 548 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eno1 -p tcp --sport 548 -m state --state ESTABLISHED -j ACCEPT