On Fri, Jul 17, 2009 at 8:32 AM, Michael White <[email protected]> wrote:
>
> Isn't TCP a standardized protocol where if it hits any firewall that it has 
> to be handled the
> same way?

Your question doesn't make sense.

An example of some firewall rules I'm using at work (this is iptables
- usually what's running in the background on most routers):

-A FORWARD -i eth0 -p tcp -m tcp --dport 8022 -m state --state NEW -j ACCEPT

Any new session packets coming in on eth0 that are TCP coming in on
port 8022 should be accepted.
This implies:
Any further packets for a particular connection should also be allowed through
Any packets on eth1 will be ignored by this rule.
Any packets on eth0 but are UDP will be ignored by this rule
Any packets on eth0, using TCP but on any other port will be ignored
by this rule.

Another (pair) related to this:
-A PREROUTING -i eth0 -p tcp -m tcp --dport 8022 -j DNAT
--to-destination 192.168.100.5:22
-A POSTROUTING -d 192.168.100.5 -p tcp -m tcp --dport 22 -j MASQUERADE

Any packets coming in on eth0 using TCP on port 8022 should be
redirected to `192.168.100.5 and the port changed to 22
Any packets going out on eth0 from 192.168.100.4 using TCP on port 22
should be made to look as if they're coming from here.

> Firewall in question is the packaged Firewall with Windows (XP and Vista). 
> Just using the Winsock library. Everything is C++.

Oh. Windows.

What you should do, first, is (temporarily) disable the firewall, and
see if your application works without it in the way.

--
PJH

http://shabbleland.myminicity.com/com
http://www.chavgangs.com/register.php?referer=9375

Reply via email to