Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change the afp port

I would like to change the port that AFP listens to on my mini server. I have another AFP server that my gateway is already forwarding port 548 to but would like to also access this one from outside the LAN. I know that certain routers/firewalls will allow you to forward a different port # to port 548 on to various private ip addresses but, alas, this little netgear doesn't provide that option. If anyone knows how to do this, I would be most appreciative.

Mini Server, Mac OS X (10.6.7)

Posted on Apr 1, 2011 3:07 PM

Reply
Question marked as Best reply

Posted on Apr 1, 2011 4:43 PM

Like most services, afpd is controlled by launched which responds to incoming network requests.

I haven't tried it, but it should be as simple as editing /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist and editing the <Sockets> section to list the port you want:

<key>Listener</key>
<dict>
<key>Bonjour</key>
<true/>
<key>SockServiceName</key>
<string> afpovertcp</string>
</dict>


afpovertcp is the service name associated with AFP (namely port 548). Replace this with a different port number (or service name) as appropriate. You'll need to restart the service in order for the change to take effect.
Note that there are other caveats - I don't know, for example, whether other services that rely on AFP will continue to work - for example, it's possible that Server Admin may not be able to monitor the service, but I haven't tried this to check.
2 replies
Question marked as Best reply

Apr 1, 2011 4:43 PM in response to oscarthedog

Like most services, afpd is controlled by launched which responds to incoming network requests.

I haven't tried it, but it should be as simple as editing /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist and editing the <Sockets> section to list the port you want:

<key>Listener</key>
<dict>
<key>Bonjour</key>
<true/>
<key>SockServiceName</key>
<string> afpovertcp</string>
</dict>


afpovertcp is the service name associated with AFP (namely port 548). Replace this with a different port number (or service name) as appropriate. You'll need to restart the service in order for the change to take effect.
Note that there are other caveats - I don't know, for example, whether other services that rely on AFP will continue to work - for example, it's possible that Server Admin may not be able to monitor the service, but I haven't tried this to check.

Change the afp port

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.