473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

crossing multiple IP address

I have a system where my software sits on one server and interacts with
another server running MS SQL. My software recieves connects via a socket
layer on the internet and does it's thing with the SQL. This seems to work
fine.

The problem is now I have a situation where the internet connect is on
another server with firewall. When I listen to the ports on the server my
software is running on it seems I can not listen to the internet. I am
assuming this is because the internet connection has a different IP address
range then the interanet connection.

Currently I am using the CIS from MS for the firewall which I have tried to
open a port and set the host machine name to the name of the second server.

Note for testing I am using WinXP for all three computer... In concept the
production machines will be Win2K3...

/// diagram sort of

<---- 96.223.20.20 (internet) --- server 1 (firewall) ---- 192.168.0.1 ----
< --- 192.168.0.2 --- server 2 (my app) --- 192.168.0.3 ----> < ---

192.168.0.4 ---- server 3 (SQL)

/// Code use to listen for incoming sockets.
/// o is an IP address I read from the reg
IPAddress ipAddress = IPAddress.Parse(o.ToString());
IPEndPoint localEndPoint = new IPEndPoint(ipAddress,
Convert.ToInt32(SocketPort));
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
listener.Bind(localEndPoint);
listener.Listen(Convert.ToInt32(SocketThreads));
this.ListenerList.Add(listener); /// array of listeners
Regards,
John
Nov 16 '05 #1
9 1963
Hi John,

Based on my understanding, you want to use TCP socket to connect between
your Sql Server machine and your client application machine. But it failed
for firewall.

As you stated, your firewall should be on another machine between your
client machine and server machine. All the communication between these 2
machines must be passed through this firewall.

If you close your firewall, does everything works well?

If the application works well without firewall, it means the problem is due
to the firewall. Normally, we need not change C# for TCP/IP communication
with firewall between machines. What we should do is configure the firewall
to allow TCP/IP communication , i.e. open certain port on the server.

If your issue is firewall configuration fail issue, I think you should
paste your issue at some other group to get more useful help.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #2
No I am not trying to connect to the SQL. A application not by me is run
somewhere out in the world. The user of that progam put an IP address of my
application in with a port number. Once we are connected my porgam access
the SQL server locally via normal means and is not a problem.

If the internet connection is on the server with my software with firewall I
just open the correct port in the firewall and it works fine.

The problem is if the internet connection is on another server then the
server with the my application.

Remote application -> (internet) <- internet server -> (lan) <- my
apllication server
Now my appliction can see the internet via the internet server but the
remote application can not see my appliction if the remote application
starts the connection.

My question is, is there a way for either my application to receive requests
from the remote application or for me to redirect the request to the server
with my application.

Regards,
John
Nov 16 '05 #3
You need to look at the documentation for your firewall/router and
forward the port that you're using from the external IP to your internal IP.

-Jason

John J. Hughes II wrote:
No I am not trying to connect to the SQL. A application not by me is run
somewhere out in the world. The user of that progam put an IP address of my
application in with a port number. Once we are connected my porgam access
the SQL server locally via normal means and is not a problem.

If the internet connection is on the server with my software with firewall I
just open the correct port in the firewall and it works fine.

The problem is if the internet connection is on another server then the
server with the my application.

Remote application -> (internet) <- internet server -> (lan) <- my
apllication server
Now my appliction can see the internet via the internet server but the
remote application can not see my appliction if the remote application
starts the connection.

My question is, is there a way for either my application to receive requests
from the remote application or for me to redirect the request to the server
with my application.

Regards,
John

Nov 16 '05 #4
Hi John,

Thanks for your feedback.

Oh, let's me re-understand your issue.

There is a remote machine on the internet want to access your application
on your machine, while your machine access a local SQL server(Which is
fine, so has nothing to do with our problem.). Then there is a firewall
between the remote machine and yours application(yours server). If the
firewall is on the same machine as your application, once you open the
port, it works fine. But your problem is: the firewall is on another
machine, which is in the a LAN with your server(your application). In this
situation, your application has to communicate with the remote machine
through the firewall.

Hope I did not mis-understand you.

I think maybe your LAN use virtual IP internally, which remote machine on
the internet can not see. Just as Jason suggested, you should configure
your firewall/router, which will get the request of the remote machine, to
forward the incoming request to the correct internal machine(This senario,
to your server).

If you have any question about the configuration, I think you may look your
firewall/router product document for the configuration. Or you may consult
the vendor for these product. Then, your application should work well.

Hope this help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #5
Hi John,

Thanks for your feedback.

