{"id":573,"date":"2011-03-15T22:53:15","date_gmt":"2011-03-15T14:53:15","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=573"},"modified":"2023-04-28T09:50:37","modified_gmt":"2023-04-28T09:50:37","slug":"how-to-install-and-configure-port-forwarding-using-rinetd-in-windows","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-port-forwarding-using-rinetd-in-windows\/","title":{"rendered":"How to Install and Configure Port Forwarding Using Rinetd in Windows"},"content":{"rendered":"<p>Rinetd purpose is to redirects the TCP connections from one IP address and port to another. Since rinetd runs as a single process using nonblocking I\/O, it is able to redirect a large number of connections without a severe impact on the machine. This article will shows how you can do port-forwarding with rinetd on Windows operating system such as windows xp, windows server 2008 server, windows server 2003 and etc. Please follow below steps:<\/p>\n<p>1. Download <a href=\"https:\/\/www.boutell.co.uk\/\" target=\"_blank\" rel=\"noopener\">rinetd<\/a><\/p>\n<p>2. Configure <strong>rinetd.conf<\/strong> as per below<\/p>\n<p>Please create <strong>rinetd.conf<\/strong> and put it in C:\\rinetd folder, together with <strong>rinetd.exe<\/strong><\/p>\n<ol>\n<pre class=\"code\">192.168.2.2 80 192.168.2.5 80<\/pre>\n<\/ol>\n<p>You will redirect ip 192.168.2.2 with port 80 to 192.168.2.5 with port80<\/p>\n<ol>\n<pre class=\"code\">C:\\&gt;cd rinetd\n\nC:\\rinetd&gt;dir\n Volume in drive C is OS\n Volume Serial Number is 9314-A45E\n\n Directory of C:\\rinetd\n\n03\/15\/2011  10:37 PM              .\n03\/15\/2011  10:37 PM              ..\n04\/13\/2003  01:29 PM             2,043 CHANGES\n02\/17\/1999  06:34 PM            22,320 getopt.c\n02\/17\/1999  06:15 PM             4,551 getopt.h\n04\/13\/2003  01:28 PM             8,484 index.html\n03\/01\/1999  10:41 AM               166 Makefile\n03\/01\/1999  10:39 AM             3,612 match.c\n08\/07\/1998  11:54 AM               188 match.h\n04\/13\/2003  01:27 PM               770 README\n03\/15\/2011  10:29 PM                97 rinetd-run.bat\n03\/01\/1999  10:42 AM             6,936 rinetd.8\n04\/13\/2003  01:26 PM            35,445 rinetd.c\n03\/15\/2011  09:26 PM                29 rinetd.conf\n02\/17\/1999  10:12 PM             3,555 rinetd.dsp\n02\/17\/1999  06:00 PM               535 rinetd.dsw\n04\/13\/2003  01:33 PM           290,893 rinetd.exe\n03\/15\/2011  09:56 PM             1,975 rinetd.ini\n02\/17\/1999  10:12 PM            74,752 rinetd.ncb\n02\/17\/1999  10:12 PM            48,640 rinetd.opt\n02\/17\/1999  06:49 PM             2,173 rinetd.plg\n03\/15\/2011  09:06 PM           114,688 ServiceEx.exe\n              20 File(s)        621,852 bytes\n               2 Dir(s)     463,695,872 bytes free<\/pre>\n<\/ol>\n<p>3. Run rinetd (manually).<\/p>\n<ol>\n<pre class=\"code\">C:\\rinetd&gt;rinetd.exe -c rinetd.conf\n<\/pre>\n<\/ol>\n<p>We can also create a batch file, and call <strong>rinetd-run.bat<\/strong> to start rinetd with a click:<\/p>\n<ol>\n<pre class=\"code\">@echo off\nc:\ncd c:\\rinetd\\rinetd\nstart c:\\rinetd\\rinetd.exe -c c:\\rinetd\\rinetd.conf\nExit\n<\/pre>\n<\/ol>\n<p>4. Download <a href=\"http:\/\/serviceex.com\/files\/ServiceEx.exe\" target=\"_blank\" rel=\"noopener\">ServiceEx<\/a>, a windows application that allows a normal program to run as a Windows service.<\/p>\n<p>5. Configure <a href=\"http:\/\/serviceex.com\/files\/ServiceEx.exe\" target=\"_blank\" rel=\"noopener\">ServiceEx<\/a> to make rinetd a windows service.<\/p>\n<p>Refer and download <a href=\"https:\/\/www.hugedomains.com\/domain_profile.cfm?d=serviceex&amp;e=com\" target=\"_blank\" rel=\"noopener\">http:\/\/serviceex.com\/files\/ServiceEx.ini.sample<\/a><\/p>\n<p>Modify the changes on ServiceEx.ini.sample and save as rinetd.ini<\/p>\n<ol>\n<pre class=\"code\">; Instructions for installing a service:\n;\n;  1.  Edit this file.  You need to fill in the values for ServiceExeFullPath, options,\n;      desktop, Start and StartNow below.\n;  2.  Decide on a name for the service.\n;  3.  Save this file as that name, with an .ini extension added.  For example, if you will name\n;      the service \"NotepadService\", you would save this file with the name NotepadService.ini\n;      in the same directory where ServiceEx.exe is located.\n;  4.  In Windows, select Start\/Run then enter \"cmd\", without the quotes, in the prompt.\n;  5.  Chdir to the directory where you have placed ServiceEx.exe\n;  6.  Type \"ServiceEx install \".  If all goes well your service will be installed (and running,\n;      if you so specified).\n;\n;\n; Once you have run ServiceEx successfully, if you want to change the values in this file, you should do the following:\n;\n; 1.  Stop the service (i.e. run \"net stop  at the command line)\n; 2.  Remove the service (i.e. run \"ServiceEx remove )\n; 3.  Edit and save this file as desired.  This file must be named the same as the service name with an .ini extension added.\n; 4.  Install the newly configured service (i.e. run \"ServiceEx install ).\n;\n; Unless you change the executable file, it is better to use the service manager to modify these values.\n; Please visit serviceex.com for information on how to do that.\n;\n\n; full path to exe to be run as a service--use quotes if path contains spaces\n; The section identifier below is REQUIRED\n[ServiceEx]\nServiceExeFullPath = \"c:\\rinetd\\rinetd.exe\"\n\n; program arguments to be sent to executable\noptions = -c c:\\rinetd\\rinetd.conf\n\n; can program interact with desktop [true | false] (default: true)\ndesktop = true\n\n; start type (valid values: Auto Manual Disabled) (default: auto)\nStart=Auto\n\n; start the service upon installation [true | false] (default: no)\nStartNow=false<\/pre>\n<\/ol>\n<p>If you open rinetd.ini, you will notice this changes<\/p>\n<ol>\n<pre class=\"code\">ServiceExeFullPath = \"c:\\rinetd\\rinetd.exe\"\n\n; program arguments to be sent to executable\noptions = -c c:\\rinetd\\rinetd.conf<\/pre>\n<\/ol>\n<p>6. Run rinetd as a windows service<\/p>\n<ol>\n<pre class=\"code\">ServiceEx install rinetd\n<\/pre>\n<\/ol>\n<p>You can start and stop it using command line utilities.<\/p>\n<ol>\n<pre class=\"code\">  To start: \"net start rinetd\"\n  To stop: \"net stop rinetd\"\n<\/pre>\n<\/ol>\n<p>If you browse http:\/\/192.168.2.2, it will show you http:\/\/192.168.2.5 website. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rinetd purpose is to redirects the TCP connections from one IP address and port to another. Since rinetd runs as a single process using nonblocking I\/O, it is able to&#8230;<\/p>\n","protected":false},"author":6,"featured_media":481,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1094],"tags":[1929],"class_list":["post-573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","tag-windows"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=573"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/573\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/481"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}