Solved

Port Forwarding using Delphi

Posted on 2011-03-22
9
3,015 Views
Last Modified: 2012-05-11
Hey,

I have to build an application that permits :

-1> forward TCP/UDP requests on port p1 to another IP machine on port p2
-2> enable multiplexing request on port p2
selecting either machine M1 with IP1 on port p2; or machine M2 on port p2; or machine M3 on port p2...

I think all this is possible using a server routing application that permit multiplexing
external users can use a client application that indicates which machine is to be connected on port p2

Any good ideas, or any examples are welcome
I am searching for an example with Delphi spource (7 prefered)


Thanks in advance

Laurent
0
Comment
Question by:llaurent59
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
9 Comments
 
LVL 9

Expert Comment

by:Mahdi78
ID: 35191328
0
 

Author Comment

by:llaurent59
ID: 35341716
Still waiting for a solution

or for an example that will permit me to make further tests...
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35341962
Did you try TidMappedPortTCP?
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 

Author Comment

by:llaurent59
ID: 35342853
No I did not,
Have you a first example with TidMappedPortTCP ?
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35343153
0
 
LVL 24

Accepted Solution

by:
jimyX earned 500 total points
ID: 35499225
I have shown the Author what to use to accomplish what he is asking for #35342853. Also I directed him where to find examples #35343153.

Also I have got a chance to write a simple example using "TidMappedPortTCP" if the Author is interested in details:
procedure TForm1.Button1Click(Sender: TObject);
begin
  IdMappedPortTCP1.MappedHost := IP Address;       // the remote address where the packets to be forwarded.
  IdMappedPortTCP1.MappedPort := RPort;                // the remote port where the forwarded packets are expected at.
  IdMappedPortTCP1.DefaultPort := LPort;                  // the local port where the local communication is taking place at.
  IdMappedPortTCP1.Active :=  True;
end;

Open in new window


I needed to forward a communication between a Client and Server from one PC to another, the Client is on my PC (IP:127.0.0.1 & port:123) and the Server is on another PC (IP:192.168.0.3 & listening port:112) so what I did is activating the "IdMappedPortTCP" with the following properties in my PC, where I have the Client:
procedure TForm1.Button1Click(Sender: TObject);
begin
  IdMappedPortTCP1.MappedHost := '192.168.0.3';
  IdMappedPortTCP1.MappedPort := 112;
  IdMappedPortTCP1.DefaultPort := 123;
  IdMappedPortTCP1.Active :=  True;
end;

Open in new window


After activating the IdMappedPortTCP all the communications were forwarded from the Client to the Server.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35499234
Correction in a the post number that I am referring to:
I have shown the Author what to use to accomplish what he is asking for: #35341962...
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question