sockets and firewalls

Post Reply
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

sockets and firewalls

Post by don lowenstein »

I have a static IP address of 207.119.xxx.xxx

there is a firewall (DLink) that connects to the internet and stands between this connection and my internal local area network.

outside the firewall is a web-server. it's internal IP is 192.168.1.3
inside the firewall is a file-server - it's internal IP is 192.168.1.7

I use sockcli.prg and sockserv.prg
nport is randomly selected to be 2525

if i try to connect to 207.119.xxx.xxx:nport - (webserver outside firewall) - no connection
if i try to connect to 192.168.1.3:nport (webserver outside firewall) - no problem

if i try to connect to 192.168.1.2 (file server on lan inside firewall )with windows firewall ON and McAfee virus ON - no connection.
if i try to connect to 192.168.1.2 (file server on lan inside firewall ) with windows firewall OFF and McAfee OFF - no problem.

question - I need use sockserv.exe to monitor requests from the "outside" world.
I want sockcli.exe (or other socket accplication client) to call the 207.119.xxx.xxx:2525 socket. My sockserv.exe must process these requests and have access to "inside" the firewall.

What's the typical configuration of this type of environment so outside calls can be made to an public IP:port, directly with sockets? where should sockserv.exe reside and how should firewall and virus settings be configured?

anybody have any ideas?

thank you in advance.
Don Lowenstein
www.laapc.com
ADutheil
Posts: 352
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: sockets and firewalls

Post by ADutheil »

You should configure your DLINK to NAT your internal address/port on the firewall. All the incoming conections to the ROUTER/FW on that port will be sent to your internal IP.
Regards,

André Dutheil
FWH 13.04 HB 3.2 BCC 5.82 MinGW 4.5.2 MSVS 10
Post Reply