Based on your further feedback, your condition1 works well, but your
condition2 does not work. For your condition2, your server1 connect to the
internet(I suspect server1 is the only machine in your LAN can access
internet now), while your application stay on server2, I suspect your
server2 can not access internet direct, yes? First, have you configured
your LAN to enable the server2 access internet through server1?

Firewall only block the un-expected request from internet, but can not
dispatch the request to another machine. For your remote client machine,
how can it contact the server application(on server2) in your LAN? I think
it can not success Ping the server2 through your remote client machine,
yes?

So, if you configured your LAN to enable internet access your server2
through server1, your application should also be OK. To get this done, your
server1 must act as a router which can forward certain internet request to
server2. As I think, Windows 2000 Server version has the router software,
may meet your need. If you continue to use Windows XP, you may need to use
some other third party software to enable your server1 as router.

I hope this help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #6
Thanks for the response. My server 2 has no problem accessing the internet
via server 1.

You maybe correct that WinXp does not have this function. I will try
installing Win2k3 as time permit and test with that.

Regards,
John
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:%2****************@cpmsftngxa10.phx.gbl...
Hi John,

Thanks for your feedback.

Based on your further feedback, your condition1 works well, but your
condition2 does not work. For your condition2, your server1 connect to the
internet(I suspect server1 is the only machine in your LAN can access
internet now), while your application stay on server2, I suspect your
server2 can not access internet direct, yes? First, have you configured
your LAN to enable the server2 access internet through server1?

Firewall only block the un-expected request from internet, but can not
dispatch the request to another machine. For your remote client machine,
how can it contact the server application(on server2) in your LAN? I think
it can not success Ping the server2 through your remote client machine,
yes?

So, if you configured your LAN to enable internet access your server2
through server1, your application should also be OK. To get this done, your server1 must act as a router which can forward certain internet request to
server2. As I think, Windows 2000 Server version has the router software,
may meet your need. If you continue to use Windows XP, you may need to use
some other third party software to enable your server1 as router.

I hope this help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #7
Hi John,

Thanks for your feedback.

Yes, your server2 may connect to internet through server1, this only need
server1 as a proxy. But, I think the remote client machine can not see your
server1, yes? Because there is no way for the network to identify the
server1(There is no REAL IP address for server1 on internet). So what you
need is setting up a router on server1, which will give remote request a
way to identify and access the internal LAN machine(server2). I only mean
that Windows XP has no build-in router function.

Anyway, I will wait for your feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #8
Server1 can see Server2 and Server2 can see Server1 via one network card but
the second network card in Server1 can not see Server2 because the IP
addresses are incompatible. I agree that the data needs to be routed in
some way and since the ICS firewall gives the option of setting the host
machine I was thinking it would work but test seem to say otherwise. When I
have time I will install Win2k3 and see if it has this functionallity. I
may also search the internet for a third party solution.

Thanks again for the response,
John
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:4m*************@cpmsftngxa10.phx.gbl...
Hi John,

Thanks for your feedback.

Yes, your server2 may connect to internet through server1, this only need
server1 as a proxy. But, I think the remote client machine can not see your server1, yes? Because there is no way for the network to identify the
server1(There is no REAL IP address for server1 on internet). So what you
need is setting up a router on server1, which will give remote request a
way to identify and access the internal LAN machine(server2). I only mean
that Windows XP has no build-in router function.

Anyway, I will wait for your feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #9
Hi John,

Thanks for your feedback.

As I think, the main concern on this issue is now on the network setting
and configuration of your LAN, it has nothing to do with the socket
programming, so I suggest you consult some network administrator for a
suitable and good configuration for this, you may get more help from them.
Also, if you have problem of using Win2003 router or WinXP firewall, I
suggest you paste your question in platform related group in Microsoft
newsgroup, you will get more professional help there.

Again, if you need further C# programming help, feel free to post here.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
1
by: cemcat | last post by:
Hello, We have an ASP.NET 2.0 (C#) web form that contains a textbox for users to enter multiple e-mail addresses separated by semicolons. We need to validate that each individual e-mail address...
18
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site...
1
by: Phoenix_ver10 | last post by:
I have a mailing list with multiple names going to the same addresses. I need one address with all the names for that address on it. I checked out the example on microsoft's site, but A: It doesn't...
4
by: yancheng.cheok | last post by:
Recently, I try to replace #define with const in header file. However, there are concerns on, multiple const object will be created, if the header file is included in multiple cpp files. For...
2
by: Laurent Navarro | last post by:
Hello, I created an application with the FrameWork 1.1 containing differents forms and threads runing. There was no problem, I could click on a picture on my Main Form to call the Show()...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
10
by: zfareed | last post by:
Similar problem to the previous post. I have created a project with about 7 files including 3 header files and 3 implementation files. I am getting a multiple definition error when compiling for...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.