473,587 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(ipAd dress,
Convert.ToInt32 (SocketPort));
Socket listener = new Socket(AddressF amily.InterNetw ork, SocketType.Stre am,
ProtocolType.Tc p);
listener.Bind(l ocalEndPoint);
listener.Listen (Convert.ToInt3 2(SocketThreads ));
this.ListenerLi st.Add(listener ); /// array of listeners
Regards,
John
Nov 16 '05 #1
9 1972
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(you rs 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.mi crosoft.com> wrote in message
news:%2******** ********@cpmsft ngxa10.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.mi crosoft.com> wrote in message
news:4m******** *****@cpmsftngx a10.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
2688
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 form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can...
2
8818
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 (textbox) , the next is the email body (a Textbox with multiple rows), an email address (textbox), and a DropDownList containing multiple email addresses...
1
5265
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 entered is a valid e-mail address format. We've added a CustomValidator to perform this validation. We have the server-side validation working fine,...
18
3381
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 relies on subscrption fees. Sessions ID's are matched between the browser and the server. So a users can login with same username and password...
1
2924
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 work (error that there is an extra parenthise (sp?) ) and B: Will only let in two names for each record. If there are three, the middle on is...
4
2771
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 example: In version.h ------------ #ifndef VERSION #define VERSION
2
2337
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() function of another form without problem. Then I installed Visual Studio 2005 and the FrameWork 2.0. I launched my application and I had lots of error...
35
9319
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 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
10
2796
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 one specific file of class. I have checked that if there is more than one allocation of storage for identifiers, this error arises. But I don't see...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.