Routing WAN IP to local IP in an application that is unaware?

To be honest, I had no idea what to summarize my issue as in the subject; pardon any misunderstanding.

I have a rather old application (2003) that needs to be able to accept and create DCC connections. It was apparently not coded to be aware of private network IP addresses and when any attempts at a connection are made outside of my LAN, the connection fails because it is reporting the LAN IP to the client. I vaguely remember reading _somewhere_ that it's possible, through use of a script or the routing tables (I don't know which), to force an application to appear as if it not using a private IP to its clients.

I thought I would ask this before I started making changes to the source, to save myself some time and anguish. Any ideas?
 
It is definitely possible from the code standpoint, as even Eggdrop is capable of DCC through the LAN/NAT, with proper port forwarding, which I have (It has configuration settings to specify local IP bind as well as another setting for external/WAN IP).

I am almost certain there is some kind of tcp wrapper (the terminology i wanted to use in the first place) that can handle this sort of thing.
 
SirDice said:
You can't NAT DCC
Yes you can, and libalias(3) has support for that.

If you're running through a FreeBSD NAT that uses libalias then you shouldn't need to do anything. Unfortunately it is limited in that you have to be using port 6667 or 6668, and the DCC SEND command must be sent in a single packet. The port restriction should be fixable if you're willing to edit src/sys/netinet/libalias/alias_irc.c and recompile libalias.
 
Back
Top