Please help: How to connect using a specific IP address

A

Abdulla Herzallah

Hi everyone I don't know if I am posting this to the right newsgroup but it
is the closest I found, in case you think you can advice me to another
newsgroup please feel free to
do so. I am so desperate to get my problem solved.

The issue is related to sockets and networking this is my problem

short version:
I need to connect to an application using a specific IP, i.e. the server I
will connect to will see that specific IP address
how can I do that in .NET any help please.
----------------------------------------

Detailed version:
I have to build two applications(GenericCustomers.exe and
PremiumCustomers.exe) they will run on the same server
both applications will connect to one server (MainBase) across the Internet
using the same port number 1323
we have two external IP addresses i.e.(Internet IP address) and pointing by
the router to the my server where my applications are running
I need GenericCustomers.exe when connecting the MainBase should use one
external IP address while PremiumCustomers.exe should connect using the
other external IP address.

The MainBase server recognizes applications by their external IP address
which have to be registered in it's database

I can not run each of them on a separate server neither I can use different
port number (otherwise it can be solved by the router)
I am using C# and visual Studio 2005

What I see is that the application when attempts to connect should
initialize the socket with the IP address that I want to start the
connection with
I can not see this as impossible (think of the router applications that do
all the NAT)
but I did not see anything that help in the socket class nor on the Connect
method..
 
M

Mr. Arnold

Abdulla Herzallah said:
Hi everyone I don't know if I am posting this to the right newsgroup but
it
is the closest I found, in case you think you can advice me to another
newsgroup please feel free to
do so. I am so desperate to get my problem solved.

The issue is related to sockets and networking this is my problem

short version:
I need to connect to an application using a specific IP, i.e. the server I
will connect to will see that specific IP address
how can I do that in .NET any help please.
----------------------------------------

Detailed version:
I have to build two applications(GenericCustomers.exe and
PremiumCustomers.exe) they will run on the same server
both applications will connect to one server (MainBase) across the
Internet
using the same port number 1323
we have two external IP addresses i.e.(Internet IP address) and pointing
by
the router to the my server where my applications are running
I need GenericCustomers.exe when connecting the MainBase should use one
external IP address while PremiumCustomers.exe should connect using the
other external IP address.

The MainBase server recognizes applications by their external IP address
which have to be registered in it's database

I can not run each of them on a separate server neither I can use
different
port number (otherwise it can be solved by the router)
I am using C# and visual Studio 2005

What I see is that the application when attempts to connect should
initialize the socket with the IP address that I want to start the
connection with
I can not see this as impossible (think of the router applications that do
all the NAT)
but I did not see anything that help in the socket class nor on the
Connect
method..

Are you talking about some simple NAT router that's suppose to be able to
handle two external or public facing WAN/IP(s)? If this is what you're
talking about, then a simple NAT router can't do it. You need a high end FW
router or low-end FW appliance that works with two or more external
WAN/IP(s) that can route traffic to a specified LAN IP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top