Mobile application development with a internet redirection server (rinetd).

Developing for mobile devices can raise some interesting constraints around mobile devices being unable to access a debugging/test service for some reason. Some examples of what I am talking about would include:…

  • Having a mobile device access a guest virtual machine that is inaccessible since it is behind a NAT on its server.
  • Being able to access a ASP.NET application that is running in Visual Studio’s development server.

Fortunately there’s a very nice utility called rinetd that boutell created that you can use to get around these issues. You can get started with rinetd on OSX, Windows and Linux by visiting boutell’s page about rinetd or downloading the source from my mirror…

Download icon image

As always, be sure to stay within the licensing terms(GNU GPL in this case) when you use this. To start off you need to compile the code. In OS X and Linux computers you simply need to run ‘make’…

rinetd/$ make

After doing this you should see the compiled rinetd binary:…

rinetd/$ ls
CHANGES    getopt.h   match.o    rinetd.dsp rinetd.o
Makefile   index.html rinetd     rinetd.dsw rinetd.opt
README     match.c    rinetd.8   rinetd.exe rinetd.plg
getopt.c   match.h    rinetd.c   rinetd.ncb

Compiling for windows is just as simple:…

  1. Launch the visual studio VC++ workspace file(rinetd.dsw) in visual studio.
  2. Press Build
  3. You will see rinetd.exe in the rinetd folder.

When it comes to running rinetd, you need to provide a configuration file that contains lines with the following details:…

<IP address to listen on> <Port to listen on> <IP to forward to> <Port to forward to>

For the following example can be used to forward all requests to the card with address on port 8080 to on port 80… 8080 80

If you have multiple Network cards (NICs) you could use a wildcard for the incoming IP Address:… 8080 80

Once you have a configuration file simply run the compiled binary with the appropriate flag…

rinetd$ rinetd -c forUnix.conf


rinetd> rinetd.exe -c forWindows.conf

There are more configurations that you can do. Please see boutell‘s page for more details.

More and more companies are investing in mobile application development these days. It shouldn’t come as a surprise… They are considered to be HOT by consumers. I can only imagine that in a decade we will be looking back at the rise of the touchscreens much like how people look back at the floppy disk today.

Leave a Reply