akka/akka — pull request #864 by cessationoftime (2012-11-10 22:10:11+00:00)
Title: #2698 - Allow configuration of Netty Remoting to accept any inbound connection

This PR allows the Netty Server to be configured to an IP of "0.0.0.0" so that inbound connections can be accepted that were not directed to the local IP. This will allow for the use of NAT and is a simplification of the work done for the unmerged ticket [1552](https://www.assembla.com/spaces/akka/tickets/1552-nat-firewall-for-remote-actors)

The config key I use is "force-bind-address", and when it is off, Netty will work normally. But when it is on Netty server will be started with an IP of "0.0.0.0".

Default in reference.conf is:

akka.remote.netty.force-bind-address = off

I also have a multi-node test included that is taggedAs NatRemotingTest and makes use of this setup but it requires some configuration to run as you need the IP of a router or other device to NAT through. Set the IPs in the *.opts files to that of the router and then setup NAT on the router for ports 3663 and 6996.

I use this in my own project with [uPnP](https://github.com/cessationoftime/psyonik-upnp). At some point I would like to build an akka-uPnP extension. But for that to work akka-remote would have to be setup to depend on akka-upnp, but only when upnp is enabled.