Let start with which version of the OS are your working with? Second you should be looking at Enterprise Extender instead of anynet as it will not be available at V7R1 and after. Anyhow the APPCoverTCPIP port is 397 both TCP and UDP. Make sure that will pass between your networks.
Here is an article that goes over the setup.
Director of Information Services
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Bull
Sent: Monday, December 09, 2013 9:05 AM
Subject: AnyNet over a Broadband Connection
Hi from the Newbie, though some may recognise my name from many years ago.
I was made redundant from my IT Consultant post, spent a few years in the
wilderness, as a chef among other things, but now I'm back.
I have two small networks to look after, iSeries servers on both. Both
networks are connected to www via broadband connections; I can use Telnet
and FTP between them, but I would dearly love to be able to use
Object-Connect command and DDMF's. I have configured AnyNet and it works in
the isolation of each network but does not seem to want to connect over the
broadband. I'm guessing that the bb-router/firewall may be one issue. I've
googled till I'm goggled, but nothing found that seems to help. I guess it
could be a non-starter; perhaps a VPN is the solution?
Can someone pass on some advice, clues, guidance etc to an 'old' hand.