J
John J. Hughes II
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 ----
/// 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
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.4 ---- server 3 (SQL)< --- 192.168.0.2 --- server 2 (my app) --- 192.168.0.3 ----> < ---
/// 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